Admin/page/Makefile
author kleing
Mon, 17 Jan 2000 15:51:37 +0100
changeset 8133 ba1498046ee6
parent 8132 b93992e26c6a
child 9920 9734f2717203
permissions -rw-r--r--
Id line inserted
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8056
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     1
# --- uses $DISTNAME environment variable 
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     2
8133
ba1498046ee6 Id line inserted
kleing
parents: 8132
diff changeset
     3
# -- makefile for Isabelle web pages (dist and main)
ba1498046ee6 Id line inserted
kleing
parents: 8132
diff changeset
     4
# -- $Id$
ba1498046ee6 Id line inserted
kleing
parents: 8132
diff changeset
     5
8056
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     6
# --- perl scripts used in this makefile
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     7
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     8
GENPAGE   = bin/genpage
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
     9
MKCONTENT = bin/mkcontents
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    10
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    11
# ---
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    12
# --- genpage stuff 
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    13
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    14
# --- directories for main isabelle pages
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    15
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    16
MAIN_CONTENT = main-content
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    17
MAIN_LAYOUT  = main-layout
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    18
MAIN_TARGET  = main
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    19
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    20
# --- directories for isabelle distribution pages
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    21
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    22
DIST_CONTENT = dist-content
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    23
DIST_LAYOUT  = dist-layout
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    24
DIST_TARGET  = dist
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    25
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    26
# --- name of genpage template file
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    27
TEMPLATE_NAME = template.html
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    28
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    29
# ---
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    30
# --- doc content generation
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    31
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    32
# --- location of the Contents file of the Isabelle documentation
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    33
DOC_CONTENT_FILE = ../../Distribution/doc/Contents
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    34
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    35
# --- url prefixes for documentation links in main and dist dirs
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    36
DIST_DOCU_PREFIX = $(DISTNAME)/doc/
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    37
MAIN_DOCU_PREFIX = dist/$(DISTNAME)/doc/
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    38
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    39
# --- target include files with documentation links
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    40
DOC_CONTENTS_MAIN = docu-contents.main
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    41
DOC_CONTENTS_DIST = docu-contents.dist
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    42
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    43
# ---
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    44
# --- begin rules
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    45
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    46
all: clean gen
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    47
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    48
gen: main dist
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    49
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    50
main: check
8132
b93992e26c6a changes for the makepage script in Admin
kleing
parents: 8056
diff changeset
    51
	$(MKCONTENT) -p $(MAIN_DOCU_PREFIX) Contents $(DOC_CONTENTS_MAIN)
8056
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    52
	$(GENPAGE) -t $(MAIN_LAYOUT)/$(TEMPLATE_NAME) -c $(MAIN_CONTENT) -o $(MAIN_TARGET)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    53
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    54
	cd $(MAIN_TARGET); perl -pi -e "s/{ISABELLE}/$(DISTNAME)/g;" *.html
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    55
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    56
dist: check
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    57
	$(MKCONTENT) -p $(DIST_DOCU_PREFIX) $(DOC_CONTENT_FILE) $(DOC_CONTENTS_DIST)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    58
	$(GENPAGE) -t $(DIST_LAYOUT)/$(TEMPLATE_NAME) -c $(DIST_CONTENT) -o $(DIST_TARGET)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    59
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    60
	cd $(DIST_TARGET); perl -pi -e "s/{ISABELLE}/$(DISTNAME)/g;" *.html
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    61
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    62
clean: 
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    63
	rm -rf $(MAIN_TARGET)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    64
	rm -rf $(DIST_TARGET)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    65
	rm -rf $(DOC_CONTENTS_MAIN)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    66
	rm -rf $(DOC_CONTENTS_DIST)
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    67
	rm -f `find . -name "*~" -type f`
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    68
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    69
check:
3c587e7b8fe5 new webpage layout
kleing
parents:
diff changeset
    70
	@if [ "$(DISTNAME)" = "" ]; then echo "Error: \$$DISTNAME not set."; exit 1; fi