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

Some "install" and "clean" fixes

parent aa4a905d
......@@ -175,6 +175,10 @@ build.stage.%:
$(MAKE) -f Makefile-stage$* stage=$*
$(CABAL) register --distpref dist-stage$* --inplace
# XXX We ought to actually install the (stage 2) library
install:
@:
stage_dirs :
$(MKDIRHIER) stage$(stage)
......
......@@ -17,9 +17,9 @@ INPLACE_FILE = $(INPLACE_DATA_DIR)/inplace
boot all ::
$(MKDIRHIER) $(INPLACE_DATA_DIR)
test -e $(INPLACE_PKG_CONF) || echo "[]" > $(INPLACE_PKG_CONF)
echo "[]" > package.conf
touch $(INPLACE_FILE)
override datadir = $(libdir)
INSTALL_DATAS += package.conf ghc-usage.txt ghci-usage.txt
# Since cleaning effectively uninstalls all the packages, we must
......
......@@ -65,33 +65,35 @@ CONFIGURE_FLAGS_STAGE3 += $(USE_STAGE2_CONFIGURE_FLAGS)
# no library to register
boot.stage.%:
$(CABAL) configure --distpref dist-stage$* \
$(CABAL) configure --distpref dist-stage$* \
$(INSTALL_DIRS_CONFIGURE_FLAGS) \
$(CONFIGURE_FLAGS_STAGE$*) \
$(COMMON_CONFIGURE_FLAGS) \
--datasubdir=. \
$(CONFIGURE_FLAGS_STAGE$*) \
$(COMMON_CONFIGURE_FLAGS) \
--libsubdir=. \
--datadir='$$libdir' \
--datasubdir=.
build.stage.%:
$(CABAL) build --distpref dist-stage$* $(BUILD_FLAGS)
$(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' 'XXX/package.conf' "" \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \
'$$prefix/bin' \
'$$prefix/lib' \
'$$prefix/libexec' \
'$$prefix/dynlib' \
'$(INPLACE_DATA_DIR)' \
'$$prefix/doc' \
'$$prefix/html' \
'$$prefix/haddock' \
--distpref dist-stage$* \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \
$(FPTOOLS_TOP_ABS)/ghc/stage$*-inplace \
'$$prefix/bin' \
'$(INPLACE_DATA_DIR)' \
'$$prefix/libexec' \
'$$prefix/dynlib' \
'$(INPLACE_DATA_DIR)' \
'$$prefix/doc' \
'$$prefix/html' \
'$$prefix/haddock' \
--distpref dist-stage$* \
$(INSTALL_FLAGS)
# XXX For now we always install the stage 2 compiler
install:
$(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
'$(prefix)' '$(bindir)' '$(libdir)' \
'$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
'$(libexecdir)' '$(dynlibdir)' '$(libdir)' \
'$(docdir)' '$(htmldir)' '$(haddockdir)' \
--distpref dist-stage2 \
$(INSTALL_FLAGS)
......
......@@ -65,6 +65,8 @@ endif
# sort removes duplicates - we don't actually care about the order
WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1))
clean:: $(foreach P,$(WITH_EITHER),clean.$P)
with-bootstrapping-compiler: \
$(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P)
......@@ -72,6 +74,10 @@ with-stage-1: $(foreach P,$(WITH_STAGE1),with-stage-1.$P)
install:: $(foreach P,$(WITH_STAGE1),install.$P)
$(foreach P,$(WITH_EITHER),clean.$P): \
clean.%:
$(MAKE) -C $* clean
$(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P): \
with-bootstrapping-compiler.%:
$(MAKE) -C $* with-bootstrapping-compiler
......
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