From e6afa737d4bcc1c7973cd46094e824b875fede11 Mon Sep 17 00:00:00 2001 From: coq Date: Tue, 1 Oct 2002 07:52:25 +0000 Subject: Cool dev/Makefile's git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3054 85f007b7-540e-0410-9357-904b9bb8a0f7 --- dev/Makefile.dir | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'dev/Makefile.dir') diff --git a/dev/Makefile.dir b/dev/Makefile.dir index 163f848ad5..80fe5834c6 100644 --- a/dev/Makefile.dir +++ b/dev/Makefile.dir @@ -50,11 +50,13 @@ list: clean:: rm -f *.cmi *.cmo *.cmx *.o + # if grammar.cmo files cannot be compiled and main .depend cannot be # rebuilt, this is quite useful depend: (cd $(TOPDIR); ocamldep -I $(BASEDIR) $(BASEDIR)/*.ml $(BASEDIR)/*.mli > .depend.devel) + # displays the dependency graph of the current directory (vertically, # unlike in doc/) graph: @@ -95,7 +97,22 @@ pretty: depend.ps # gv -spartan $< & -# this is not perfect bot mostly WORKS! It just calls the main makefile + +# generating file.ml.mli by tricking make to pass -i to ocamlc + +%.ml.mli: FORCE + @(cmo=`basename $@ .ml.mli`.cmo ; \ + mv -f $$cmo $$cmo.tmp ; \ + $(MAKE) -s -C $(TOPDIR) $(BASEDIR)/$$cmo CAMLDEBUG=-i > $@ ; \ + echo Generated interface file $@ ; \ + mv -f $$cmo.tmp $$cmo) + +FORCE: + +clean:: + rm -f *.ml.mli + +# this is not perfect but mostly WORKS! It just calls the main makefile %.cmi: *.mli $(MAKE) -C $(TOPDIR) $(BASEDIR)/$@ -- cgit v1.2.3