diff options
author | Ian Lynagh <igloo@earth.li> | 2008-07-18 22:36:56 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-07-18 22:36:56 +0000 |
commit | f893fb935d23418b80534b05f35fe50d54af0acc (patch) | |
tree | a7fac55529584608a3df3938ebf77114d5650159 | |
parent | aa4a905d69a7325fc22f917a41a82f9e19146fcd (diff) | |
download | haskell-f893fb935d23418b80534b05f35fe50d54af0acc.tar.gz |
Some "install" and "clean" fixes
-rw-r--r-- | compiler/Makefile | 4 | ||||
-rw-r--r-- | driver/Makefile | 2 | ||||
-rw-r--r-- | ghc/Makefile | 34 | ||||
-rw-r--r-- | utils/Makefile | 6 |
4 files changed, 29 insertions, 17 deletions
diff --git a/compiler/Makefile b/compiler/Makefile index 00ae2c2e19..129adfc4d5 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 cf842e47c1..e81b1ea1fa 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 43e40a4eb6..4ee970cd65 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 73685d85dd..82eec81756 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 |