ifneq "$(SUBDIRS)" ""
-all docs runtests boot TAGS clean distclean mostlyclean maintainer-clean install html ps dvi txt::
+# we override the boot & all targets in the top level Makefile
+ifneq "$(NO_ALL_TARGETS)" "YES"
+ALL = all
+BOOT = boot
+INSTALL = install
+endif
+
+$(ALL) docs runtests $(BOOT) TAGS clean distclean mostlyclean maintainer-clean $(INSTALL) html ps dvi txt::
@echo "------------------------------------------------------------------------"
@echo "===fptools== Recursively making \`$@' in $(SUBDIRS) ..."
@echo "PWD = $(shell pwd)"
GHCI_LIBOBJS = $(LIBOBJS)
endif
+$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS)
ifneq "$(HS_SRCS)" ""
ifeq "$(SplitObjs)" "YES"
-$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS)
- ( echo $(STUBOBJS) ; $(FIND) $(patsubst %.$(way_)o,%,$(LIBOBJS)) -name '*.$(way_)o' -print ) | xargs ld -r -x -o $@
-else # not SplitObjs
-$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS)
- ld -r -x -o $@ $(GHCI_LIBOBJS)
+ $(foreach obj,$(GHCI_LIBOBJS), \
+ ld -r -x -o $(obj) \
+ $(patsubst %.$(way_)o,%,$(obj))/*.$(way_)o &&) true
endif
-else # no HS_SRCS
-$(GHCI_LIBRARY) :: $(GHCI_LIBOBJS)
- ld -r -x -o $@ $(GHCI_LIBOBJS)
endif
+ ld -r -x -o $@ $(GHCI_LIBOBJS) $(STUBOBJS)
CLEAN_FILES += $(GHCI_LIBRARY)
endif
ifneq "$(SCRIPT_PREFIX_FILES)" ""
@cat $(SCRIPT_PREFIX_FILES) >> $@
endif
+ifneq "$(SCRIPT_SUBST)" ""
@eval $(SCRIPT_SUBST)
+endif
@cat $(SCRIPT_OBJS) >> $@
@chmod a+x $@
@echo Done.