diff options
author | Ian Lynagh <igloo@earth.li> | 2008-08-10 13:39:25 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-08-10 13:39:25 +0000 |
commit | 6d0dd9aa562a9f96bf875b7260675609e1171b66 (patch) | |
tree | 02fe46e0d6384d23b222bf77e63e38a69133a393 | |
parent | 2de31b61d0a963803eb5632c9659c6093d74f345 (diff) | |
download | haskell-6d0dd9aa562a9f96bf875b7260675609e1171b66.tar.gz |
bindist fixes
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | compiler/Makefile | 23 | ||||
-rw-r--r-- | distrib/Makefile | 1 | ||||
-rw-r--r-- | docs/docbook-cheat-sheet/Makefile | 3 | ||||
-rw-r--r-- | docs/ext-core/Makefile | 5 | ||||
-rw-r--r-- | docs/storage-mgt/Makefile | 5 | ||||
-rw-r--r-- | docs/users_guide/Makefile | 3 | ||||
-rw-r--r-- | driver/Makefile | 2 | ||||
-rw-r--r-- | ghc/Makefile | 11 | ||||
-rw-r--r-- | libraries/Makefile | 20 | ||||
-rw-r--r-- | mk/package.mk | 2 | ||||
-rw-r--r-- | utils/ghc-pkg/Makefile | 1 |
12 files changed, 39 insertions, 50 deletions
@@ -337,6 +337,7 @@ binary-dist:: $(MAKE) -C gmp binary-dist WHERE_AM_I=$(WHERE_AM_I)/gmp $(MAKE) -C includes binary-dist WHERE_AM_I=$(WHERE_AM_I)/includes $(MAKE) -C compiler binary-dist WHERE_AM_I=$(WHERE_AM_I)/compiler $(INSTALL_STAGE) + $(MAKE) -C ghc binary-dist WHERE_AM_I=$(WHERE_AM_I)/ghc $(INSTALL_STAGE) $(MAKE) -C rts binary-dist WHERE_AM_I=$(WHERE_AM_I)/rts $(MAKE) -C driver binary-dist WHERE_AM_I=$(WHERE_AM_I)/driver $(MAKE) -C utils binary-dist WHERE_AM_I=$(WHERE_AM_I)/utils @@ -346,8 +347,6 @@ binary-dist:: # Now thinks get messier. Some files we need to move around, rename or # generate. We do this under $(BIN_DIST_PREP). $(RM) -rf $(BIN_DIST_PREP_DIR) - $(MKDIRHIER) $(BIN_DIST_PREP)/utils/pwd - cp utils/pwd/dist-install/build/pwd/pwd $(BIN_DIST_PREP)/utils/pwd $(MKDIRHIER) $(BIN_DIST_PREP)/mk echo 'include $$(TOP)/Makefile-vars' > $(BIN_DIST_PREP)/mk/boilerplate.mk echo 'include $$(TOP)/mk/package.mk' > $(BIN_DIST_PREP)/mk/target.mk @@ -366,6 +365,15 @@ endif # next to configure.ac when we run autoreconf cp aclocal.m4 $(BIN_DIST_PREP) cd $(BIN_DIST_PREP) && autoreconf +# We need to copy the pwd program that was built with stage1 to where +# the build system expects to find it, i.e. the location the pwd built +# with the bootstrapping compiler normally occupies + $(MKDIRHIER) $(BIN_DIST_PREP)/utils/pwd + cp utils/pwd/dist-install/build/pwd/pwd $(BIN_DIST_PREP)/utils/pwd +# And likewise the installPackage program + $(MKDIRHIER) $(BIN_DIST_PREP)/utils/installPackage/install-inplace/bin + cp utils/installPackage/dist-install/build/installPackage/installPackage \ + $(BIN_DIST_PREP)/utils/installPackage/install-inplace/bin echo "package = ghc" >> $(BIN_DIST_VARFILE) echo "version = $(ProjectVersion)" >> $(BIN_DIST_VARFILE) @@ -380,6 +388,7 @@ endif echo "XSLTPROC = $(XSLTPROC)" >> $(BIN_DIST_VARFILE) echo "TARGETPLATFORM = $(TARGETPLATFORM)" >> $(BIN_DIST_VARFILE) echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_VARFILE) + echo "INTEGER_LIBRARY = $(INTEGER_LIBRARY)" >> $(BIN_DIST_VARFILE) cat distrib/Makefile-bin-vars.in >> $(BIN_DIST_VARFILE) # With that done, we can now build the actual tarball diff --git a/compiler/Makefile b/compiler/Makefile index 1dbb2d343f..c0f703ebea 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -439,25 +439,6 @@ primop-usage.hs-incl: prelude/primops.txt # binary-dist # -# XXX This is just broken, currently -binary-dist: - @: - -#binary-dist: -# $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler -# $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/stage$(stage) -# echo "stage=$(stage)" > $(BIN_DIST_DIR)/compiler/Makefile -# cat Makefile >> $(BIN_DIST_DIR)/compiler/Makefile -# $(INSTALL_DATA) package.conf.in $(BIN_DIST_DIR)/compiler/ -# set -e; for d in stage$(stage)/*/; do $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/$$d; done -# set -e; for f in $(HS_IFACES); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#ifneq "$(INSTALL_LIBS)" "" -# set -e; for f in $(INSTALL_LIBS); do $(INSTALL_DATA) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif -#ifneq "$(INSTALL_PROGS)" "" -# set -e; for f in $(INSTALL_PROGS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif -#ifneq "$(INSTALL_LIBEXECS)" "" -# set -e; for f in $(INSTALL_LIBEXECS); do $(INSTALL_PROGRAM) $$f $(BIN_DIST_DIR)/compiler/$$f; done -#endif +include $(TOP)/mk/bindist.mk +LIB_DIST_DIR = dist-stage$(stage) diff --git a/distrib/Makefile b/distrib/Makefile index bfa3b91297..951ec7e40e 100644 --- a/distrib/Makefile +++ b/distrib/Makefile @@ -27,6 +27,7 @@ install:: $(MAKE) -C rts install DOING_BIN_DIST=YES $(MAKE) -C libraries install DOING_BIN_DIST=YES $(MAKE) -C compiler install DOING_BIN_DIST=YES + $(MAKE) -C ghc install DOING_BIN_DIST=YES $(MAKE) -C gmp install DOING_BIN_DIST=YES $(MAKE) -C docs install-docs DOING_BIN_DIST=YES $(MAKE) -C libraries/Cabal/doc install-docs DOING_BIN_DIST=YES diff --git a/docs/docbook-cheat-sheet/Makefile b/docs/docbook-cheat-sheet/Makefile index 14e0c3c2d2..8cd9f51869 100644 --- a/docs/docbook-cheat-sheet/Makefile +++ b/docs/docbook-cheat-sheet/Makefile @@ -4,7 +4,6 @@ include $(TOP)/mk/boilerplate.mk XML_DOC = docbook-cheat-sheet INSTALL_XML_DOC = docbook-cheat-sheet -binary-dist: - @: +include $(TOP)/mk/bindist.mk include $(TOP)/mk/target.mk diff --git a/docs/ext-core/Makefile b/docs/ext-core/Makefile index 10f3183731..704cfc3fa4 100644 --- a/docs/ext-core/Makefile +++ b/docs/ext-core/Makefile @@ -1,3 +1,5 @@ +TOP = ../.. + # General makefile for Latex stuff LATEX=latex \\nonstopmode \\input @@ -28,8 +30,7 @@ distclean: clean maintainer-clean: distclean -binary-dist: - @: +include $(TOP)/mk/bindist.mk # dummy targets all: diff --git a/docs/storage-mgt/Makefile b/docs/storage-mgt/Makefile index 9ef54adced..0ef3037179 100644 --- a/docs/storage-mgt/Makefile +++ b/docs/storage-mgt/Makefile @@ -1,3 +1,5 @@ +TOP = ../.. + # General makefile for Latex stuff dvi: sm.dvi rp.dvi ldv.dvi @@ -25,8 +27,7 @@ distclean: clean maintainer-clean: distclean -binary-dist: - @: +include $(TOP)/mk/bindist.mk # dummy targets all: diff --git a/docs/users_guide/Makefile b/docs/users_guide/Makefile index 1a370d5331..0657f4affc 100644 --- a/docs/users_guide/Makefile +++ b/docs/users_guide/Makefile @@ -4,7 +4,6 @@ include $(TOP)/mk/boilerplate.mk XML_DOC = users_guide INSTALL_XML_DOC = users_guide -binary-dist: - @: +include $(TOP)/mk/bindist.mk include $(TOP)/mk/target.mk diff --git a/driver/Makefile b/driver/Makefile index 5825356058..7a07cbdd3a 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -7,7 +7,7 @@ TOP=.. include $(TOP)/mk/boilerplate.mk -SUBDIRS = mangler split ghc ghci +SUBDIRS = mangler split ghci INPLACE_DATA_DIR = $(FPTOOLS_TOP_ABS)/inplace-datadir INPLACE_PKG_CONF = $(INPLACE_DATA_DIR)/package.conf diff --git a/ghc/Makefile b/ghc/Makefile index 894f2dfb3b..cb122413ec 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -119,16 +119,11 @@ build.stage.%: install: $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \ '$(prefix)' '$(bindir)' '$(libdir)' \ - '$(libexecdir)' '$(dynlibdir)' '$(libdir)' \ + '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \ '$(docdir)' '$(htmldir)' '$(haddockdir)' \ --distpref dist-stage2 \ $(INSTALL_FLAGS) -# 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/ +include $(TOP)/mk/bindist.mk +EXE_DIST_DIR = dist-stage$(stage) diff --git a/libraries/Makefile b/libraries/Makefile index 6cc349b423..50cd5184c2 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -119,6 +119,8 @@ ihtmldir = $(htmldir)/libraries/$$pkg html_installed_root = $(htmldir)/libraries endif +IFBUILDABLE=ifBuildable/ifBuildable $(FPTOOLS_TOP_ABS)/packages + ifneq "$(DOING_BIN_DIST)" "YES" CONFIGURE_OPTS = @@ -146,8 +148,6 @@ subdirs: HERE_ABS=$(FPTOOLS_TOP_ABS)/libraries -IFBUILDABLE=ifBuildable/ifBuildable $(FPTOOLS_TOP_ABS)/packages - CABAL_GHC_FLAGS = -Wall ifeq "$(ghc_ge_605)" "NO" CABAL_GHC_FLAGS += -cpp @@ -364,7 +364,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \ install.library.%: ifBuildable/ifBuildable if $(IFBUILDABLE) $*; then \ cd $* && \ - $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \ + $(INSTALL_PACKAGE) install '$(DESTDIR)$(bindir)/ghc-pkg' '$(DESTDIR)$(datadir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idynlibdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(ihaddockdir)' ; \ fi .PHONY: binary-dist binary-dist.library.% @@ -372,14 +372,16 @@ install.library.%: ifBuildable/ifBuildable BIN_DIST_LIBDIR=$(BIN_DIST_DIR)/libraries BINDIST_EXTRAS += ifBuildable/ifBuildable -ifeq "$(HADDOCK_DOCS)" "YES" -BINDIST_EXTRAS += gen_contents_index -BINDIST_EXTRAS += index.html -BINDIST_EXTRAS += doc-index*.html -endif binary-dist: $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)) -# This is a bit of a hack, but it works... echo $(WHERE_AM_I)/Makefile >> $(BIN_DIST_LIST) +# XXX This needs to be changed: This ifBuildable is built with the +# bootstrapping compiler, so isn't OS X friendly. It should be made into +# a Cabal package if we keep it. However, once we drop extralibs we can +# probably remove it anyway. + echo $(WHERE_AM_I)/ifBuildable/ifBuildable >> $(BIN_DIST_LIST) +ifeq "$(HADDOCK_DOCS)" "YES" + for FILE in gen_contents_index index.html doc-index*.html; do echo $(WHERE_AM_I)/$$FILE >> $(BIN_DIST_LIST); done +endif $(foreach SUBDIR,$(SUBDIRS),binary-dist.library.$(SUBDIR)): \ binary-dist.library.%: diff --git a/mk/package.mk b/mk/package.mk index 44087aa1c0..ef2038604a 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -84,7 +84,7 @@ install:: -x c $(PACKAGE_CPP_OPTS) package.conf.in \ | grep -v '^#pragma GCC' \ | sed -e 's/""//g' -e 's/:[ ]*,/: /g' \ - | $(GHC_PKG_PROG) --global-conf $(DESTDIR)$(libdir)/package.conf update - --force + | $(DESTDIR)$(bindir)/ghc-pkg --global-conf $(DESTDIR)$(datadir)/package.conf update - --force # we could be more accurate here and add a dependency on # driver/package.conf, but that doesn't work too well because of diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile index 560fa4adcf..0783d3f1b2 100644 --- a/utils/ghc-pkg/Makefile +++ b/utils/ghc-pkg/Makefile @@ -3,6 +3,7 @@ TOP=../.. ENABLE_SHELL_WRAPPERS = YES EXTRA_CLEAN = Version.hs EXTRA_INPLACE_CONFIGURE_FLAGS = $(INPLACE_GHC_DATADIR_CONFIGURE_FLAGS) +EXTRA_STAGE1_CONFIGURE_FLAGS = --datasubdir=. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/cabal.mk |