2001-09-06 23:56:09 -07:00
|
|
|
# $Id$
|
|
|
|
|
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-18 08:05:10 -07:00
|
|
|
ifeq ($(VERBOSE),1)
|
|
|
|
YAM_OPTIONS=-v
|
|
|
|
else
|
|
|
|
YAM_OPTIONS=-q
|
|
|
|
endif
|
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-07-18 08:05:10 -07:00
|
|
|
opt install doc all: yam
|
|
|
|
@echo 'YAM: $(YAM_OPTIONS) $@ (use "make $@ VERBOSE=1" for a verbose make)'
|
|
|
|
@$(YAM) $(YAM_OPTIONS) $@
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-07-18 08:05:10 -07:00
|
|
|
clean:
|
2006-06-29 01:12:46 -07:00
|
|
|
if test -x ../ocaml; then \
|
|
|
|
$(OCAML) build/build.ml -clean; \
|
|
|
|
else \
|
2006-07-07 07:19:43 -07:00
|
|
|
if test -x $(YAM); then \
|
2006-07-18 08:05:10 -07:00
|
|
|
$(YAM) $(YAM_OPTIONS) -clean; \
|
2006-07-07 07:19:43 -07:00
|
|
|
else : ; \
|
|
|
|
fi; \
|
2006-06-29 01:12:46 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
cleanall:
|
|
|
|
$(OCAML) build/build.ml -cleanall
|
2001-09-06 23:56:09 -07:00
|
|
|
|
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
|
|
|
|
|
|
|
# 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 \
|
|
|
|
promote compare opt doc cleanall all-local clean-local
|
|
|
|
|