diff options
author | Ian Lynagh <igloo@earth.li> | 2009-06-16 23:17:50 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-06-16 23:17:50 +0000 |
commit | fb3ce769f24e19b2342c9300203834df7b9449df (patch) | |
tree | da1bef1a0bb7f91524ebe1064e407ca06a129e41 /rules | |
parent | 8e9626ce5158f434a63f4948b5607150786f9c75 (diff) | |
download | haskell-fb3ce769f24e19b2342c9300203834df7b9449df.tar.gz |
Add an _EXTRA_OBJS variable when linking packages
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-package-way.mk | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 78f0e3468e..421cd6f729 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -40,23 +40,23 @@ endif ifeq "$3" "dyn" # Link a dynamic library -$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) +$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) $$($1_$2_EXTRA_OBJS) "$$(RM)" $$(RM_OPTS) $$@ "$$($1_$2_HC)" $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$($1_$2_$3_HS_OBJS) \ - `$$($1_$2_$3_MKSTUBOBJS)` \ + `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) \ -shared -dynamic -dynload deploy \ -no-auto-link-packages $$(addprefix -package,$$($1_$2_DEPS)) \ -o $$@ else # Build the ordinary .a library ifeq "$$($1_$2_SplitObjs)" "YES" -$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) +$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_EXTRA_OBJS) "$$(RM)" $$(RM_OPTS) $$@ - (echo $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)`; find $$(patsubst %.$$($3_osuf),%_split,$$($1_$2_$3_HS_OBJS)) -name '*.$$($3_osuf)' -print) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ + (echo $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS); find $$(patsubst %.$$($3_osuf),%_split,$$($1_$2_$3_HS_OBJS)) -name '*.$$($3_osuf)' -print) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ else -$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) +$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_EXTRA_OBJS) "$$(RM)" $$(RM_OPTS) $$@ - echo $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_$3_HS_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ + echo $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_$3_HS_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ endif endif @@ -76,9 +76,9 @@ $1_$2_GHCI_LIB = $1/$2/build/HS$$($1_PACKAGE)-$$($1_$2_VERSION).$$($3_osuf) ifneq "$4" "0" BINDIST_LIBS += $$($1_$2_GHCI_LIB) endif -$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) +$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_EXTRA_OBJS) "$$(RM)" $$(RM_OPTS) $$@ - "$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` + "$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_v_CMM_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) $(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) endif |