2006-09-20 04:14:37 -07:00
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# Objective Caml #
|
|
|
|
# #
|
|
|
|
# Nicolas Pouillard, projet Gallium, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 2006 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the Q Public License version 1.0. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
2001-09-06 23:56:09 -07:00
|
|
|
# $Id$
|
|
|
|
|
2006-09-20 09:08:04 -07:00
|
|
|
# RELEASE NOTE:
|
|
|
|
# Do not forget to call make genclean to update Makefile.clean before a
|
|
|
|
# release.
|
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
OCAMLRUN=CAML_LD_LIBRARY_PATH=../otherlibs/unix ../boot/ocamlrun
|
|
|
|
OCAML=$(OCAMLRUN) ../ocaml -I ../stdlib -I ../otherlibs/unix
|
|
|
|
YAM=$(OCAMLRUN) ./yam
|
2006-07-27 09:39:50 -07:00
|
|
|
YAM_OPTIONS=-verbosity '$(VERBOSE)'
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-07-18 08:05:10 -07:00
|
|
|
default: all
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-09-08 06:01:06 -07:00
|
|
|
opt install doc all pack just_doc: yam
|
2006-07-27 09:39:50 -07:00
|
|
|
@echo 'YAM $@ (use "make $@ VERBOSE=1" for a verbose make)'
|
2006-07-18 08:05:10 -07:00
|
|
|
@$(YAM) $(YAM_OPTIONS) $@
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-09-20 08:39:30 -07:00
|
|
|
genclean: yam
|
|
|
|
$(YAM) -genclean Makefile.clean
|
|
|
|
|
2006-07-18 08:05:10 -07:00
|
|
|
clean:
|
2006-09-20 08:39:30 -07:00
|
|
|
if test -x ../boot/ocamlrun; then \
|
|
|
|
if test -x ../ocaml; then \
|
|
|
|
$(OCAML) build/build.ml -clean; \
|
|
|
|
else \
|
|
|
|
if test -x ./yam; then \
|
|
|
|
$(YAM) $(YAM_OPTIONS) -clean; \
|
|
|
|
else \
|
|
|
|
$(MAKE) staticclean; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
2006-06-29 01:12:46 -07:00
|
|
|
else \
|
2006-09-20 08:39:30 -07:00
|
|
|
$(MAKE) staticclean; \
|
2006-06-29 01:12:46 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
cleanall:
|
|
|
|
$(OCAML) build/build.ml -cleanall
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-09-20 08:39:30 -07:00
|
|
|
staticclean:
|
|
|
|
rm -f $(CLEANFILES)
|
|
|
|
|
2006-07-04 08:27:34 -07:00
|
|
|
yam: build/build.ml
|
|
|
|
$(OCAML) build/build.ml
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2002-07-19 07:53:56 -07:00
|
|
|
uninstall:
|
2003-07-10 05:27:00 -07:00
|
|
|
rm -rf "$(LIBDIR)/camlp4"
|
2006-07-18 08:05:10 -07:00
|
|
|
cd "$(BINDIR)"; rm -f *camlp4*
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-09-20 04:14:37 -07:00
|
|
|
depend:
|
|
|
|
|
2001-09-06 23:56:09 -07:00
|
|
|
# Normal bootstrap
|
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
bootstrap: backup promote clean all compare
|
|
|
|
bootstrap-debug: backup promote-debug clean all compare
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
backup restore boot-clean::
|
|
|
|
cd boot && $(MAKE) $@
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
promote-debug:
|
|
|
|
cp camlp4boot-debug.run boot/camlp4boot
|
2001-09-06 23:56:09 -07:00
|
|
|
|
|
|
|
promote:
|
2006-06-29 01:12:46 -07:00
|
|
|
cp camlp4boot.run boot/camlp4boot
|
2001-09-06 23:56:09 -07:00
|
|
|
|
|
|
|
compare:
|
2006-06-29 01:12:46 -07:00
|
|
|
@if (cmp camlp4boot.run boot/camlp4boot); \
|
2001-09-06 23:56:09 -07:00
|
|
|
then echo "Fixpoint reached, bootstrap succeeded."; \
|
|
|
|
else echo "Fixpoint not reached, try one more bootstrapping cycle."; \
|
|
|
|
fi
|
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
.PHONY: clean install all uninstall backup restore boot-clean promote-debug \
|
2006-09-20 04:14:37 -07:00
|
|
|
promote compare opt doc cleanall all-local clean-local depend
|
2006-06-29 01:12:46 -07:00
|
|
|
|
2006-09-20 08:39:30 -07:00
|
|
|
-include Makefile.clean
|