ocaml/camlp4/Makefile

61 lines
1.3 KiB
Makefile
Raw Normal View History

# $Id$
OCAMLRUN=CAML_LD_LIBRARY_PATH=../otherlibs/unix ../boot/ocamlrun
OCAML=$(OCAMLRUN) ../ocaml -I ../stdlib -I ../otherlibs/unix
YAM=$(OCAMLRUN) ./yam
ifeq ($(VERBOSE),1)
YAM_OPTIONS=-v
else
YAM_OPTIONS=-q
endif
default: all
opt install doc all: yam
@echo 'YAM: $(YAM_OPTIONS) $@ (use "make $@ VERBOSE=1" for a verbose make)'
@$(YAM) $(YAM_OPTIONS) $@
clean:
if test -x ../ocaml; then \
$(OCAML) build/build.ml -clean; \
else \
if test -x $(YAM); then \
$(YAM) $(YAM_OPTIONS) -clean; \
else : ; \
fi; \
fi
cleanall:
$(OCAML) build/build.ml -cleanall
yam: build/build.ml
$(OCAML) build/build.ml
uninstall:
rm -rf "$(LIBDIR)/camlp4"
cd "$(BINDIR)"; rm -f *camlp4*
# Normal bootstrap
bootstrap: backup promote clean all compare
bootstrap-debug: backup promote-debug clean all compare
backup restore boot-clean::
cd boot && $(MAKE) $@
promote-debug:
cp camlp4boot-debug.run boot/camlp4boot
promote:
cp camlp4boot.run boot/camlp4boot
compare:
@if (cmp camlp4boot.run boot/camlp4boot); \
then echo "Fixpoint reached, bootstrap succeeded."; \
else echo "Fixpoint not reached, try one more bootstrapping cycle."; \
fi
.PHONY: clean install all uninstall backup restore boot-clean promote-debug \
promote compare opt doc cleanall all-local clean-local