X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Ftarget.mk;h=6a0b5aa8a8eaaeab46085d14b4c45dc6adc77682;hb=b5277a2b1798deeb048ec014ef022ec07dc05c9b;hp=ab425a6f29e89d95ae817073f25611c432218494;hpb=56fcabed076920b9067cb435ee3f2d2fd458ec8c;p=ghc-hetmet.git diff --git a/mk/target.mk b/mk/target.mk index ab425a6..6a0b5aa 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -337,7 +337,6 @@ HC_SPLIT_POST = \ echo "INPUT(" *.$(way_)o ")" >>ld.script; \ $(LD) -r $(LD_X) -o ../$(notdir $@) ld.script; \ ) -CLEAN_FILES += *_split/ld.script else HC_SPLIT_POST = \ ( cd $(basename $@)_split; \ @@ -358,7 +357,7 @@ SRC_HC_POST_OPTS += $(HC_SPLIT_POST); # extraclean :: - $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' -print | xargs $(RM) __rm_food + $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' -print -o -name ld.script -print | xargs $(RM) __rm_food -rmdir $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) > /dev/null 2>&1 endif # $(SplitObjs) @@ -794,6 +793,9 @@ install:: $(INSTALL_LIBEXECS) @$(INSTALL_DIR) $(libexecdir) -for i in $(INSTALL_LIBEXECS); do \ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(libexecdir); \ + if test "$(darwin_TARGET_OS)" = "1"; then \ + sh $(FPTOOLS_TOP)/mk/fix_install_names.sh $(libdir) $(libexecdir)/`basename $$i` ; \ + fi ; \ done endif @@ -1032,6 +1034,11 @@ maintainer-clean:: extraclean # Expects: $(WAYS) the possible "way" strings to one of # which $(way) will be set +ifneq "$(way)" "" +ifeq "$(findstring $(way), $(WAYS))" "" +$(error Unknown way $(way)) +endif +endif # So how does $(way) ever get set to anything? Answer, we recursively # invoke make, setting $(way) on the command line. @@ -1161,7 +1168,7 @@ endif # the --no-print-directory flag which is passed to recursive # invocations of make. # -#ifeq "$(way)" "" +ifeq "$(way)" "" ifneq "$(SUBDIRS)" "" # we override the 'boot', 'all' and 'install' targets in the top @@ -1208,7 +1215,7 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main @echo "------------------------------------------------------------------------" endif -#endif +endif # # Selectively building subdirectories.