Admin/page/Makefile
author paulson
Thu, 21 Apr 2005 13:15:25 +0200
changeset 15788 ebcbffebdf97
parent 14582 f0779f6fa7e8
child 15810 2c119fed01f0
permissions -rw-r--r--
adding the Proof General preview

# -- makefile for Isabelle web pages (dist and main)
# -- $Id$

# --- external tools

GENPAGE   = ./bin/genpage
MKCONTENT = ./bin/mkcontents

# ---
# --- genpage stuff 

# --- directories for main isabelle pages

MAIN_CONTENT = main-content
MAIN_LAYOUT  = main-layout
MAIN_TARGET  = main

# --- directories for isabelle distribution pages

DIST_CONTENT = dist-content
DIST_LAYOUT  = dist-layout
DIST_TARGET  = dist

# --- name of genpage template file
TEMPLATE_NAME = template.html

# ---
# --- doc content generation

# --- location of the Contents file of the Isabelle documentation
DOC_CONTENT_FILE = Contents

# --- target include files with documentation links
DOC_CONTENTS_MAIN = docu-contents.main
DOC_CONTENTS_DIST = docu-contents.dist

# ---
# --- begin rules

all: clean main dist install weblint

main:
	@$(MKCONTENT) -p dist/`cat DISTNAME`/doc/ $(DOC_CONTENT_FILE) $(DOC_CONTENTS_MAIN)
	@env DISTNAME=`cat DISTNAME` \
	  $(GENPAGE) -t $(MAIN_LAYOUT)/$(TEMPLATE_NAME) -c $(MAIN_CONTENT) -o $(MAIN_TARGET)

dist:
	@$(MKCONTENT) -p `cat DISTNAME`/doc/ $(DOC_CONTENT_FILE) $(DOC_CONTENTS_DIST)
	@env DISTNAME=`cat DISTNAME` \
	  $(GENPAGE) -t $(DIST_LAYOUT)/$(TEMPLATE_NAME) -c $(DIST_CONTENT) -o $(DIST_TARGET)

install: main dist
	@cp -R dist/. ..
	@mkdir -p ../../main-`cat DISTNAME`/.
	@cp -R main/. ../../main-`cat DISTNAME`/.

weblint:
	-weblint -x netscape -d extension-attribute -e img-size $(MAIN_TARGET)
	-weblint -x netscape -d extension-attribute -e img-size $(DIST_TARGET)

clean: 
	@rm -rf $(MAIN_TARGET)
	@rm -rf $(DIST_TARGET)
	@rm -rf $(DOC_CONTENTS_MAIN)
	@rm -rf $(DOC_CONTENTS_DIST)
	@find . -name "*~" -type f -print | xargs rm -f