summaryrefslogtreecommitdiff
path: root/libraries/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-08-10 00:50:16 +0000
committerIan Lynagh <igloo@earth.li>2008-08-10 00:50:16 +0000
commit2de31b61d0a963803eb5632c9659c6093d74f345 (patch)
treef05ed698b42976a28f1db324033c4d9694e733bc /libraries/Makefile
parent0f72a4c69215d1f81760aa0000ebbbfb2ac73303 (diff)
downloadhaskell-2de31b61d0a963803eb5632c9659c6093d74f345.tar.gz
bindists are now some way towards working
Diffstat (limited to 'libraries/Makefile')
-rw-r--r--libraries/Makefile29
1 files changed, 8 insertions, 21 deletions
diff --git a/libraries/Makefile b/libraries/Makefile
index 5c5d192ada..6cc349b423 100644
--- a/libraries/Makefile
+++ b/libraries/Makefile
@@ -371,33 +371,20 @@ install.library.%: ifBuildable/ifBuildable
BIN_DIST_LIBDIR=$(BIN_DIST_DIR)/libraries
-binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR))
- mkdir $(BIN_DIST_LIBDIR)/ifBuildable
- cp ifBuildable/ifBuildable $(BIN_DIST_LIBDIR)/ifBuildable
- cp Makefile $(BIN_DIST_LIBDIR)
+BINDIST_EXTRAS += ifBuildable/ifBuildable
ifeq "$(HADDOCK_DOCS)" "YES"
- cp gen_contents_index $(BIN_DIST_LIBDIR)
- cp index.html $(BIN_DIST_LIBDIR)
- cp doc-index*.html $(BIN_DIST_LIBDIR)
+BINDIST_EXTRAS += gen_contents_index
+BINDIST_EXTRAS += index.html
+BINDIST_EXTRAS += doc-index*.html
endif
- cp -pR stamp $(BIN_DIST_LIBDIR)
+binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR))
+# This is a bit of a hack, but it works...
+ echo $(WHERE_AM_I)/Makefile >> $(BIN_DIST_LIST)
$(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)): \
binary-dist.library.%:
if $(IFBUILDABLE) $*; then \
- $(MKDIRHIER) $(BIN_DIST_LIBDIR)/$*; \
- cd $* && \
- cp $*.cabal $(BIN_DIST_LIBDIR)/$* && \
- cp LICENSE $(BIN_DIST_LIBDIR)/$* && \
- cp -R dist $(BIN_DIST_LIBDIR)/$* && \
- $(FIND) . -name "*.buildinfo" -exec cp {} $(BIN_DIST_LIBDIR)/$* \; && \
- $(FIND) . -name unbuildable -exec cp {} $(BIN_DIST_LIBDIR)/$* \; && \
- (cp -RL include $(BIN_DIST_LIBDIR)/$* || true) && \
- $(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
- \( -name "*_split" -o -name "autogen" \) | xargs rm -rf && \
- $(FIND) $(BIN_DIST_LIBDIR)/$*/dist \
- \( \( -name "*.o" -o -name "*.p_o" \) -a ! -name "HS*" \) \
- -exec rm {} \; ; \
+ $(MAKE) -C $* -f Makefile.local binary-dist BINDIST_EXTRAS="$*.cabal LICENSE $*.buildinfo unbuildable" WHERE_AM_I=$(WHERE_AM_I)/$*; \
fi
# Ignore some doc targets that we don't support