[project @ 2000-04-27 10:16:13 by simonmar]
authorsimonmar <unknown>
Thu, 27 Apr 2000 10:16:13 +0000 (10:16 +0000)
committersimonmar <unknown>
Thu, 27 Apr 2000 10:16:13 +0000 (10:16 +0000)
sort out the clean targets.

- veryclean has gone away (don't know where it came from in the first
  place)

- the clean targets are now

mostlyclean <= clean <= distclean <= maintainer-clean

mk/target.mk

index 7afcf51..629930d 100644 (file)
@@ -80,7 +80,7 @@
 
 ifneq "$(SUBDIRS)" ""
 
-all docs runtests boot TAGS clean veryclean maintainer-clean install info html ps dvi txt::
+all docs runtests boot TAGS clean distclean mostlyclean maintainer-clean install info html ps dvi txt::
        @echo "------------------------------------------------------------------------"
        @echo "===fptools== Recursively making \`$@' in $(SUBDIRS) ..."
        @echo "PWD = $(shell pwd)"
@@ -143,35 +143,6 @@ $(SUBDIRS) ::
          $(MAKE) -C $@ $(MFLAGS)
 endif
 
-ifneq "$(WAYS)" ""
-ifeq "$(way)" ""
-
-# NB: the targets exclude 
-#      boot info TAGS runtests
-# since these are way-independent
-all docs TAGS clean veryclean maintainer-clean install ::
-       @echo "------------------------------------------------------------------------"
-       @echo "===fptools== Recursively making \`$@' for ways: $(WAYS) ..."
-       @echo "PWD = $(shell pwd)"
-       @echo "------------------------------------------------------------------------"
-# Don't rely on -e working, instead we check exit return codes from sub-makes.
-       @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
-       for i in $(WAYS) ; do \
-         echo "------------------------------------------------------------------------"; \
-         echo "==fptools== $(MAKE) way=$$i $@;"; \
-         echo "PWD = $(shell pwd)"; \
-         echo "------------------------------------------------------------------------"; \
-         $(MAKE) way=$$i --no-print-directory $(MFLAGS) $@ ; \
-         if [ $$? -eq 0 ] ; then true; else exit $$x_on_err; fi; \
-       done
-       @echo "------------------------------------------------------------------------"
-       @echo "===fptools== Finished recursively making \`$@' for ways: $(WAYS) ..."
-       @echo "PWD = $(shell pwd)"
-       @echo "------------------------------------------------------------------------"
-
-endif
-endif
-
 ##################################################################
 #              FPtools standard targets
 #
@@ -1070,31 +1041,28 @@ endif
 #
 ###########################################
 
-.PHONY: realclean mostlyclean clean distclean maintainer-clean
-
-# realclean is just a synonym for maintainer-clean
-realclean: maintainer-clean
-
+.PHONY: mostlyclean clean distclean maintainer-clean
 
 ifneq "$(MOSTLY_CLEAN_FILES)" ""
 mostlyclean::
        rm -f $(MOSTLY_CLEAN_FILES)
 endif
 
-ifneq "$(CLEAN_FILES)" ""
 clean:: mostlyclean
+ifneq "$(CLEAN_FILES)" ""
+clean::
        rm -f $(CLEAN_FILES)
 endif
 
-
+distclean:: clean
 ifneq "$(DIST_CLEAN_FILES)" ""
-distclean:: mostlyclean clean
+distclean::
        rm -f $(DIST_CLEAN_FILES)
 endif
 
-
+maintainer-clean:: distclean
 ifneq "$(MAINTAINER_CLEAN_FILES)" ""
-maintainer-clean:: mostlyclean clean distclean
+maintainer-clean:: 
        @echo 'This command is intended for maintainers to use; it'
        @echo 'deletes files that may need special tools to rebuild.'
        rm -f $(MAINTAINER_CLEAN_FILES)
@@ -1158,3 +1126,32 @@ $(LIB_WAY_TARGETS) :
        $(MAKE) $(MFLAGS) $@ way=$(subst .,,$(suffix $(subst _,.,$(basename $@))))
 
 endif  # if way
+
+ifneq "$(WAYS)" ""
+ifeq "$(way)" ""
+
+# NB: the targets exclude 
+#      boot runtests
+# since these are way-independent
+all docs TAGS clean distclean mostlyclean maintainer-clean install ::
+       @echo "------------------------------------------------------------------------"
+       @echo "===fptools== Recursively making \`$@' for ways: $(WAYS) ..."
+       @echo "PWD = $(shell pwd)"
+       @echo "------------------------------------------------------------------------"
+# Don't rely on -e working, instead we check exit return codes from sub-makes.
+       @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
+       for i in $(WAYS) ; do \
+         echo "------------------------------------------------------------------------"; \
+         echo "==fptools== $(MAKE) way=$$i $@;"; \
+         echo "PWD = $(shell pwd)"; \
+         echo "------------------------------------------------------------------------"; \
+         $(MAKE) way=$$i --no-print-directory $(MFLAGS) $@ ; \
+         if [ $$? -eq 0 ] ; then true; else exit $$x_on_err; fi; \
+       done
+       @echo "------------------------------------------------------------------------"
+       @echo "===fptools== Finished recursively making \`$@' for ways: $(WAYS) ..."
+       @echo "PWD = $(shell pwd)"
+       @echo "------------------------------------------------------------------------"
+
+endif
+endif