#
# Files to include in fptools source distribution
#
-SRC_DIST_DIRS += mk docs CONTRIB distrib $(ProjectsToBuild)
+SRC_DIST_DIRS += mk docs distrib $(ProjectsToBuild)
SRC_DIST_FILES += configure.in config.guess config.sub configure aclocal.m4 acconfig.h README INSTALL Makefile install-sh
-#
+# -----------------------------------------------------------------------------
# Making a binary distribution
#
# To make a particular binary distribution:
# set $(Project) to the name of the project (currently Ghc or Happy).
-BIN_DIST_TMPDIR=$(shell pwd)
-BIN_DIST_NAME=fptools
+BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
+BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
#
# list of toplevel directories to include in binary distrib.
config.sub \
aclocal.m4
+#
+# binary-dist creates a binary bundle, set BIN_DIST_NAME
+# to package name and do `make binary-dist Project=<project-name>'
+# (normally this just a thing you would do from the toplevel of fptools)
+#
+.PHONY: binary-dist-pre binary-dist binary-pack
+
+BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
+BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
+
+binary-dist-pre::
+ -rm -rf $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)
+ -rm -f $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME).tar.gz
+ @for i in $(BIN_DIST_DIRS); do \
+ if test -d "$$i"; then \
+ echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
+ $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
+ echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
+ $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
+ echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ echo $(MAKE) -C $$i $(MFLAGS) install \
+ prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
+ libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ $(MAKE) -C $$i $(MFLAGS) install \
+ prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
+ libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ fi; \
+ done
+
binary-dist::
@for i in $(BIN_DIST_TOP); do \
if test -f "$$i"; then \
binary-dist::
@for i in $($(Project)BinDistPrlScripts); do \
echo "Renaming $$i to $$i.prl"; \
- $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i.prl; \
+ $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.prl; \
done
endif
binary-dist::
@for i in $($(Project)BinDistLibPrlScripts); do \
echo "Renaming $$i to $$i.prl"; \
- $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i.prl; \
+ $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i.prl; \
done
endif
binary-dist::
@for i in $($(Project)BinDistShScripts); do \
echo "Renaming $$i to $$i.sh"; \
- $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion)/$$i.sh; \
+ $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.sh; \
done
endif
+#
+# Do this separately for now
+#
+binary-pack::
+ ( cd $(BIN_DIST_TMPDIR); $(TAR) chzf $(BIN_DIST_NAME).tar.gz $(BIN_DIST_NAME) )
+
+ifneq "$(way)" ""
+package-way-dist::
+ ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print | xargs tar cvf $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar )
+ gzip $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar
+endif
+
+ifneq "$(way)" ""
+remove-way-dist::
+ ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print -exec rm -f {} \; )
+endif
+
+binary-dist::
+ @echo "Mechanical and super-natty! Inspect the result and *if* happy; freeze, sell and get some sleep!"
+
+# -----------------------------------------------------------------------------
+
dist :: dist-pre
include $(TOP)/mk/target.mk
dist :: dist-post
-binary-dist::
- @echo "Mechanical and super-natty! Inspect the result and *if* happy; freeze, sell and get some sleep!"
# Where the different pieces of the bundle should go:
bindir = @bindir@
-libdir = @libdir@
-datadir = @datadir@
+libdir = @libdir@/$(package)-$(version)
+datadir = @datadir@/$(package)-$(version)
platform = @TargetPlatform@
prefix = @prefix@
exec_prefix = @exec_prefix@
# default
-infodir = $(real_datadir)
-htmldir = $(real_datadir)
-dvidir = $(real_datadir)
+infodir = $(datadir)
+htmldir = $(datadir)
+dvidir = $(datadir)
-#
-# Putting the package stuff in package-specific
-# directories:
-#
-real_libdir = $(libdir)/$(package)-$(version)
-real_datadir = $(datadir)/$(package)-$(version)
PERL = @PerlCmd@
SH = /bin/sh
@for i in $(PACKAGE_PRL_SCRIPTS) ""; do \
if test "$$i"; then \
echo "Creating a configured version of $$i .."; \
- $(RM) bin/$(platform)/$(package)-$(version)/$$i.bak; \
- if [ -f bin/$(platform)/$(package)-$(version)/$$i ]; then $(MV) bin/$(platform)/$(package)-$(version)/$$i bin/$(platform)/$(package)-$(version)/$$i.bak; fi; \
- echo "#! $(PERL)" > bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"bindir='$(bindir)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"libdir='$(real_libdir)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"libexecdir='$(real_libdir)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"datadir='$(real_datadir)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"SED='$(SED)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"TMPDIR='$(TMPDIR)';" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- cat bin/$(platform)/$(package)-$(version)/$$i.prl >> bin/$(platform)/$(package)-$(version)/$$i ; \
- $(CHMOD) $(BIN_PERMS) bin/$(platform)/$(package)-$(version)/$$i; \
+ $(RM) bin/$(platform)/$$i.bak; \
+ if [ -f bin/$(platform)/$$i ]; then $(MV) bin/$(platform)/$$i bin/$(platform)/$$i.bak; fi; \
+ echo "#! $(PERL)" > bin/$(platform)/$$i ; \
+ echo '$$'"bindir='$(bindir)';" >> bin/$(platform)/$$i ; \
+ echo '$$'"libdir='$(libdir)';" >> bin/$(platform)/$$i ; \
+ echo '$$'"libexecdir='$(libdir)';" >> bin/$(platform)/$$i ; \
+ echo '$$'"datadir='$(datadir)';" >> bin/$(platform)/$$i ; \
+ echo '$$'"SED='$(SED)';" >> bin/$(platform)/$$i ; \
+ echo '$$'"TMPDIR='$(TMPDIR)';" >> bin/$(platform)/$$i ; \
+ cat bin/$(platform)/$$i.prl >> bin/$(platform)/$$i ; \
+ $(CHMOD) $(BIN_PERMS) bin/$(platform)/$$i; \
echo "Done."; \
fi; \
done
@for i in $(PACKAGE_LIB_PRL_SCRIPTS) ""; do \
if test "$$i"; then \
echo "Creating a configured version of $$i .."; \
- $(RM) lib/$(platform)/$(package)-$(version)/$$i.bak; \
- if [ -f lib/$(platform)/$(package)-$(version)/$$i ]; then $(MV) lib/$(platform)/$(package)-$(version)/$$i lib/$(platform)/$(package)-$(version)/$$i.bak; fi; \
- echo "#! $(PERL)" > lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"bindir='$(bindir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"libdir='$(real_libdir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"libexecdir='$(real_libdir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"datadir='$(real_datadir)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"SED='$(SED)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- echo '$$'"TMPDIR='$(TMPDIR)';" >> lib/$(platform)/$(package)-$(version)/$$i ; \
- cat lib/$(platform)/$(package)-$(version)/$$i.prl >> lib/$(platform)/$(package)-$(version)/$$i; \
- $(CHMOD) $(BIN_PERMS) lib/$(platform)/$(package)-$(version)/$$i; \
+ $(RM) lib/$(platform)/$$i.bak; \
+ if [ -f lib/$(platform)/$$i ]; then $(MV) lib/$(platform)/$$i lib/$(platform)/$$i.bak; fi; \
+ echo "#! $(PERL)" > lib/$(platform)/$$i ; \
+ echo '$$'"bindir='$(bindir)';" >> lib/$(platform)/$$i ; \
+ echo '$$'"libdir='$(libdir)';" >> lib/$(platform)/$$i ; \
+ echo '$$'"libexecdir='$(libdir)';" >> lib/$(platform)/$$i ; \
+ echo '$$'"datadir='$(datadir)';" >> lib/$(platform)/$$i ; \
+ echo '$$'"SED='$(SED)';" >> lib/$(platform)/$$i ; \
+ echo '$$'"TMPDIR='$(TMPDIR)';" >> lib/$(platform)/$$i ; \
+ cat lib/$(platform)/$$i.prl >> lib/$(platform)/$$i; \
+ $(CHMOD) $(BIN_PERMS) lib/$(platform)/$$i; \
echo "Done."; \
fi; \
done
@for i in $(PACKAGE_SH_SCRIPTS) ""; do \
if test "$$i"; then \
echo "Creating a configured version of $$i .."; \
- $(RM) bin/$(platform)/$(package)-$(version)/$$i.bak; \
- if [ -f bin/$(platform)/$(package)-$(version)/$$i ]; then $(MV) bin/$(platform)/$(package)-$(version)/$$i bin/$(platform)/$(package)-$(version)/$$i.bak; fi; \
- echo "#! $(SH)" > bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "bindir='$(bindir)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "libdir='$(real_libdir)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "libexecdir='$(real_libdir)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "datadir='$(real_datadir)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "SED='$(SED)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- echo "TMPDIR='$(TMPDIR)'" >> bin/$(platform)/$(package)-$(version)/$$i ; \
- cat bin/$(platform)/$(package)-$(version)/$$i.sh >> bin/$(platform)/$(package)-$(version)/$$i; \
- $(CHMOD) $(BIN_PERMS) bin/$(platform)/$(package)-$(version)/$$i; \
+ $(RM) bin/$(platform)/$$i.bak; \
+ if [ -f bin/$(platform)/$$i ]; then $(MV) bin/$(platform)/$$i bin/$(platform)/$$i.bak; fi; \
+ echo "#! $(SH)" > bin/$(platform)/$$i ; \
+ echo "bindir='$(bindir)'" >> bin/$(platform)/$$i ; \
+ echo "libdir='$(libdir)'" >> bin/$(platform)/$$i ; \
+ echo "libexecdir='$(libdir)'" >> bin/$(platform)/$$i ; \
+ echo "datadir='$(datadir)'" >> bin/$(platform)/$$i ; \
+ echo "SED='$(SED)'" >> bin/$(platform)/$$i ; \
+ echo "TMPDIR='$(TMPDIR)'" >> bin/$(platform)/$$i ; \
+ cat bin/$(platform)/$$i.sh >> bin/$(platform)/$$i; \
+ $(CHMOD) $(BIN_PERMS) bin/$(platform)/$$i; \
echo "Done."; \
fi; \
done
CURRENT_DIR = $(shell pwd | sed 's|^//\(.\)|\1:|' )
in-place ::
- $(MAKE) $(MFLAGS) config-pkgs bindir=$(CURRENT_DIR)/bin/$(platform)/$(package)-$(version) libdir=$(CURRENT_DIR)/lib/$(platform) datadir=$(CURRENT_DIR)/share/$(package)-$(version)
- @echo "Finished configuring..to use, add $(CURRENT_DIR)/bin/$(platform)/$(package)-$(version) to your PATH."
+ $(MAKE) $(MFLAGS) config-pkgs bindir=$(CURRENT_DIR)/bin/$(platform) libdir=$(CURRENT_DIR)/lib/$(platform) datadir=$(CURRENT_DIR)/share
+ @echo "Finished configuring..to use, add $(CURRENT_DIR)/bin/$(platform) to your PATH."
install-dirs ::
$(INSTALL_DIR) $(bindir)
- (cd lib/$(platform)/$(package)-$(version); find . -type d -exec sh -c '../../../$(INSTALL_DIR) $$0 $(real_libdir)/$$0' {} \; )
- (cd share/$(package)-$(version); find . -type d -exec sh -c '../../$(INSTALL_DIR) $(real_datadir)/$$0' {} \; )
+ (cd lib/$(platform); find . -type d -exec sh -c '../../$(INSTALL_DIR) $$0 $(libdir)/$$0' {} \; )
+ (cd share; find . -type d -exec sh -c '../$(INSTALL_DIR) $(datadir)/$$0' {} \; )
install :: config-pkgs install-dirs install-bin install-libs install-datas
install-bin:
for i in $(PACKAGE_BIN_INSTALL) ""; do \
- if test -n "$$i" ; then $(INSTALL_BIN) bin/$(platform)/$(package)-$(version)/$$i $(bindir); fi; \
+ if test -n "$$i" ; then $(INSTALL_BIN) bin/$(platform)/$$i $(bindir); fi; \
done;
for i in $(PACKAGE_BINS) ""; do \
- if test -n "$$i" ; then $(INSTALL_BIN) bin/$(platform)/$(package)-$(version)/$$i$(exeext) $(bindir); fi; \
+ if test -n "$$i" ; then $(INSTALL_BIN) bin/$(platform)/$$i$(exeext) $(bindir); fi; \
done;
for i in $(VERSION_SYMLINKS_FOR) ""; do \
if [ "x$$i" != "x" ]; then \
install-libs:
- (cd lib/$(platform)/$(package)-$(version); find . -type f -exec sh -c '$(CP) $$0 $(real_libdir)/$$0' {} \; )
+ (cd lib/$(platform); find . -type f -exec sh -c '$(CP) $$0 $(libdir)/$$0' {} \; )
install-datas:
- (cd share/$(package)-$(version); find . -type f -exec sh -c '$(INSTALL_DATA) $$0 $(real_datadir)/$$0' {} \; )
+ (cd share; find . -type f -exec sh -c '$(INSTALL_DATA) $$0 $(datadir)/$$0' {} \; )
show-install-setup:
@echo "Install setup..."
@echo "bindir = $(bindir)"
- @echo "libdir = $(libdir) (real_libdir = $(real_libdir))"
- @echo "datadir = $(datadir) (real_datadir = $(real_datadir))"
+ @echo "libdir = $(libdir) (libdir = $(libdir))"
+ @echo "datadir = $(datadir) (datadir = $(datadir))"
#
# Documentation targets, install-docs for the whole lot, or
install-docs : install-html install-dvi install-info
install-dvi: install-dirs-dvi
- $(INSTALL_DATA) dvi/$(package)-$(version)/* $(dvidir)
+ $(INSTALL_DATA) dvi/* $(dvidir)
install-info: install-dirs-info
- $(INSTALL_DATA) info/$(package)-$(version)/* $(infodir)
+ $(INSTALL_DATA) info/* $(infodir)
install-html: install-dirs-html
- $(INSTALL_DATA) html/$(package)-$(version)/* $(htmldir)
+ $(INSTALL_DATA) html/* $(htmldir)
install-dirs-html:
$(INSTALL_DIR) $(htmldir)
#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.24 1999/10/05 10:30:35 simonmar Exp $
+
+# We create two driver scripts:
+# - one to run in-place in the build tree for building libraries
+# - one wired to the install locations for later installation
#
+# the installation script is built first, and we invoke make recursively
+# to build the in-place version.
TOP=..
CURRENT_DIR=ghc/driver
include $(TOP)/mk/boilerplate.mk
-#
-# The driver needs to get at the version
-include $(TOP)/mk/version.mk
-INSTALLING=0
+INSTALLING=1
DYN_LOADABLE_BITS = \
ghc-asm.prl \
ghc-consist.prl \
ghc-split.prl
-SCRIPT_PROG = ghc-$(ProjectVersion)
-SCRIPT_LINK = ghc
+INSTALLED_SCRIPT_PROG = ghc-$(ProjectVersion)
+INPLACE_SCRIPT_PROG = ghc-inplace
+
+ifeq "$(INSTALLING)" "1"
+TOP_PWD := $(prefix)
+SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG)
+SCRIPT_LINK = ghc
+else
+TOP_PWD := $(FPTOOLS_TOP_ABS)
+SCRIPT_PROG = $(INPLACE_SCRIPT_PROG)
+endif
+
SCRIPT_OBJS = ghc.prl
INTERP=perl
USER_WAY_NAMES = $(foreach way,$(USER_WAYS),WAY_$(way)_NAME)
USER_WAY_OPTS = $(foreach way,$(USER_WAYS),WAY_$(way)_REAL_OPTS)
-ifeq "$(INSTALLING)" "1"
-TOP_PWD := $(prefix)
-else
-TOP_PWD := $(FPTOOLS_TOP_ABS)
-endif
-
SCRIPT_SUBST_VARS := \
INSTALLING \
- ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel \
+ ProjectName ProjectVersion ProjectVersionInt \
HscMajorVersion HscMinorVersion CcMajorVersion CcMinorVersion \
CURRENT_DIR HOSTPLATFORM TARGETPLATFORM \
- GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR \
+ GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR \
GHC_OPT_HILEV_ASM GhcWithNativeCodeGen LeadingUnderscore\
- GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN EnableWin32DLLs \
+ GHC_UNLIT GHC_HSCPP GHC_MKDEPENDHS GHC_HSC GHC_SYSMAN EnableWin32DLLs \
CP RM CONTEXT_DIFF LibGmp GhcWithRegisterised \
USER_WAY_NAMES USER_WAY_OPTS
all :: $(DYN_LOADABLE_BITS)
+# don't recurse on 'make install'
+#
+ifeq "$(INSTALLING)" "1"
+all clean veryclean maintainer-clean ::
+ $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@
+endif
+
#
# Install setup:
# the driver goes in $(bindir), the perl script helpers
INSTALL_LIBS += $(DYN_LOADABLE_BITS)
#
-# Before really installing the driver, we have to
-# reconfigure it such that the paths it refers to,
-# point to the installed utils.
-#
-install ::
- @$(RM) $(SCRIPT_PROG)
- @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
-
-#
# depend setup: other directories need the driver script to compute
# their dependencies, so `depend' is simply an alias for `all' here.
depend :: all
ghc.prl : $(TOP)/mk/version.mk
-# Hack to re-create the in-situ build tree driver script after
-# having installed it.
-#
-install ::
- @$(RM) $(SCRIPT_PROG)
- @$(MAKE) $(MFLAGS) BIN_DIST=0 INSTALLING=0 $(SCRIPT_PROG)
-
#
# Another hack (hmm..I can see a pattern developing here :-)
# In ghc/driver, we create a symlink from ghc-<whatever-version> to
HOSTPLATFORM TARGETPLATFORM
-ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel
+ProjectName ProjectVersion ProjectVersionInt
HscMajorVersion HscMinorVersion CcMajorVersion CcMinorVersion
CURRENT_DIR TMPDIR
-GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR
+GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR
GHC_OPT_HILEV_ASM GhcWithNativeCodeGen
-GHC_UNLIT GHC_HSCPP GHC_HSC GHC_SYSMAN
+GHC_UNLIT GHC_HSCPP GHC_MKDEPENDHS GHC_HSC GHC_SYSMAN
CP RM CONTEXT_DIFF
)
);
-$TopClosureFile # defaults to 1.2 one; will be mangled later
- = '';
-# ( $INSTALLING) ? "$InstLibDirGhc/TopClosureXXXX.o"
-# : "$TopPwd/$CURRENT_DIR/$GHC_RUNTIME_DIR/main/TopClosureXXXX.o";
-
# make depend for Haskell
$MkDependHS
= ( $INSTALLING ) ? "$InstLibExecDirGhc/mkdependHS"
- : "$TopPwd/$CURRENT_DIR/$GHC_UTILS_DIR/mkdependHS/mkdependHS";
+ : "$TopPwd/$CURRENT_DIR/$GHC_MKDEPENDHS";
# Fill in later
@MkDependHS_flags = ();
Tell the world who we are, if they asked.
\begin{code}
-print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"
- if $Verbose;
+print STDERR "${ProjectName}, version ${ProjectVersion}\n" if $Verbose;
\end{code}
%************************************************************************
&prepareWin32DllLink(1);
- local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $TopClosureFile $libdirs @UserLibrary @SysLibrary";
+ local($to_do) = "$lnkr $Verbose @Ld_flags $output @Link_file $libdirs @UserLibrary @SysLibrary";
&run_something($to_do, 'Linker');
# finally, check the consistency info in the binary
if \$running_under_some_shell;
# =!=!=!=!=!=!=!=!=!=!=!
# This script is automatically generated: DO NOT EDIT!!!
-# Generated by Glasgow Haskell, version ${ProjectVersion} ${ProjectPatchLevel}
+# Generated by Glasgow Haskell, version ${ProjectVersion}
#
\$pvm_executable = '$pvm_executable';
\$pvm_executable_base = '$pvm_executable_base';
if (/^-\?$/ || /^--?help$/) { print $LongUsage; exit $Status; }
#-----------version ----------------------------------------------------
- /^--version$/ && do { print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"; exit $Status; };
+ /^--version$/ && do { print STDERR "${ProjectName}, version ${ProjectVersion}\n"; exit $Status; };
#---------- verbosity and such -----------------------------------------
/^-v$/ && do { $Verbose = '-v'; $Time = 'time'; next arg; };
-# $Id: Makefile,v 1.7 1999/09/17 10:43:51 sof Exp $
+# $Id: Makefile,v 1.8 1999/10/05 10:30:27 simonmar Exp $
#
# Makefile for concurrent libraries.
#
WAYS=$(GhcLibWays)
+HC = $(GHC)
+
#-----------------------------------------------------------------------------
# Setting the standard variables
#
WAYS=$(GhcLibWays)
+HC = $(GHC)
+
#-----------------------------------------------------------------------------
# Setting the standard variables
#
-# $Id: Makefile,v 1.18 1999/09/17 10:43:52 sof Exp $
+# $Id: Makefile,v 1.19 1999/10/05 10:30:28 simonmar Exp $
#
# Makefile for miscellaneous libraries.
#
SUBDIRS=
endif
+HC = $(GHC)
+
#-----------------------------------------------------------------------------
# Setting the standard variables
#
#
-# $Id: Makefile,v 1.7 1999/05/11 17:05:48 keithw Exp $
+# $Id: Makefile,v 1.8 1999/10/05 10:30:29 simonmar Exp $
#
# Makefile for POSIX library
#
SUBDIRS=
endif
+HC = $(GHC)
+
#-----------------------------------------------------------------------------
# Setting the standard variables
#
SUBDIRS=
endif
+HC = $(GHC)
+
#-----------------------------------------------------------------------------
# Setting the standard variables
#
GHC_INCLUDE_DIR = $(TOP)/includes
GHC_UTILS_DIR = $(TOP)/utils
-GHC = $(GHC_DRIVER_DIR)/ghc
+GHC = $(GHC_DRIVER_DIR)/ghc-inplace
GHC_HSCPP_DIR = $(GHC_UTILS_DIR)/hscpp
GHC_HSCPP = $(GHC_HSCPP_DIR)/hscpp
+GHC_MKDEPENDHS_DIR = $(GHC_UTILS_DIR)/mkdependHS
+GHC_MKDEPENDHS = $(GHC_MKDEPENDHS_DIR)/mkdependHS-inplace
GHC_HSP = $(GHC_HSP_DIR)/hsp
GHC_HSP_DIR = $(GHC_HSC_DIR)
GHC_HSC = $(GHC_HSC_DIR)/hsc
#
# Ghc project settings:
#
-# *ProjectVersion is treated as a *string*
-# *ProjectVersionInt is treated as an *integer* (for cpp defines)
+# ProjectVersion is treated as a *string*
+# ProjectVersionInt is treated as an *integer* (for cpp defines)
+
+# Versioning scheme: A.BB.C
+# A: major version, any number of digits
+# B: minor version, two digits padded with leading zeros
+# C: patchlevel, one digit, omitted if zero.
+#
+# ProjectVersionInt does *not* contain the patchlevel (rationale: this
+# figure is used for conditional compilations, and library interfaces
+# etc. are not supposed to change between patchlevels).
ProjectName = The Glorious Glasgow Haskell Compilation System
ProjectNameShort = ghc
ProjectVersion = 4.05
ProjectVersionInt = 405
-ProjectPatchLevel = 0
#
# Optionally, you can get the compiler driver to check the
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.11 1999/10/05 10:30:33 simonmar Exp $
+#
+# hscpp doesn't depend on any of the install paths, so we don't need to
+# play the same tricks we play with mkdependHS and the GHC driver script.
+
TOP=../..
include $(TOP)/mk/boilerplate.mk
SCRIPT_OBJS=hscpp.prl
SCRIPT_SUBST_VARS= RAWCPP
-# Note: might be overridden from cmd-line (see install rule below)
-INSTALLING=0
-
INTERP=perl
#
INSTALL_LIB_SCRIPTS+=$(SCRIPT_PROG)
INSTALL_LIBEXECS=$(C_PROG)
-
-#
-# Before really installing the script, we have to
-# reconfigure it such that the paths it refers to,
-# point to the installed utils.
-#
-install ::
- @$(RM) $(SCRIPT_PROG)
- @$(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
-
-
include $(TOP)/mk/target.mk
-
-
-# Hack to re-create the in-situ build tree script after
-# having just installed it.
-#
-install ::
- @$(RM) $(SCRIPT_PROG)
- @$(MAKE) $(MFLAGS) BIN_DIST=0 $(SCRIPT_PROG)
-
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.18 1999/10/05 10:30:33 simonmar Exp $
+
TOP=../..
include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/version.mk
-INSTALLING=0
+
+INSTALLING=1
boot :: all
-SCRIPT_PROG=mkdependHS
-SCRIPT_OBJS=mkdependHS.prl
SCRIPT_SUBST_VARS= \
TOP_PWD \
INSTALLING \
INTERP=perl
-#
-# install setup
-#
-INSTALL_LIB_SCRIPTS += $(SCRIPT_PROG)
+INSTALLED_SCRIPT_PROG = mkdependHS
+INPLACE_SCRIPT_PROG = mkdependHS-inplace
-ifneq "$(BIN_DIST)" "1"
-SCRIPT_SUBST_VARS += libdir datadir TMPDIR SED
+ifeq "$(INSTALLING)" "1"
+TOP_PWD := $(prefix)
+SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG)
+SCRIPT_LINK = ghc
+else
+TOP_PWD := $(FPTOOLS_TOP_ABS)
+SCRIPT_PROG = $(INPLACE_SCRIPT_PROG)
endif
+SCRIPT_OBJS=mkdependHS.prl
-#
-# Prepend an infomercial if installing (binary-dist or the real thing).
-#
-ifeq "$(INSTALLING)" "1"
ifeq "$(BIN_DIST)" "1"
SCRIPT_PREFIX_FILES += prefix.txt
-endif
+else
+SCRIPT_SUBST_VARS += libdir datadir TMPDIR SED
endif
+# don't recurse on 'make install'
+#
ifeq "$(INSTALLING)" "1"
-TOP_PWD:=$(prefix)
-else
-TOP_PWD:=$(FPTOOLS_TOP_ABS)
+all clean veryclean maintainer-clean ::
+ $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@
endif
#
-# Before really installing the script, we have to
-# reconfigure it such that the paths it refers to,
-# point to the installed utils.
+# install setup
#
-install ::
- $(RM) $(SCRIPT_PROG)
- $(MAKE) $(MFLAGS) INSTALLING=1 $(SCRIPT_PROG)
+INSTALL_LIB_SCRIPTS += $(SCRIPT_PROG)
include $(TOP)/mk/target.mk
-
-#
-# Hack to re-create the in-situ build tree script after
-# having just installed it (if you don't, confusion ensues
-# if you try to use the build tree copy afterwards..)
-#
-install ::
- @$(RM) $(SCRIPT_PROG)
- @$(MAKE) $(MFLAGS) BIN_DIST=0 INSTALLING=0 $(SCRIPT_PROG)
dist-package-zip ::
cd $(SRC_DIST_DIR); cd ..; $(ZIP) $(ZIP_OPTS) -r $(SRC_DIST_NAME).zip $(SRC_DIST_NAME)
-#
-# binary-dist creates a binary bundle, set BIN_DIST_NAME
-# to package name and do `make binary-dist' (normally this
-# just a thing you would do from the toplevel of fptools or)
-# from the top of a project.
-#
-.PHONY: binary-dist-pre binary-dist binary-pack
-
-binary-dist-pre::
- -rm -rf $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)
- -rm -f $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME).tar.gz
- @for i in $(BIN_DIST_DIRS); do \
- if test -d "$$i"; then \
- echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion); \
- $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion); \
- echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion); \
- $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion); \
- echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/$(ProjectNameShort)-$(ProjectVersion); \
- $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/$(ProjectNameShort)-$(ProjectVersion); \
- echo $(MAKE) -C $$i $(MFLAGS) install BIN_DIST=1 BIN_DIST_NAME=$(BIN_DIST_NAME) \
- prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
- exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
- bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/$(ProjectNameShort)-$(ProjectVersion) ; \
- $(MAKE) -C $$i $(MFLAGS) install BIN_DIST=1 BIN_DIST_NAME=$(BIN_DIST_NAME) \
- prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
- exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
- bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$(ProjectNameShort)-$(ProjectVersion) \
- datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share/$(ProjectNameShort)-$(ProjectVersion) ; \
- fi; \
- done
-
-#
-# Do this separately for now
-#
-binary-pack::
- ( cd $(BIN_DIST_TMPDIR); $(TAR) chzf $(BIN_DIST_NAME).tar.gz $(BIN_DIST_NAME); rm -rf $(BIN_DIST_NAME) )
-
-ifneq "$(way)" ""
-package-way-dist::
- ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print | xargs tar cvf $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar )
- gzip $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar
-endif
-
-ifneq "$(way)" ""
-remove-way-dist::
- ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print -exec rm -f {} \; )
-endif
-
###########################################
#
# Targets: check tags show info