]> matita.cs.unibo.it Git - helm.git/blob - helm/www/matita1.0/Makefile
Created a new directory for Matita1.0
[helm.git] / helm / www / matita1.0 / Makefile
1
2 # should be a checked out version of sofware/matita/help/C/ (or a symlink to it)
3 DOCS_SRC_DIR = docs-src
4 DOCS_DEST_DIR = $(CURDIR)/docs/manual
5 # should be a checked out and compiled with -execcomments of 
6 # sofware/matita/nlibrary/topology/igft.ma
7 TUTORIAL_SRC_DIR = tutorial-src
8 TUTORIAL_DEST_DIR = $(CURDIR)/docs/tutorial
9
10 MARGIN_X=30
11 MARGIN_Y=206
12 SIZE_X=426
13 SIZE_Y=70
14
15 SEQ=3
16
17 all:
18         @echo
19         @echo "Nothing to do per default, interesting targets:"
20         @echo
21         @echo "  manual    # import the (xhtml version of the) user manual"
22         @echo "  tutorial  # import the html version of the topology tutorial"
23         @echo "  library   # import the scripts building the library"
24         @echo "  images    # build images for the splash screen"
25         @echo "  papers    # build the papers page from xml/papers.xml"
26         @echo
27
28 clean:
29
30 manual: manual-stamp
31 manual-stamp: $(DOCS_SRC_DIR)/*.xml $(DOCS_SRC_DIR)/xsl/*
32         $(MAKE) -C $(DOCS_SRC_DIR)/ html
33         rm -rf $(DOCS_DEST_DIR)/*
34         test -d $(DOCS_DEST_DIR)/ || mkdir -p $(DOCS_DEST_DIR)/
35         $(MAKE) -C $(DOCS_SRC_DIR) install-html DESTDIR=$(DOCS_DEST_DIR)/
36         touch $@
37
38 tutorial: tutorial-stamp
39 tutorial-stamp: $(TUTORIAL_SRC_DIR)/igft.html 
40         rm -rf $(TUTORIAL_DEST_DIR)/*
41         test -d $(TUTORIAL_DEST_DIR)/ || mkdir -p $(TUTORIAL_DEST_DIR)/
42         cp $(TUTORIAL_SRC_DIR)/igft.html $(TUTORIAL_DEST_DIR)/
43         cp $(TUTORIAL_SRC_DIR)/igft.pdf $(TUTORIAL_DEST_DIR)/
44         cp $(TUTORIAL_SRC_DIR)/*.png $(TUTORIAL_DEST_DIR)/
45         cp $(TUTORIAL_SRC_DIR)/*.svg $(TUTORIAL_DEST_DIR)/
46         cp $(TUTORIAL_SRC_DIR)/*.css $(TUTORIAL_DEST_DIR)/
47         cp $(TUTORIAL_SRC_DIR)/*.js $(TUTORIAL_DEST_DIR)/
48         touch $@
49
50 .PHONY: library
51 library:
52         if [ -d library/ ] ; then \
53           svn update library/ ; \
54         else \
55           echo "Can't find the scripts, check them out in library/" ; \
56           exit 1 ; \
57         fi
58
59 papers: papers.shtml
60 papers.shtml: xsl/papers2xhtml.xsl xml/papers.xml
61         xsltproc $^ > $@
62
63 .PHONY: images
64 images: images/matita.xcf
65         for Y in `seq 0 $(SEQ)`; do \
66                 convert images/matita.png -crop \
67                         $(SIZE_X)x$(SIZE_Y)+$(MARGIN_X)+`expr $(MARGIN_Y) + $$Y '*' '(' $(SIZE_Y) + 1 ')'` tmp.png; \
68                 composite -compose src-over images/bg.png tmp.png images/bg$$Y.png;\
69         done;\
70         rm tmp.png              
71
72 clean:
73         rm -f manual-stamp
74 dist-clean: clean
75         for X in `seq 0 $(SEQ)`; do\
76                 rm images/bg$$X.png;\
77         done
78