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