Commit e7d5df5d authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Move installPackage out into its own cabal package under utils/

parent 2a150d4b
......@@ -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)
......
......@@ -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
......
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/
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment