diff options
author | Ian Lynagh <igloo@earth.li> | 2009-08-07 13:07:31 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-08-07 13:07:31 +0000 |
commit | 74df25b15c34c4554660b76d1ae09b721d0aa59b (patch) | |
tree | fed5b3398ef162691aef829a6d88ed337cd78b67 /rules | |
parent | 81dc292579a5e64898bdba00d892d5cbcbc5e459 (diff) | |
download | haskell-74df25b15c34c4554660b76d1ae09b721d0aa59b.tar.gz |
Add a kludge to fix building shared libs
The .dyn_hi files currently depend on the .dyn_hi files of modules that
they import. But they actually want the .hi files of modules from
another package.This we make the .dyn_hi files depend on the .hi files
so we are sure that they exist and are up-to-date.
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-package-way.mk | 10 | ||||
-rw-r--r-- | rules/mkdep.mk | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index f0300be9d1..0be7dc9e3c 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -46,6 +46,16 @@ $$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS -shared -dynamic -dynload deploy \ -no-auto-link-packages $$(addprefix -package,$$($1_$2_DEPS)) \ -o $$@ + +# This is a kludge. The .dyn_hi files currently depend on the .dyn_hi +# files of modules that they import. But they actually want the .hi +# files of modules from another package.This we make the .dyn_hi files +# depend on the .hi files so we are sure that they exist and are +# up-to-date. +$$(foreach m,$$(addprefix $1/$2/build/,$$($1_$2_SLASH_MODS)),\ +$$(eval $$(call mkdep,$$m.$$($3_hisuf),$$m.hi)) \ +) + else # Build the ordinary .a library ifeq "$$($1_$2_SplitObjs)" "YES" diff --git a/rules/mkdep.mk b/rules/mkdep.mk new file mode 100644 index 0000000000..fea132f2bc --- /dev/null +++ b/rules/mkdep.mk @@ -0,0 +1,16 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- + + +define mkdep # args: $1 = target, $2 = deps +$1 : $2 +endef |