X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=155e7bd438eabfd56dd5d5aedb0e93e34747ca9b;hb=fb570f4ae8d02ad25475d97d019cb93bf64d4d99;hp=0334896b3fabf8d3725ebba053ea6cc30bab3224;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index 0334896..155e7bd 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -15,7 +15,7 @@ # # 2. GNU standard targets # all* -# install* uninstall installcheck installdirs +# install* installcheck installdirs # install-docs* # clean* distclean* mostlyclean* maintainer-clean* # tags* @@ -134,11 +134,6 @@ endif # will ignore any errors. This is in case there are systems that # don't have the Unix man page documentation system installed. # -# `uninstall' -# Delete all the installed files that the `install' target would -# create (but not the noninstalled files such as `make all' would -# create). -# # `clean' # # Delete all files from the current directory that are normally @@ -625,7 +620,7 @@ endif # LINK ########################################### # -# Targets: install install-strip uninstall +# Targets: install install-strip # ########################################### @@ -647,7 +642,7 @@ endif # LINK # friends can be overridden from their original settings in mk/config.mk.in # || mk/build.mk # -.PHONY: install install-docs installdirs install-strip install-dirs uninstall install-docs show-install +.PHONY: install install-docs installdirs install-strip install-dirs install-docs show-install show-install : @echo "bindir = $(bindir)" @@ -838,35 +833,6 @@ endif endif # -# Use with care.. -# -uninstall:: - @for i in $(INSTALL_PROGS) "" ; do \ - if test "$$i"; then \ - echo rm -f $(bindir)/`basename $$i`; \ - rm -f $(bindir)/`basename $$i`; \ - fi; \ - done - @for i in $(INSTALL_LIBS) ""; do \ - if test "$$i"; then \ - echo rm -f $(libdir)/`basename $$i`; \ - rm -f $(libdir)/`basename $$i`; \ - fi; \ - done - @for i in $(INSTALL_LIBEXECS) ""; do \ - if test "$$i"; then \ - echo rm -f $(libexecdir)/`basename $$i`; \ - rm -f $(libexecdir)/`basename $$i`; \ - fi; \ - done - @for i in $(INSTALL_DATAS) ""; do \ - if test "$$i"; then \ - echo rm -f $(datadir)/`basename $$i`; \ - rm -f $(datadir)/`basename $$i`; \ - fi; \ - done - -# # install-strip is from the GNU Makefile standard. # ifneq "$(way)" "" @@ -1069,7 +1035,7 @@ endif # ------------------------------------------------------------------------- # Rules to invoke the current target recursively for each way -ifneq "$(WAYS)" "" +ifneq "$(strip $(WAYS))" "" ifeq "$(way)" "" # NB: the targets exclude @@ -1081,7 +1047,7 @@ all docs TAGS clean distclean mostlyclean maintainer-clean install :: @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; \ + 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 "== $(MAKE) way=$$i $@;"; \ @@ -1176,13 +1142,19 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main @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; \ + if [ $$x_on_err -eq 0 ]; \ + then echo "Won't exit on error due to MFLAGS: ${MFLAGS}"; \ + fi; \ for i in $(SUBDIRS); do \ echo "------------------------------------------------------------------------"; \ echo "== $(MAKE) $@ $(MFLAGS);"; \ echo " in $(shell pwd)/$$i"; \ echo "------------------------------------------------------------------------"; \ $(MAKE) --no-print-directory -C $$i $(MFLAGS) $@; \ - if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ; then true; else exit 1; fi; \ + if [ $$? -eq 0 -o $$x_on_err -eq 0 ]; \ + then echo "Finished making $@ in $$i": $$?; \ + else echo "Failed making $@ in $$i": $$?; exit 1; \ + fi; \ done @echo "------------------------------------------------------------------------" @echo "== Finished making \`$@' in $(SUBDIRS) ..."