]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/Makefile
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / Makefile
1 # make all:             make bytecode archive
2 # make opt:             make native archive
3 # make install:         install bytecode archive, and if present, native archive
4 # make uninstall:       uninstall package
5 # make clean:           remove intermediate files (in this directory)
6 # make CLEAN:           remove intermediate files (recursively)
7 # make distclean:       remove any superflous files (recursively)
8 # make release:         cleanup, create archive, tag CVS module 
9 #                       (for developers)
10
11 #----------------------------------------------------------------------
12
13 include Makefile.conf
14
15 .PHONY: all
16 all: 
17         $(MAKE) -C m2parsergen all
18         $(MAKE) -C tools/ucs2_to_utf8 all
19         $(MAKE) -f Makefile.code all
20         $(MAKE) -C compatibility all
21
22 .PHONY: opt
23 opt: 
24         $(MAKE) -C m2parsergen all
25         $(MAKE) -C tools/ucs2_to_utf8 all
26         $(MAKE) -f Makefile.code opt
27         $(MAKE) -C compatibility opt
28
29 .PHONY: install
30 install: all tmp/pxp_entity.mli
31         files=`tools/collect_files *.cmi *.cma *.cmxa *.a \
32                 pxp_utf8.cmo pxp_utf8.cmx pxp_utf8.o` && \
33         ocamlfind install $(NAME) $(MLI) tmp/pxp_entity.mli $$files META
34
35 .PHONY: uninstall
36 uninstall:
37         ocamlfind remove $(NAME)
38
39 .PHONY: markup-install
40 markup-install:
41         $(MAKE) -C compatibility install
42
43 .PHONY: markup-uninstall
44 markup-uninstall:
45         $(MAKE) -C compatibility uninstall
46
47 tmp/pxp_entity.mli: pxp_entity.ml
48         mkdir -p tmp
49         rm -f tmp/pxp_entity.*
50         cp pxp_entity.ml tmp
51         echo '(* Sorry, this is currently undocumented *)' >tmp/mli
52         ocamlc -i -c tmp/pxp_entity.ml >>tmp/mli
53         mv tmp/mli tmp/pxp_entity.mli
54
55 .PHONY: clean
56 clean:
57         rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *.new *.old
58         rm -f pxp_yacc.ml
59         touch lexers/objects_iso88591 lexers/objects_utf8 lexers/depend
60         $(MAKE) -C lexers clean
61         $(MAKE) -C compatibility clean
62
63 .PHONY: CLEAN
64 CLEAN: clean
65         $(MAKE) -C doc CLEAN
66         $(MAKE) -C examples CLEAN
67         $(MAKE) -C rtests CLEAN
68         $(MAKE) -C m2parsergen CLEAN
69         touch tools/ucs2_to_utf8/depend
70         $(MAKE) -C tools/ucs2_to_utf8 clean
71
72 .PHONY: distclean
73 distclean: clean
74         rm -f *~ depend depend.pkg
75         $(MAKE) -C doc distclean
76         $(MAKE) -C examples distclean
77         $(MAKE) -C rtests distclean
78         $(MAKE) -C m2parsergen distclean
79         touch tools/ucs2_to_utf8/depend
80         $(MAKE) -C tools/ucs2_to_utf8 clean
81         $(MAKE) -C compatibility distclean
82
83 RELEASE: META
84         awk '/version/ { print substr($$3,2,length($$3)-2) }' META >RELEASE
85
86 .PHONY: dist
87 dist: RELEASE
88         r=`head -1 RELEASE`; cd ..; gtar czf $(NAME)-$$r.tar.gz --exclude='*/CVS*' --exclude="*~" --exclude="*/depend.pkg" --exclude="*/depend" --exclude="*/oo_questions*" --exclude="*/testsamples*" --exclude="*/tmp/*" --exclude="*reptil*" --exclude="*/doc/common.xml" --exclude="*/doc/config.xml" --exclude="*.fig.bak" --exclude="*/ps/pic*" --exclude="*/examples/panel*" --exclude="*/examples/xmlforms_gtk*" --exclude="*/Mail*" $(NAME)/*
89
90 .PHONY: tag-release
91 tag-release: RELEASE
92         r=`head -1 RELEASE | sed -e s/\\\./-/g`; cd ..; cvs tag -F $(NAME)-$$r markup
93
94 .PHONY: release
95 release: distclean
96         $(MAKE) tag-release
97         $(MAKE) dist
98
99 .PHONY: dev
100 dev:
101         $(MAKE) all
102         -$(MAKE) uninstall
103         $(MAKE) install
104         $(MAKE) -C examples/validate distclean
105         $(MAKE) -C examples/validate validate