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-09-28 14:37:43 -07:00
|
|
|
OCAMLC=../boot/ocamlrun ../ocamlc -nostdlib \
|
|
|
|
-I ../stdlib -I ../otherlibs/unix -I ../otherlibs/win32unix -I build -g
|
2006-09-28 06:30:03 -07:00
|
|
|
OCAMLRUN=../boot/ocamlrun -I ../otherlibs/unix -I ../otherlibs/win32unix
|
2006-06-29 01:12:46 -07:00
|
|
|
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-10-02 04:03:31 -07:00
|
|
|
smartclean::
|
|
|
|
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; \
|
|
|
|
else \
|
|
|
|
rm -f $(CLEANFILES); \
|
|
|
|
fi
|
|
|
|
|
2006-09-20 08:39:30 -07:00
|
|
|
genclean: yam
|
|
|
|
$(YAM) -genclean Makefile.clean
|
2006-11-24 06:39:26 -08:00
|
|
|
(echo /Camlp4Ast.ml/d; echo w; echo q) | ed Makefile.clean
|
2006-09-20 08:39:30 -07:00
|
|
|
|
2006-09-28 14:37:43 -07:00
|
|
|
clean::
|
2006-10-02 05:59:01 -07:00
|
|
|
rm -f yam .cache-status
|
2006-09-28 14:37:43 -07:00
|
|
|
rm -f $(CLEANFILES)
|
2006-10-02 05:59:01 -07:00
|
|
|
rm -f *.cm[io] build/*.cm[io]
|
2006-06-29 01:12:46 -07:00
|
|
|
|
2006-09-28 14:37:43 -07:00
|
|
|
YAM_OBJS=build/YaM.cmo build/camlp4_config.cmo Makefile.cmo
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-09-28 14:37:43 -07:00
|
|
|
yam: $(YAM_OBJS)
|
|
|
|
$(OCAMLC) -o yam unix.cma $(YAM_OBJS)
|
|
|
|
|
|
|
|
.SUFFIXES: .mli .ml .cmi .cmo
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(OCAMLC) -c $*.mli
|
|
|
|
.ml.cmo:
|
|
|
|
$(OCAMLC) -c $*.ml
|
2006-09-20 08:39:30 -07:00
|
|
|
|
2006-09-28 14:37:43 -07:00
|
|
|
build/YaM.cmo: build/YaM.cmi
|
|
|
|
Makefile.cmo: build/YaM.cmi build/camlp4_config.cmo
|
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-10-02 05:59:01 -07:00
|
|
|
promote compare opt doc smartclean depend
|
2006-06-29 01:12:46 -07:00
|
|
|
|
2006-09-28 14:37:43 -07:00
|
|
|
include Makefile.clean
|