2001-09-07 00:55:07 -07:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include ../config/Makefile
|
|
|
|
|
|
|
|
INCLUDES=-I ../camlp4 -I ../boot -I $(OTOP)/utils
|
2002-01-20 07:12:32 -08:00
|
|
|
OCAMLCFLAGS=-warn-error A $(INCLUDES)
|
2001-09-07 00:55:07 -07:00
|
|
|
OBJS=q_MLast.cmo pa_r.cmo pa_rp.cmo pa_extend.cmo pa_extend_m.cmo pa_ifdef.cmo pr_dump.cmo
|
|
|
|
CAMLP4RM=pa_r.cmo pa_rp.cmo pr_dump.cmo
|
2001-09-28 18:08:35 -07:00
|
|
|
CAMLP4RMX=pa_r.cmx pa_rp.cmx pr_dump.cmx
|
2001-09-07 00:55:07 -07:00
|
|
|
SHELL=/bin/sh
|
|
|
|
COUT=$(OBJS) camlp4r$(EXE)
|
|
|
|
COPT=camlp4r.opt
|
|
|
|
|
|
|
|
all: $(COUT)
|
|
|
|
opt: $(COPT)
|
|
|
|
|
|
|
|
camlp4r$(EXE): ../camlp4/camlp4$(EXE) $(CAMLP4RM)
|
|
|
|
rm -f camlp4r$(EXE)
|
|
|
|
cd ../camlp4; $(MAKE) OTOP=$(OTOP) CAMLP4=../meta/camlp4r$(EXE) CAMLP4M="-I ../meta $(CAMLP4RM)"
|
|
|
|
|
|
|
|
camlp4r.opt: $(CAMLP4RMX)
|
|
|
|
rm -f camlp4r.opt
|
2001-09-10 02:56:14 -07:00
|
|
|
cd ../camlp4; $(MAKE) optp4 OTOP=$(OTOP) CAMLP4OPT=../meta/camlp4r.opt CAMLP4M="-I ../meta $(CAMLP4RMX)"
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f *.cm* *.pp[io] *.o *.bak .*.bak $(COUT) $(COPT)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
cp .depend .depend.bak
|
|
|
|
> .depend
|
|
|
|
@for i in *.mli *.ml; do \
|
|
|
|
../tools/apply.sh pr_depend.cmo -- $(INCLUDES) $$i | \
|
2001-09-07 07:53:06 -07:00
|
|
|
sed -e 's| \.\./\.\.| $$(OTOP)|g' >> .depend; \
|
2001-09-07 00:55:07 -07:00
|
|
|
done
|
|
|
|
|
|
|
|
promote:
|
2002-07-19 07:53:56 -07:00
|
|
|
cp $(COUT) pa_extend.cmi ../boot/.
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
compare:
|
|
|
|
@for j in $(COUT); do \
|
|
|
|
if cmp $$j ../boot/$$j; then :; else exit 1; fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install:
|
2001-12-24 02:21:09 -08:00
|
|
|
-$(MKDIR) $(LIBDIR)/camlp4 $(BINDIR)
|
|
|
|
cp $(OBJS) $(LIBDIR)/camlp4/.
|
2002-07-19 07:53:56 -07:00
|
|
|
cp pa_ifdef.cmi pa_extend.cmi $(LIBDIR)/camlp4/.
|
2001-09-07 00:55:07 -07:00
|
|
|
cp camlp4r$(EXE) $(BINDIR)/.
|
|
|
|
if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
|
|
|
|
|
|
|
|
include .depend
|