$(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
# 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
# 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)
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
# 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)
$(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
XML_DOC = docbook-cheat-sheet
INSTALL_XML_DOC = docbook-cheat-sheet
-binary-dist:
- @:
+include $(TOP)/mk/bindist.mk
include $(TOP)/mk/target.mk
+TOP = ../..
+
# General makefile for Latex stuff
LATEX=latex \\nonstopmode \\input
maintainer-clean: distclean
-binary-dist:
- @:
+include $(TOP)/mk/bindist.mk
# dummy targets
all:
+TOP = ../..
+
# General makefile for Latex stuff
dvi: sm.dvi rp.dvi ldv.dvi
maintainer-clean: distclean
-binary-dist:
- @:
+include $(TOP)/mk/bindist.mk
# dummy targets
all:
XML_DOC = users_guide
INSTALL_XML_DOC = users_guide
-binary-dist:
- @:
+include $(TOP)/mk/bindist.mk
include $(TOP)/mk/target.mk
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
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)
html_installed_root = $(htmldir)/libraries
endif
+IFBUILDABLE=ifBuildable/ifBuildable $(FPTOOLS_TOP_ABS)/packages
+
ifneq "$(DOING_BIN_DIST)" "YES"
CONFIGURE_OPTS =
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
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.%
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.%:
-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
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