summaryrefslogtreecommitdiffstats
path: root/camlp4/Makefile
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2006-09-20 15:39:30 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2006-09-20 15:39:30 +0000
commit5524a775d5f6d4e531c507475156fc7507ba26f9 (patch)
treef04673a66cfc45b75101e4d6ca122843b6fe8147 /camlp4/Makefile
parentfbea66a95e1d890799b6b573bcd0131558b9ba92 (diff)
[camlp4] Improve and debug the clean target. No longer use the Unix module on Windows in Camlp4Printers.Auto
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7620 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/Makefile')
-rw-r--r--camlp4/Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/camlp4/Makefile b/camlp4/Makefile
index 302b12ebf..266242de5 100644
--- a/camlp4/Makefile
+++ b/camlp4/Makefile
@@ -23,19 +23,30 @@ opt install doc all pack just_doc: yam
@echo 'YAM $@ (use "make $@ VERBOSE=1" for a verbose make)'
@$(YAM) $(YAM_OPTIONS) $@
+genclean: yam
+ $(YAM) -genclean Makefile.clean
+
clean:
- if test -x ../ocaml; then \
- $(OCAML) build/build.ml -clean; \
+ if test -x ../boot/ocamlrun; then \
+ if test -x ../ocaml; then \
+ $(OCAML) build/build.ml -clean; \
+ else \
+ if test -x ./yam; then \
+ $(YAM) $(YAM_OPTIONS) -clean; \
+ else \
+ $(MAKE) staticclean; \
+ fi; \
+ fi; \
else \
- if test -x $(YAM); then \
- $(YAM) $(YAM_OPTIONS) -clean; \
- else : ; \
- fi; \
+ $(MAKE) staticclean; \
fi
cleanall:
$(OCAML) build/build.ml -cleanall
+staticclean:
+ rm -f $(CLEANFILES)
+
yam: build/build.ml
$(OCAML) build/build.ml
@@ -68,3 +79,4 @@ compare:
.PHONY: clean install all uninstall backup restore boot-clean promote-debug \
promote compare opt doc cleanall all-local clean-local depend
+-include Makefile.clean