Skip to content
Snippets Groups Projects
Commit b9a0242c authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-04-17 12:58:40 by simonmar]

- actually add -split-objs to SRC_HC_OPTS if $(SplitObjs) == YES and
  we're building a library.

- collect together all the $(SplitObjs) stuff in one place under
  the library building code (it's only relevant for libraries).

SplitObjs=YES should now work.
parent d394d8d5
No related merge requests found
......@@ -451,6 +451,8 @@ endef
ifneq "$(HS_SRCS)" ""
ifeq "$(SplitObjs)" "YES"
SRC_HC_OPTS += -split-objs
define BUILD_LIB
$(RM) $@
TMPDIR=$(TMPDIR); export TMPDIR; $(FIND) $(patsubst %.$(way_)o,%,$(LIBOBJS)) -name '*.$(way_)o' -print | xargs ar q $@
......@@ -464,16 +466,21 @@ HC_SPLIT_PRE= \
$(FIND) $(basename $@) -name '*.$(way_)o' -print | xargs $(RM) __rm_food ; fi
HC_SPLIT_POST = touch $@
ifeq "$(SplitObjs)" "YES"
HC_PRE__ = $(HC_SPLIT_PRE) ;
HC_POST__ = $(HC_SPLIT_POST) ;
endif
SRC_HC_PRE_OPTS += $(HC_SPLIT_PRE) ;
SRC_HC_POST_OPTS += $(HC_SPLIT_POST) ;
SRC_HC_POST_OPTS += $(HC_POST__)
SRC_HC_PRE_OPTS += $(HC_PRE__)
#
# If (Haskell) object files are split, cleaning up
# consist of descending into the directories where
# the myriads of object files have been put.
#
clean ::
$(FIND) $(patsubst %.$(way_)o,%,$(HS_OBJS)) -name '*.$(way_)o' -print | xargs $(RM) __rm_food
-rmdir $(patsubst %.$(way_)o,%,$(HS_OBJS)) > /dev/null 2>&1
endif # $(SplitObjs)
endif
endif # $(HS_SRCS)
#
# Remove local symbols from library objects if requested.
......@@ -1093,21 +1100,6 @@ maintainer-clean:: mostlyclean clean distclean
rm -f $(MAINTAINER_CLEAN_FILES)
endif
#
# If (Haskell) object files are split, cleaning up
# consist of descending into the directories where
# the myriads of object files have been put.
#
ifneq "$(HS_OBJS)" ""
ifneq "$(filter -split-objs,$(HC_OPTS))" ""
clean ::
$(FIND) $(patsubst %.$(way_)o,%,$(HS_OBJS)) -name '*.$(way_)o' -print | xargs $(RM) __rm_food
-rmdir $(patsubst %.$(way_)o,%,$(HS_OBJS)) > /dev/null 2>&1
endif
endif
#################################################################################
#
# Way management
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment