108 lines
3.8 KiB
Makefile
108 lines
3.8 KiB
Makefile
# $Id$
|
|
|
|
include ../config/Makefile
|
|
|
|
INCLUDES=-I ../camlp4 -I ../boot -I $(OTOP)/lex
|
|
OCAMLCFLAGS=-warn-error A $(INCLUDES)
|
|
OBJS=q_phony.cmo pa_o.cmo pa_op.cmo pa_oop.cmo pa_ru.cmo pa_format.cmo pa_olabl.cmo pa_sml.cmo pa_lisp.cmo pa_scheme.cmo pa_extfold.cmo pa_extfun.cmo pa_fstream.cmo pa_lefteval.cmo pa_ifdef.cmo pr_r.cmo pr_rp.cmo pr_o.cmo pr_op.cmo pr_scheme.cmo pr_schemep.cmo pr_extend.cmo pr_extfun.cmo pr_null.cmo pr_depend.cmo
|
|
OBJSX=$(OBJS:.cmo=.cmx)
|
|
INTF=pa_o.cmi
|
|
CAMLP4OM=pa_o.cmo pa_op.cmo ../meta/pr_dump.cmo
|
|
CAMLP4OMX=$(CAMLP4OM:.cmo=.cmx)
|
|
CAMLP4SCHM=pa_scheme.cmo ../meta/pr_dump.cmo
|
|
SHELL=/bin/sh
|
|
COUT=$(OBJS) camlp4o$(EXE) camlp4sch$(EXE)
|
|
COPT=$(OBJSX) camlp4o.opt
|
|
|
|
all: $(COUT) mkcamlp4.sh
|
|
opt: $(COPT)
|
|
|
|
pr_rp.cmo: parserify.cmo pr_rp_main.cmo
|
|
$(OCAMLC) parserify.cmo pr_rp_main.cmo -a -o $@
|
|
|
|
pr_op.cmo: parserify.cmo pr_op_main.cmo
|
|
$(OCAMLC) parserify.cmo pr_op_main.cmo -a -o $@
|
|
|
|
pr_schemep.cmo: parserify.cmo pr_schp_main.cmo
|
|
$(OCAMLC) parserify.cmo pr_schp_main.cmo -a -o $@
|
|
|
|
pr_rp.cmx: parserify.cmx pr_rp_main.cmx
|
|
$(OCAMLOPT) parserify.cmx pr_rp_main.cmx -a -o $@
|
|
|
|
pr_op.cmx: parserify.cmx pr_op_main.cmx
|
|
$(OCAMLOPT) parserify.cmx pr_op_main.cmx -a -o $@
|
|
|
|
pr_schemep.cmx: parserify.cmx pr_schp_main.cmx
|
|
$(OCAMLOPT) parserify.cmx pr_schp_main.cmx -a -o $@
|
|
|
|
camlp4o$(EXE): ../camlp4/camlp4$(EXE) $(CAMLP4OM)
|
|
rm -f camlp4o$(EXE)
|
|
cd ../camlp4; $(MAKE) CAMLP4=../etc/camlp4o$(EXE) CAMLP4M="-I ../etc $(CAMLP4OM)"
|
|
|
|
camlp4sch$(EXE): ../camlp4/camlp4$(EXE) $(CAMLP4SCHM)
|
|
rm -f camlp4sch$(EXE)
|
|
cd ../camlp4; $(MAKE) CAMLP4=../etc/camlp4sch$(EXE) CAMLP4M="-I ../etc $(CAMLP4SCHM)"
|
|
|
|
camlp4o.opt: $(CAMLP4OMX)
|
|
rm -f camlp4o.opt
|
|
cd ../camlp4; $(MAKE) optp4 CAMLP4OPT=../etc/camlp4o.opt CAMLP4M="-I ../etc $(CAMLP4OMX)"
|
|
|
|
mkcamlp4.sh: mkcamlp4.sh.tpl
|
|
sed -e "s!LIBDIR!$(LIBDIR)!g" mkcamlp4.sh.tpl > mkcamlp4.sh
|
|
|
|
pa_ocamllex.cma: pa_ocamllex.cmo
|
|
$(OCAMLC) -I $(OTOP)/lex cset.cmo syntax.cmo table.cmo lexgen.cmo compact.cmo pa_ocamllex.cmo -a -o pa_ocamllex.cma
|
|
|
|
bootstrap_scheme:
|
|
@$(MAKE) bootstrap_l L=scheme | grep -v directory
|
|
compare_scheme:
|
|
@$(MAKE) compare_l L=scheme | grep -v directory
|
|
bootstrap_lisp:
|
|
@$(MAKE) bootstrap_l L=lisp | grep -v directory
|
|
compare_lisp:
|
|
@$(MAKE) compare_l L=lisp | grep -v directory
|
|
|
|
bootstrap_l:
|
|
../boot/camlp4 ./pa_$Lr.cmo ./q_phony.cmo -I ../boot pa_extend.cmo ./pr_r.cmo ./pr_extend.cmo ./pr_rp.cmo pa_$L.ml > tmp
|
|
mv pa_$Lr.ml pa_$Lr.ml.old
|
|
sed -e 's/^;; \(.*\)$$/(* \1 *)/' -e 's/^; \(.*\)$$/(* \1 *)/' -e 's|./pa_$Lr.cmo|pa_r.cmo pa_rp.cmo|' -e 's/$$Id.*\$$/File generated by pretty print; do not edit!/' tmp > pa_$Lr.ml
|
|
rm -f tmp
|
|
|
|
compare_l:
|
|
../boot/camlp4 ./pa_$Lr.cmo ./q_phony.cmo -I ../boot pa_extend.cmo ./pr_r.cmo ./pr_extend.cmo ./pr_rp.cmo pa_$L.ml | sed -e 's/^;; \(.*\)$$/(* \1 *)/' -e 's/^; \(.*\)$$/(* \1 *)/' -e 's|./pa_$Lr.cmo|pa_r.cmo pa_rp.cmo|' -e 's/$$Id.*\$$/File generated by pretty print; do not edit!/' | diff -c pa_$Lr.ml -
|
|
|
|
clean::
|
|
rm -f *.cm* *.pp[io] *.o *.bak .*.bak *.out *.opt
|
|
rm -f mkcamlp4.sh camlp4o$(EXE) camlp4sch$(EXE)
|
|
|
|
depend:
|
|
cp .depend .depend.bak
|
|
> .depend
|
|
@for i in *.mli *.ml; do \
|
|
../tools/apply.sh pr_depend.cmo -- $(INCLUDES) $$i | \
|
|
sed -e 's| \.\./\.\.| $$(OTOP)|g' >> .depend; \
|
|
done
|
|
|
|
get_promote:
|
|
|
|
install:
|
|
-$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
|
|
cp $(OBJS) "$(LIBDIR)/camlp4/."
|
|
cp $(INTF) "$(LIBDIR)/camlp4/."
|
|
cp lib.sml "$(LIBDIR)/camlp4/."
|
|
cp camlp4o$(EXE) camlp4sch$(EXE) "$(BINDIR)/."
|
|
if test -f camlp4o.opt; then cp camlp4o.opt "$(BINDIR)/camlp4o.opt$(EXE)"; cp $(OBJSX) $(OBJSX:.cmx=.o) "$(LIBDIR)/camlp4/."; fi
|
|
cp mkcamlp4.sh "$(BINDIR)/mkcamlp4"
|
|
chmod a+x "$(BINDIR)/mkcamlp4"
|
|
|
|
pa_lisp.cmo: pa_lispr.cmo
|
|
pa_scheme.cmo: pa_schemer.cmo
|
|
pa_ocamllex.cmo: pa_o.cmo
|
|
pr_extend.cmo: pa_extfun.cmo
|
|
pr_o.cmo: pa_extfun.cmo
|
|
pr_op.cmo: pa_extfun.cmo
|
|
pr_r.cmo: pa_extfun.cmo
|
|
pr_rp.cmo: pa_extfun.cmo
|
|
|
|
include .depend
|