2001-09-07 00:55:07 -07:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include ../config/Makefile
|
|
|
|
|
|
|
|
INCLUDES=-I ../camlp4 -I ../boot -I $(OTOP)/utils
|
2004-11-30 10:57:04 -08:00
|
|
|
OCAMLCFLAGS=-warn-error A $(INCLUDES)
|
2003-07-10 05:28:35 -07:00
|
|
|
OBJS=q_MLast.cmo pa_r.cmo pa_rp.cmo pa_extend.cmo pa_extend_m.cmo pa_macro.cmo pr_dump.cmo
|
2003-07-14 10:59:30 -07:00
|
|
|
OBJSX=$(OBJS:.cmo=.cmx)
|
2001-09-07 00:55:07 -07:00
|
|
|
CAMLP4RM=pa_r.cmo pa_rp.cmo pr_dump.cmo
|
2003-07-14 10:59:30 -07:00
|
|
|
CAMLP4RMX=$(CAMLP4RM:.cmo=.cmx)
|
2001-09-07 00:55:07 -07:00
|
|
|
SHELL=/bin/sh
|
|
|
|
COUT=$(OBJS) camlp4r$(EXE)
|
2003-10-30 01:52:55 -08:00
|
|
|
COPT=$(OBJSX) camlp4r.opt
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
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:
|
2003-07-10 05:28:35 -07:00
|
|
|
-$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
|
|
|
|
cp $(OBJS) "$(LIBDIR)/camlp4/."
|
|
|
|
cp pa_macro.cmi pa_extend.cmi "$(LIBDIR)/camlp4/."
|
|
|
|
cp camlp4r$(EXE) "$(BINDIR)/."
|
2003-07-15 02:14:00 -07:00
|
|
|
if test -f camlp4r.opt; then \
|
2003-08-29 05:15:15 -07:00
|
|
|
cp camlp4r.opt "$(BINDIR)/camlp4r.opt$(EXE)" ;\
|
2004-07-13 05:19:15 -07:00
|
|
|
cp $(OBJSX) "$(LIBDIR)/camlp4/."; \
|
|
|
|
for file in $(OBJSX); do \
|
|
|
|
cp "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \
|
|
|
|
done ; \
|
2003-07-15 02:14:00 -07:00
|
|
|
fi
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
include .depend
|