Module of module types for OrderedType,ComparableType,Printable,Serializable,Discrete...
[ocaml.git] / camlp4 / Makefile
blob324e3a4bfa18075d72729b780d8f1f2ddcd4259c
1 #########################################################################
2 # #
3 # Objective Caml #
4 # #
5 # Nicolas Pouillard, projet Gallium, INRIA Rocquencourt #
6 # #
7 # Copyright 2006 Institut National de Recherche en Informatique et #
8 # en Automatique. All rights reserved. This file is distributed #
9 # under the terms of the Q Public License version 1.0. #
10 # #
11 #########################################################################
13 # $Id$
15 # RELEASE NOTE:
16 # Do not forget to call make genclean to update Makefile.clean before a
17 # release.
19 OCAMLC=../boot/ocamlrun ../ocamlc -nostdlib \
20 -I ../stdlib -I ../otherlibs/unix -I ../otherlibs/win32unix -I build -g
21 OCAMLRUN=../boot/ocamlrun -I ../otherlibs/unix -I ../otherlibs/win32unix
22 YAM=$(OCAMLRUN) ./yam
23 YAM_OPTIONS=-verbosity '$(VERBOSE)'
25 default: all
27 opt install doc all pack just_doc: yam
28 @echo 'YAM $@ (use "make $@ VERBOSE=1" for a verbose make)'
29 @$(YAM) $(YAM_OPTIONS) $@
31 smartclean::
32 if test -x ../boot/ocamlrun; then \
33 if test -x ../ocaml; then \
34 $(OCAML) build/build.ml -clean; \
35 else \
36 if test -x ./yam; then \
37 $(YAM) $(YAM_OPTIONS) -clean; \
38 else \
39 $(MAKE) staticclean; \
40 fi; \
41 fi; \
42 else \
43 rm -f $(CLEANFILES); \
46 genclean: yam
47 $(YAM) -genclean Makefile.clean
48 (echo /Camlp4Ast.ml/d; echo w; echo q) | ed Makefile.clean
50 clean::
51 rm -f yam .cache-status
52 rm -f $(CLEANFILES)
53 rm -f *.cm[io] build/*.cm[io]
55 YAM_OBJS=build/YaM.cmo build/camlp4_config.cmo Makefile.cmo
57 yam: $(YAM_OBJS)
58 $(OCAMLC) -o yam unix.cma $(YAM_OBJS)
60 .SUFFIXES: .mli .ml .cmi .cmo
62 .mli.cmi:
63 $(OCAMLC) -c $*.mli
64 .ml.cmo:
65 $(OCAMLC) -c $*.ml
67 build/YaM.cmo: build/YaM.cmi
68 Makefile.cmo: build/YaM.cmi build/camlp4_config.cmo
70 uninstall:
71 rm -rf "$(LIBDIR)/camlp4"
72 cd "$(BINDIR)"; rm -f *camlp4*
74 depend:
76 # Normal bootstrap
78 bootstrap: backup promote clean all compare
79 bootstrap-debug: backup promote-debug clean all compare
81 backup restore boot-clean::
82 cd boot && $(MAKE) $@
84 promote-debug:
85 cp camlp4boot-debug.run boot/camlp4boot
87 promote:
88 cp camlp4boot.run boot/camlp4boot
90 compare:
91 @if (cmp camlp4boot.run boot/camlp4boot); \
92 then echo "Fixpoint reached, bootstrap succeeded."; \
93 else echo "Fixpoint not reached, try one more bootstrapping cycle."; \
96 .PHONY: clean install all uninstall backup restore boot-clean promote-debug \
97 promote compare opt doc smartclean depend
99 include Makefile.clean