X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=155e7bd438eabfd56dd5d5aedb0e93e34747ca9b;hb=364193a015565b043c5d0417750b023af6760c4f;hp=7a49c354170a4c04c66135324e81ccfcbd890018;hpb=ec968a32e9b02c230dfcbff9660c3e61900d8235;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index 7a49c35..155e7bd 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -2,24 +2,24 @@ # # target.mk # -# Standard targets for fptools +# Standard targets for GHC # ################################################################################# # # This file contain three groups of target rules: # -# 1. FPtools targets +# 1. GHC targets # depend* # runtests* # # 2. GNU standard targets # all* -# install* uninstall installcheck installdirs +# install* installcheck installdirs # install-docs* # clean* distclean* mostlyclean* maintainer-clean* # tags* -# dvi ps (no info) FPTOOLS adds: pdf rtf html chm HxS +# dvi ps (no info) GHC adds: pdf rtf html chm HxS # check # # 3. Some of the above targets have a version that @@ -50,7 +50,7 @@ include $(TOP)/mk/package.mk include $(TOP)/mk/suffix.mk ################################################################## -# FPtools standard targets +# GHC standard targets # # depend: # @@ -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 @@ -202,7 +197,7 @@ endif # directories where files are installed, and their parent # directories. There is a script called `mkinstalldirs' which is # convenient for this; find it in the Texinfo package. -# (FPTOOLS: we use a close relative of the suggested script, situated +# (GHC: we use a close relative of the suggested script, situated # in glafp-utils/mkdirhier -- SOF) @@ -373,7 +368,7 @@ SRC_BLD_DLL_OPTS += --export-all --output-def=HS$(PACKAGE)$(_cbits)$(_way).def D ifneq "$(PACKAGE) $(IS_CBITS_LIB)" "std YES" ifneq "$(PACKAGE)" "rts" SRC_BLD_DLL_OPTS += -lHSstd_cbits_imp -L$(GHC_LIB_DIR)/std/cbits -SRC_BLD_DLL_OPTS += -lHSrts_$(way_)imp -L$(GHC_RUNTIME_DIR) +SRC_BLD_DLL_OPTS += -lHSrts_$(way_)imp -L$(GHC_RTS_DIR) ifneq "$(PACKAGE)" "std" ifeq "$(IS_CBITS_LIB)" "" SRC_BLD_DLL_OPTS += -lHSstd_$(way_)imp -L$(GHC_LIB_DIR)/std @@ -382,7 +377,7 @@ endif endif endif -SRC_BLD_DLL_OPTS += -lgmp -L. -L$(GHC_RUNTIME_DIR)/gmp +SRC_BLD_DLL_OPTS += -lgmp -L. -L$(GHC_RTS_DIR)/gmp ifeq "$(IS_CBITS_LIB)" "" SRC_BLD_DLL_OPTS += $(patsubst %,-lHS%_$(way_)imp, $(PACKAGE_DEPS)) SRC_BLD_DLL_OPTS += $(patsubst %,-L../%, $(PACKAGE_DEPS)) @@ -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 @@ -1077,21 +1043,21 @@ ifeq "$(way)" "" # since these are way-independent all docs TAGS clean distclean mostlyclean maintainer-clean install :: @echo "------------------------------------------------------------------------" - @echo "===fptools== Recursively making \`$@' for ways: $(WAYS) ..." + @echo "== 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; \ + 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 "== $(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 "== Finished recursively making \`$@' for ways: $(WAYS) ..." @echo "PWD = $(shell pwd)" @echo "------------------------------------------------------------------------" @@ -1171,21 +1137,27 @@ endif $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean maintainer-clean $(INSTALL_TARGET) $(INSTALL_DOCS_TARGET) html chm HxS ps dvi txt:: @echo "------------------------------------------------------------------------" - @echo "===fptools== Recursively making \`$@' in $(SUBDIRS) ..." + @echo "== Recursively making \`$@' in $(SUBDIRS) ..." @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; \ + 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 "==fptools== $(MAKE) $@ $(MFLAGS);"; \ + 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 "===fptools== Finished making \`$@' in $(SUBDIRS) ..." + @echo "== Finished making \`$@' in $(SUBDIRS) ..." @echo "PWD = $(shell pwd)" @echo "------------------------------------------------------------------------"