1
#########################################################################
5
# Nicolas Pouillard, projet Gallium, INRIA Rocquencourt #
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. #
11
#########################################################################
16
# Do not forget to call make genclean to update Makefile.clean before a
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
23
YAM_OPTIONS=-verbosity '$(VERBOSE)'
27
opt install doc all pack just_doc: yam
28
@echo 'YAM $@ (use "make $@ VERBOSE=1" for a verbose make)'
29
@$(YAM) $(YAM_OPTIONS) $@
32
if test -x ../boot/ocamlrun; then \
33
if test -x ../ocaml; then \
34
$(OCAML) build/build.ml -clean; \
36
if test -x ./yam; then \
37
$(YAM) $(YAM_OPTIONS) -clean; \
39
$(MAKE) staticclean; \
43
rm -f $(CLEANFILES); \
47
$(YAM) -genclean Makefile.clean
48
(echo /Camlp4Ast.ml/d; echo w; echo q) | ed Makefile.clean
51
rm -f yam .cache-status
53
rm -f *.cm[io] build/*.cm[io]
55
YAM_OBJS=build/YaM.cmo build/camlp4_config.cmo Makefile.cmo
58
$(OCAMLC) -o yam unix.cma $(YAM_OBJS)
60
.SUFFIXES: .mli .ml .cmi .cmo
67
build/YaM.cmo: build/YaM.cmi
68
Makefile.cmo: build/YaM.cmi build/camlp4_config.cmo
71
rm -rf "$(LIBDIR)/camlp4"
72
cd "$(BINDIR)"; rm -f *camlp4*
78
bootstrap: backup promote clean all compare
79
bootstrap-debug: backup promote-debug clean all compare
81
backup restore boot-clean::
85
cp camlp4boot-debug.run boot/camlp4boot
88
cp camlp4boot.run boot/camlp4boot
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