From 00af0f90791ddf41d140321791a6255f20eecc16 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 19 Aug 2012 18:54:15 +0200 Subject: [PATCH] Makefile: fix some errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * targets.mk: Repair .PHONY target. Correctly group ORed parameters in find calls. Introduce $(CLEANDIRS) and use variable instead of literals. Have a command succeed at the end of `config-*ยด so that no spurious warning is given by make. --- targets.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/targets.mk b/targets.mk index ccb29d546..68bf289f8 100644 --- a/targets.mk +++ b/targets.mk @@ -5,6 +5,7 @@ DISTFILES_extra= Makefile request-assign-future.txt contrib etc LISPDIRS = lisp OTHERDIRS = doc etc +CLEANDIRS = contrib testing UTILITIES SUBDIRS = $(OTHERDIRS) $(LISPDIRS) INSTSUB = $(SUBDIRS:%=install-%) ORG_MAKE_DOC ?= info html pdf @@ -25,8 +26,7 @@ endif .PHONY: all oldorg update update2 up0 up1 up2 single $(SUBDIRS) \ check test install $(INSTSUB) \ info html pdf card refcard doc docs \ - autoloads cleanall clean \ - cleancontrib cleantesting cleanutils + autoloads cleanall clean $(CLEANDIRS:%=clean%) \ cleanrel clean-install cleanelc cleandirs \ cleanlisp cleandoc cleandocs cleantest \ compile compile-dirty uncompiled \ @@ -57,7 +57,7 @@ config-cmd config-all:: $(info ========= Commands used by make) $(foreach var,$(CONF_CALL),$(info $(var) = $($(var))$(EOL))) config config-test config-exe config-all:: - $(info ) + @echo "" oldorg: compile info # what the old makefile did when no target was specified uncompiled: cleanlisp autoloads # for developing @@ -123,11 +123,11 @@ clean: cleanrel $(MAKE) -C doc clean cleanall: cleandirs cleantest - -$(FIND) . -name \*~ -o -name \*# -o -name .#\* -exec $(RM) {} \; - -$(FIND) contrib testing UTILITIES -name \*~ -o -name \*.elc -exec $(RM) {} \; + -$(FIND) . \( -name \*~ -o -name \*# -o -name .#\* \) -exec $(RM) {} \; + -$(FIND) $(CLEANDIRS) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \; -cleancontrib cleantesting cleanUTILITIES: - -$(FIND) $(@:clean%=%) -name \*~ -o -name \*.elc -exec $(RM) {} \; +$(CLEANDIRS:%=clean%): + -$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \; cleanutils: cleanUTILITIES @@ -139,10 +139,10 @@ cleanrel: cleanelc: $(MAKE) -C lisp $@ -cleanlisp: - $(MAKE) -C lisp clean +cleanlisp cleandoc: + $(MAKE) -C $(@:clean%=%) clean -cleandoc cleandocs: +cleandocs: $(MAKE) -C doc clean -$(FIND) doc -name \*~ -exec $(RM) {} \;