summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot1
-rw-r--r--ghc.mk3
-rw-r--r--libraries/Makefile3
-rw-r--r--rules/build-package.mk5
4 files changed, 12 insertions, 0 deletions
diff --git a/boot b/boot
index 9c5f1c5d7f..3cb9f6aba5 100644
--- a/boot
+++ b/boot
@@ -58,6 +58,7 @@ for f in $libraries; do
fi
top=`echo $f | sed 's#[^/]\+#..#g'`
echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk
+ echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk
echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk
rm -f $f/GNUmakefile
echo "Creating $f/GNUmakefile"
diff --git a/ghc.mk b/ghc.mk
index 690850d652..d30573b59b 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -895,3 +895,6 @@ maintainer-clean : distclean
$(RM) libraries/process/include/HsProcessConfig.h.in
$(RM) libraries/unix/include/HsUnixConfig.h.in
$(RM) libraries/old-time/include/HsTimeConfig.h.in
+
+.PHONY: all_libraries
+
diff --git a/libraries/Makefile b/libraries/Makefile
new file mode 100644
index 0000000000..900b63971f
--- /dev/null
+++ b/libraries/Makefile
@@ -0,0 +1,3 @@
+dir = libraries
+TOP = ..
+include $(TOP)/mk/sub-makefile.mk
diff --git a/rules/build-package.mk b/rules/build-package.mk
index fb7d9d230c..6612312a9c 100644
--- a/rules/build-package.mk
+++ b/rules/build-package.mk
@@ -42,6 +42,11 @@ endif
ifneq "$(BINDIST) $3" "YES 0"
$(call all-target,$1,all_$1_$2)
+# This give us things like
+# all_libraries: all_libraries/base_dist-install
+ifneq "$$($1_$2_GROUP)" ""
+all_$$($1_$2_GROUP): all_$1_$2
+endif
$(call clean-target,$1,$2,$1/$2)