summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/Makefile21
-rw-r--r--utils/Makefile2
-rw-r--r--utils/installPackage/Makefile37
-rw-r--r--utils/installPackage/installPackage.cabal28
-rw-r--r--utils/installPackage/installPackage.hs (renamed from libraries/installPackage.hs)0
5 files changed, 70 insertions, 18 deletions
diff --git a/libraries/Makefile b/libraries/Makefile
index d5d1e82b3e..1fe8bc09a3 100644
--- a/libraries/Makefile
+++ b/libraries/Makefile
@@ -185,14 +185,6 @@ bootstrapping.conf: cabal-bin
cd hpc && $(CABAL) install --distpref=dist-bootstrapping --inplace
mv $@.tmp $@
-installPackage/installPackage: installPackage.hs
- -$(RM) -rf installPackage
- mkdir installPackage
- $(CP) installPackage.hs installPackage/
- cd installPackage && $(FPTOOLS_TOP_ABS)/compiler/stage1/ghc-inplace \
- --make installPackage -o installPackage \
- $(DEPLOYMENT_OPTS)
-
ifBuildable/ifBuildable: ifBuildable.hs
-$(RM) -rf ifBuildable
mkdir ifBuildable
@@ -223,8 +215,7 @@ remake.library.%: clean.library.% make.library.%
# NB. we're depending on make chasing dependencies from left to right here.
# This bit goes wrong with 'make -j'.
-build: $(foreach SUBDIR,$(SUBDIRS),make.library.$(SUBDIR)) \
- installPackage/installPackage
+build: $(foreach SUBDIR,$(SUBDIRS),make.library.$(SUBDIR))
configure: $(foreach SUBDIR,$(SUBDIRS), \
stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).$(SUBDIR))
@@ -330,7 +321,6 @@ clean: $(foreach SUBDIR,$(SUBDIRS),clean.library.$(SUBDIR))
$(RM) -f bootstrapping.conf.tmp bootstrapping.conf.tmp.old
$(RM) -f cabal-bin cabal-bin.exe
$(RM) -rf ifBuildable
- $(RM) -rf installPackage
$(RM) -f libraries.txt index.html doc-index.html doc-index*.html
$(RM) -f haddock* *.gif
@@ -375,20 +365,17 @@ install-docs:
# overridden when installing a bindist.
$(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
-install.library.%: installPackage/installPackage ifBuildable/ifBuildable
+install.library.%: ifBuildable/ifBuildable
if $(IFBUILDABLE) $*; then \
cd $* && \
- $(FPTOOLS_TOP_ABS)/libraries/installPackage/installPackage install '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \
+ $(FPTOOLS_TOP_ABS)/utils/installPackage/install-inplace/bin/installPackage install '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \
fi
.PHONY: binary-dist binary-dist.library.%
BIN_DIST_LIBDIR=$(BIN_DIST_DIR)/libraries
-binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)) \
- installPackage/installPackage
- mkdir $(BIN_DIST_LIBDIR)/installPackage
- cp installPackage/installPackage $(BIN_DIST_LIBDIR)/installPackage
+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)
diff --git a/utils/Makefile b/utils/Makefile
index 30cf832053..72bb31a33a 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -9,7 +9,7 @@ ifeq "$(BootingFromHc)" "YES"
SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode ghc-pkg unlit
else
SUBDIRS = mkdependC mkdirhier runstdtest ghc-pkg hasktags hp2ps hsc2hs \
- parallel unlit genprimopcode genapply runghc hpc pwd
+ installPackage parallel unlit genprimopcode genapply runghc hpc pwd
endif
ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
# lndir doesn't build on Windows
diff --git a/utils/installPackage/Makefile b/utils/installPackage/Makefile
new file mode 100644
index 0000000000..0397035d64
--- /dev/null
+++ b/utils/installPackage/Makefile
@@ -0,0 +1,37 @@
+
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/cabal-flags.mk
+
+boot:
+ $(CABAL) configure --distpref dist-inplace \
+ $(INPLACE_DIRS_CONFIGURE_FLAGS) \
+ $(USE_BOOT_CONFIGURE_FLAGS) \
+ $(COMMON_CONFIGURE_FLAGS)
+ $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
+ $(CABAL) install --distpref dist-inplace
+
+# XXX
+#all:
+# $(CABAL) configure --distpref dist-install \
+# $(INPLACE_DIRS_CONFIGURE_FLAGS) \
+# $(USE_STAGE1_CONFIGURE_FLAGS) \
+# $(COMMON_CONFIGURE_FLAGS)
+# $(CABAL) build --distpref dist-install $(BUILD_FLAGS)
+
+all:
+
+clean: distclean
+
+distclean:
+ -$(CABAL) clean --distpref dist-inplace
+ -$(CABAL) clean --distpref dist-install
+
+# XXX fix:
+#binary-dist:
+# $(INSTALL_DIR) $(BIN_DIST_DIR)/utils/hsc2hs
+# $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/hsc2hs/
+# $(INSTALL_DATA) hsc2hs.sh $(BIN_DIST_DIR)/utils/hsc2hs/
+# $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/utils/hsc2hs/
+# $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/hsc2hs/
+
diff --git a/utils/installPackage/installPackage.cabal b/utils/installPackage/installPackage.cabal
new file mode 100644
index 0000000000..ab078200d5
--- /dev/null
+++ b/utils/installPackage/installPackage.cabal
@@ -0,0 +1,28 @@
+Name: installPackage
+-- XXX
+Version: 1.0
+Copyright: XXX
+License: BSD3
+-- XXX License-File: LICENSE
+Author: XXX
+Maintainer: XXX
+Synopsis: XXX
+Description:
+ XXX
+Category: XXX
+build-type: Simple
+cabal-version: >=1.2
+
+--Flag base3
+-- Description: Choose the new smaller, split-up base package.
+
+Executable installPackage
+ Main-Is: installPackage.hs
+ Build-Depends: base, Cabal
+-- if flag(base3)
+-- Build-Depends: base >= 3 && < 4,
+-- directory >= 1 && < 1.1,
+-- process >= 1 && < 1.1
+-- else
+-- Build-Depends: base < 3
+
diff --git a/libraries/installPackage.hs b/utils/installPackage/installPackage.hs
index 65eab5664b..65eab5664b 100644
--- a/libraries/installPackage.hs
+++ b/utils/installPackage/installPackage.hs