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
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
default all-local: yam
|
|
|
|
$(YAM) -v all
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
opt: yam
|
|
|
|
$(YAM) -v opt
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
clean-local:
|
|
|
|
if test -x ../ocaml; then \
|
|
|
|
$(OCAML) build/build.ml -clean; \
|
|
|
|
else \
|
|
|
|
$(YAM) -v -clean; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
cleanall:
|
|
|
|
$(OCAML) build/build.ml -cleanall
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
install: yam
|
|
|
|
$(YAM) install
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
doc: yam
|
|
|
|
$(YAM) -v doc
|
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
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
DIRS=boot man
|
|
|
|
#DIRS=boot odyl lib camlp4 meta etc top ocpp man compile
|
2001-09-06 23:56:09 -07:00
|
|
|
|
2006-06-29 01:12:46 -07:00
|
|
|
all clean:
|
|
|
|
set -e; for i in $(SUBDIRS); do (cd $$i && $(MAKE) $@) || eval 'exit 1'; done
|
|
|
|
$(MAKE) $@-local
|
|
|
|
set -e; for i in $(SUBDIRS_LAST); do (cd $$i && $(MAKE) $@) || eval 'exit 1'; done
|
2002-07-19 07:53:56 -07:00
|
|
|
|
|
|
|
uninstall:
|
2003-07-10 05:27:00 -07:00
|
|
|
rm -rf "$(LIBDIR)/camlp4"
|
|
|
|
cd "$(BINDIR)"; rm -f *camlp4* odyl ocpp
|
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
|
|
|
|
|