]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/matita/Makefile
update in lambdadelta
[helm.git] / helm / www / matita / Makefile
index 836c264c8fe890f8977b983c1a903797fae7f289..c54475713a9031a9579b2d4fa86f0f1ba7200478 100644 (file)
@@ -1,3 +1,12 @@
+
+# should be a checked out version of sofware/matita/help/C/ (or a symlink to it)
+DOCS_SRC_DIR = docs-src
+DOCS_DEST_DIR = $(CURDIR)/docs/manual
+# should be a checked out and compiled with -execcomments of 
+# sofware/matita/nlibrary/topology/igft.ma
+TUTORIAL_SRC_DIR = tutorial-src
+TUTORIAL_DEST_DIR = $(CURDIR)/docs/tutorial
+
 MARGIN_X=30
 MARGIN_Y=206
 SIZE_X=426
@@ -5,16 +14,65 @@ SIZE_Y=70
 
 SEQ=3
 
-all: matita.xcf
+all:
+       @echo
+       @echo "Nothing to do per default, interesting targets:"
+       @echo
+       @echo "  manual    # import the (xhtml version of the) user manual"
+       @echo "  tutorial  # import the html version of the topology tutorial"
+       @echo "  library   # import the scripts building the library"
+       @echo "  images    # build images for the splash screen"
+       @echo "  papers    # build the papers page from xml/papers.xml"
+       @echo
+
+clean:
+
+manual: manual-stamp
+manual-stamp: $(DOCS_SRC_DIR)/*.xml $(DOCS_SRC_DIR)/xsl/*
+       $(MAKE) -C $(DOCS_SRC_DIR)/ html
+       rm -rf $(DOCS_DEST_DIR)/*
+       test -d $(DOCS_DEST_DIR)/ || mkdir -p $(DOCS_DEST_DIR)/
+       $(MAKE) -C $(DOCS_SRC_DIR) install-html DESTDIR=$(DOCS_DEST_DIR)/
+       touch $@
+
+tutorial: tutorial-stamp
+tutorial-stamp: $(TUTORIAL_SRC_DIR)/igft.html 
+       rm -rf $(TUTORIAL_DEST_DIR)/*
+       test -d $(TUTORIAL_DEST_DIR)/ || mkdir -p $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/igft.html $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/igft.pdf $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/*.png $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/*.svg $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/*.css $(TUTORIAL_DEST_DIR)/
+       cp $(TUTORIAL_SRC_DIR)/*.js $(TUTORIAL_DEST_DIR)/
+       touch $@
+
+.PHONY: library
+library:
+       if [ -d library/ ] ; then \
+         svn update library/ ; \
+       else \
+         echo "Can't find the scripts, check them out in library/" ; \
+         exit 1 ; \
+       fi
+
+papers: papers.shtml
+papers.shtml: xsl/papers2xhtml.xsl xml/papers.xml
+       xsltproc $^ > $@
+
+.PHONY: images
+images: images/matita.xcf
        for Y in `seq 0 $(SEQ)`; do \
-               convert matita.png -crop \
+               convert images/matita.png -crop \
                        $(SIZE_X)x$(SIZE_Y)+$(MARGIN_X)+`expr $(MARGIN_Y) + $$Y '*' '(' $(SIZE_Y) + 1 ')'` tmp.png; \
-               composite -compose src-over bg.png tmp.png bg$$Y.png;\
+               composite -compose src-over images/bg.png tmp.png images/bg$$Y.png;\
        done;\
        rm tmp.png              
 
 clean:
+       rm -f manual-stamp
+dist-clean: clean
        for X in `seq 0 $(SEQ)`; do\
-               rm bg$$X.png;\
+               rm images/bg$$X.png;\
        done