From: Ian Lynagh Date: Fri, 18 Jul 2008 22:36:56 +0000 (+0000) Subject: Some "install" and "clean" fixes X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=f893fb935d23418b80534b05f35fe50d54af0acc Some "install" and "clean" fixes --- diff --git a/compiler/Makefile b/compiler/Makefile index 00ae2c2..129adfc 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -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) diff --git a/driver/Makefile b/driver/Makefile index cf842e4..e81b1ea 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -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 diff --git a/ghc/Makefile b/ghc/Makefile index 43e40a4..4ee970c 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -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) diff --git a/utils/Makefile b/utils/Makefile index 73685d8..82eec81 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -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