diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | distrib/prep-bin-dist-mingw | 1 | ||||
-rw-r--r-- | driver/ghc/Makefile | 27 | ||||
-rw-r--r-- | driver/ghc/ghc.sh | 2 | ||||
-rw-r--r-- | driver/ghci/Makefile | 57 | ||||
-rw-r--r-- | driver/mangler/Makefile | 19 | ||||
-rw-r--r-- | driver/split/Makefile | 17 | ||||
-rw-r--r-- | libraries/Makefile | 18 | ||||
-rw-r--r-- | libraries/installPackage.hs | 60 | ||||
-rw-r--r-- | mk/config.mk.in | 1 | ||||
-rw-r--r-- | mk/package.mk | 6 | ||||
-rw-r--r-- | mk/paths.mk | 2 | ||||
-rw-r--r-- | mk/target.mk | 100 | ||||
-rw-r--r-- | utils/ghc-pkg/Makefile | 79 | ||||
-rw-r--r-- | utils/ghc-pkg/ghc-pkg.sh | 2 | ||||
-rw-r--r-- | utils/hsc2hs/Makefile | 102 | ||||
-rw-r--r-- | utils/hstags/Makefile | 8 | ||||
-rw-r--r-- | utils/mkdependC/Makefile | 20 | ||||
-rw-r--r-- | utils/mkdirhier/Makefile | 11 | ||||
-rw-r--r-- | utils/parallel/Makefile | 60 | ||||
-rw-r--r-- | utils/prof/Makefile | 56 | ||||
-rw-r--r-- | utils/prof/ghcprof.prl | 11 | ||||
-rw-r--r-- | utils/runstdtest/Makefile | 17 | ||||
-rw-r--r-- | utils/stat2resid/Makefile | 15 |
24 files changed, 249 insertions, 447 deletions
@@ -135,6 +135,7 @@ endif # Same as default rule, but we pass $(INSTALL_STAGE) to $(MAKE) too install :: check-packages + $(INSTALL_DIR) $(bindir) @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \ for i in $(SUBDIRS); do \ echo "------------------------------------------------------------------------"; \ @@ -248,10 +249,6 @@ BINARY_DIST_PRE_RULES=$(foreach d,$(BinDistDirs),binary-dist-pre-$d) binary-dist:: binary-dist-pre $(BINARY_DIST_PRE_RULES) binary-dist-pre:: -ifeq "$(BIN_DIST)" "" - @echo "WARNING: To run the binary-dist target, you need to set BIN_DIST=1 in mk/build.mk" - @false -endif -rm -rf $(BIN_DIST_DIR) -$(RM) $(BIN_DIST_DIR).tar.gz $(MKDIRHIER) $(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) diff --git a/distrib/prep-bin-dist-mingw b/distrib/prep-bin-dist-mingw index 17110c17bb..763f4eb22a 100644 --- a/distrib/prep-bin-dist-mingw +++ b/distrib/prep-bin-dist-mingw @@ -6,7 +6,6 @@ # # To use: # -# - make sure you set BIN_DIST=1 in your mk/build.mk before you built GHC. # $ cd <top of GHC build tree> # $ make binary-dist # diff --git a/driver/ghc/Makefile b/driver/ghc/Makefile index 26965569a4..69abe6cb8a 100644 --- a/driver/ghc/Makefile +++ b/driver/ghc/Makefile @@ -8,23 +8,18 @@ include $(TOP)/mk/boilerplate.mk # ----------------------------------------------------------------------------- # ghc script -ifeq "$(BIN_DIST)" "1" -GHCBIN=$$\"\"libexecdir/ghc-$(ProjectVersion) -GHCLIB=$$\"\"libdir -else -GHCBIN=$(libexecdir)/ghc-$(ProjectVersion) -GHCLIB=$(libdir) -endif # BIN_DIST - -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -SCRIPT_PROG = ghc-$(ProjectVersion) -LINK = ghc +ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" +LINK = ghc +LINK_TARGET = $(LINK)-$(ProjectVersion) +INSTALLED_SCRIPT=$(bindir)/$(LINK_TARGET) +install:: + $(RM) -f $(INSTALLED_SCRIPT) + echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) + echo "GHCBIN=$(libexecdir)/ghc-$(ProjectVersion)" >> $(INSTALLED_SCRIPT) + echo "TOPDIROPT=-B$(libdir)" >> $(INSTALLED_SCRIPT) + echo 'exec $$GHCBIN $$TOPDIROPT $${1+"$$@"}' >> $(INSTALLED_SCRIPT) + $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) endif -SCRIPT_OBJS = ghc.sh -INTERP = $(SHELL) -TOPDIROPT = -B$(GHCLIB) -SCRIPT_SUBST_VARS = GHCBIN TOPDIROPT -INSTALL_SCRIPTS += $(SCRIPT_PROG) # ----------------------------------------------------------------------------- diff --git a/driver/ghc/ghc.sh b/driver/ghc/ghc.sh deleted file mode 100644 index 780b9498be..0000000000 --- a/driver/ghc/ghc.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Mini-driver for GHC -exec $GHCBIN $TOPDIROPT ${1+"$@"} diff --git a/driver/ghci/Makefile b/driver/ghci/Makefile index 7c67ac546c..14e0c33775 100644 --- a/driver/ghci/Makefile +++ b/driver/ghci/Makefile @@ -11,22 +11,6 @@ INSTALLING=1 # ----------------------------------------------------------------------------- # ghci script -ifeq "$(INSTALLING)" "1" -ifeq "$(BIN_DIST)" "1" -GHCBIN=$$\"\"libexecdir/ghc-$(ProjectVersion) -GHCLIB=$$\"\"libdir -else -GHCBIN=$(libexecdir)/ghc-$(ProjectVersion) -GHCLIB=$(libdir) -endif # BIN_DIST -else -GHCBIN=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/ghc-$(ProjectVersion) -GHCLIB=$(FPTOOLS_TOP_ABS) -endif - -INSTALLED_SCRIPT_PROG = ghci-$(ProjectVersion) -INPLACE_SCRIPT_PROG = ghci-inplace - ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" C_PROG = ghci C_OBJS += ghci.res @@ -34,31 +18,42 @@ else C_SRCS= endif -SCRIPT_OBJS = ghci.sh -INTERP = $(SHELL) -SCRIPT_SUBST_VARS = GHCBIN TOPDIROPT -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -INSTALL_SCRIPTS += $(SCRIPT_PROG) -else -INSTALL_SCRIPTS += ghcii.sh +ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" INSTALL_PROGS += $(C_PROG) +GHCII_SCRIPT=$(bindir)/ghcii.sh +install:: + $(RM) -f $(GHCII_SCRIPT) + echo "#!$(SHELL)" >> $(GHCII_SCRIPT) + echo 'exec "$0"/../ghc --interactive $${1+"$$@"}' >> $(GHCII_SCRIPT) +else +LINK = ghci +LINK_TARGET = $(LINK)-$(ProjectVersion) +INSTALLED_SCRIPT=$(bindir)/$(LINK_TARGET) +install:: + $(RM) -f $(INSTALLED_SCRIPT) + echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) + echo "GHCBIN=$(libexecdir)/ghc-$(ProjectVersion)" >> $(INSTALLED_SCRIPT) + echo "TOPDIROPT=-B$(libdir)" >> $(INSTALLED_SCRIPT) + echo 'exec $$GHCBIN $$TOPDIROPT --interactive $${1+"$$@"}' >> $(INSTALLED_SCRIPT) + $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) endif -TOPDIROPT = -B$(GHCLIB) -ifeq "$(INSTALLING)" "1" -SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -LINK = ghci -endif -else -SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) +INPLACE_SCRIPT=ghc-pkg-inplace +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) + echo "GHCBIN=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/ghc-$(ProjectVersion)" >> $(INPLACE_SCRIPT) + echo "TOPDIROPT=$(FPTOOLS_TOP_ABS)" >> $(INPLACE_SCRIPT) + echo 'exec $$GHCPKGBIN --global-conf $$PKGCONF $${1+"$$@"}' >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) endif # don't recurse on 'make install' # ifeq "$(INSTALLING)" "1" all clean distclean maintainer-clean :: - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ + $(MAKE) INSTALLING=0 $(MFLAGS) $@ endif ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" diff --git a/driver/mangler/Makefile b/driver/mangler/Makefile index 7b482e1d98..7c4d276b0c 100644 --- a/driver/mangler/Makefile +++ b/driver/mangler/Makefile @@ -4,15 +4,16 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -SCRIPT_PROG = ghc-asm - -INTERP=perl - -SCRIPT_SUBST_VARS := TARGETPLATFORM - -INSTALL_LIBEXEC_SCRIPTS += $(SCRIPT_PROG) - -CLEAN_FILES += $(SCRIPT_OBJS) +PROG = ghc-asm +all:: $(PROG).prl + $(RM) -f $(PROG) + echo '#!$(PERL)' >> $(PROG) + echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(PROG) + cat $< >> $(PROG) + $(EXECUTABLE_FILE) $(PROG) + +INSTALL_LIBEXEC_SCRIPTS += $(PROG) +CLEAN_FILES += $(PROG) $(PROG).prl # needed for bootstrapping with HC files ifeq "$(BootingFromHc)" "YES" diff --git a/driver/split/Makefile b/driver/split/Makefile index 6b545de20f..382388fe77 100644 --- a/driver/split/Makefile +++ b/driver/split/Makefile @@ -4,14 +4,15 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -SCRIPT_PROG = ghc-split +PROG = ghc-split +all:: $(PROG).prl + $(RM) -f $(PROG) + echo '#!$(PERL)' >> $(PROG) + echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(PROG) + cat $< >> $(PROG) + $(EXECUTABLE_FILE) $(PROG) -INTERP=perl - -SCRIPT_SUBST_VARS := TARGETPLATFORM - -INSTALL_LIBEXEC_SCRIPTS += $(SCRIPT_PROG) - -CLEAN_FILES += $(SCRIPT_OBJS) +INSTALL_LIBEXEC_SCRIPTS += $(PROG) +CLEAN_FILES += $(PROG) $(PROG).prl include $(TOP)/mk/target.mk diff --git a/libraries/Makefile b/libraries/Makefile index 5302c60c1e..7ac12431ed 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -183,7 +183,8 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup -$(RM) -f stamp/configure.library.*.$* $*/unbuildable ( cd $* && setup/Setup configure \ $(CONFIGURE_OPTS) \ - --prefix=$(prefix) \ + --prefix='$$topdir' \ + --libsubdir='$$compiler/lib/$$pkgid' \ --with-compiler=../../compiler/ghc-inplace$(dot_bat) \ --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace$(dot_bat) \ --with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace$(dot_bat) \ @@ -227,16 +228,17 @@ doc.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \ .PHONY: install install-docs install.library.% -INSTALL_DIR=$(prefix)/share/ghc/doc/html/ +ROOT=$(prefix)/share/ghc/doc/html/ install: $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)) ifneq "$(NO_HADDOCK_DOCS)" "YES" - $(INSTALL_DATA) index.html doc-index.html $(INSTALL_DIR) - $(INSTALL_SCRIPT) gen_contents_index $(INSTALL_DIR) + $(INSTALL_DIR) $(ROOT) + $(INSTALL_DATA) index.html doc-index.html $(ROOT) + $(INSTALL_SCRIPT) gen_contents_index $(ROOT) # Hacks: - $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.css $(INSTALL_DIR) - $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.js $(INSTALL_DIR) - $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.gif $(INSTALL_DIR) + $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.css $(ROOT) + $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.js $(ROOT) + $(INSTALL_DATA) $(prefix)/share/ghc/doc/html/base/*.gif $(ROOT) endif # Cabal doesn't let us ask to install docs only, so do nothing here @@ -248,7 +250,7 @@ install-docs: # Thus if you install without building then it will just break. $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \ install.library.%: installPackage/installPackage ifBuildable/ifBuildable - ifBuildable/ifBuildable $* ../installPackage/installPackage + ifBuildable/ifBuildable $* ../installPackage/installPackage $(prefix) $(bindir)/ghc-pkg .PHONY: binary-dist binary-dist.library.% diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs index dcba287ddf..f4fdfa795e 100644 --- a/libraries/installPackage.hs +++ b/libraries/installPackage.hs @@ -6,11 +6,14 @@ import Distribution.Simple.Configure import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Utils import Distribution.Verbosity +import System.Cmd import System.Environment main :: IO () main = do args <- getArgs - let verbosity = case args of + case args of + pref : ghcpkg : args' -> + let verbosity = case args' of [] -> normal ['-':'v':v] -> let m = case v of @@ -18,11 +21,24 @@ main = do args <- getArgs _ -> Just v in flagToVerbosity m _ -> error ("Bad arguments: " ++ show args) - userHooks = simpleUserHooks - installFlags = InstallFlags { - installUserFlags = MaybeUserGlobal, - installVerbose = verbosity - } + in doit pref ghcpkg verbosity + _ -> + error "Missing arguments" + +doit :: FilePath -> FilePath -> Verbosity -> IO () +doit pref ghcpkg verbosity = + do let userHooks = simpleUserHooks + copyFlags = CopyFlags { + copyDest = NoCopyDest, + copyVerbose = verbosity + } + registerFlags = RegisterFlags { + regUser = MaybeUserGlobal, + regGenScript = False, + regInPlace = False, + regWithHcPkg = Just ghcpkg, + regVerbose = verbosity + } pdFile <- defaultPackageDesc verbosity pd <- readPackageDescription verbosity pdFile lbi <- getPersistBuildConfig @@ -36,25 +52,15 @@ main = do args <- getArgs Nothing -> error "Expected a library, but none found" pd' = pd { library = Just lib' } - -- When installing we need to use the non-inplace ghc-pkg. - -- We also set the compiler to be non-inplace, but that - -- probably doesn't matter. - c = compiler lbi - c' = c { compilerPath = dropInPlace (compilerPath c), - compilerPkgTool = dropInPlace (compilerPkgTool c) - } - lbi' = lbi { compiler = c' } - (instHook simpleUserHooks) pd' lbi' userHooks installFlags - -dropInPlace :: FilePath -> FilePath -dropInPlace "" = "" -dropInPlace xs@(x:xs') = case dropPrefix "-inplace" xs of - Nothing -> x : dropInPlace xs' - Just xs'' -> dropInPlace xs'' - -dropPrefix :: Eq a => [a] -> [a] -> Maybe [a] -dropPrefix [] ys = Just ys -dropPrefix (x:xs) (y:ys) - | x == y = dropPrefix xs ys -dropPrefix _ _ = Nothing + -- When coying, we need to actually give a concrete + -- directory to copy to rather than "$topdir" + lbi_copy = lbi { prefix = pref } + -- When we run GHC we give it a $topdir that includes the + -- $compiler/lib/ part of libsubdir, so we only want the + -- $pkgid part in the package.conf file. This is a bit of + -- a hack, really. + lbi_register = lbi { libsubdir = "$pkgid" } + (copyHook simpleUserHooks) pd' lbi_copy userHooks copyFlags + (regHook simpleUserHooks) pd' lbi_register userHooks registerFlags + return () diff --git a/mk/config.mk.in b/mk/config.mk.in index 83c188b848..ae89765941 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -786,6 +786,7 @@ LNDIR = $(GHC_LNDIR_DIR)/$(GHC_LNDIR_PGM) RUNTEST = $(GHC_RUNTEST_DIR)/$(GHC_RUNTEST_PGM) GENERATED_FILE = chmod a-w +EXECUTABLE_FILE = chmod +x #----------------------------------------------------------------------------- # Haskell compilers and mkdependHS diff --git a/mk/package.mk b/mk/package.mk index 29fdb99b7b..6c22535dbd 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -22,13 +22,8 @@ PKG_DATADIR = $$topdir else -ifeq "$(BIN_DIST)" "" -PKG_LIBDIR = $(libdir) -PKG_DATADIR = $(datadir) -else PKG_LIBDIR = $$libdir PKG_DATADIR = $$datadir -endif endif # Unix @@ -373,7 +368,6 @@ CLEAN_FILES += $(PACKAGE).haddock $(HC) $(HC_OPTS) -D__HADDOCK__ -E $< -o $@ HTML_INSTALL_DIR = $(datadir)/html/libraries/$(PACKAGE) -# NOT the same as HTML_DIR_INSTALLED when BIN_DIST is on install-docs :: $(HTML_DOC) @$(INSTALL_DIR) $(HTML_INSTALL_DIR) diff --git a/mk/paths.mk b/mk/paths.mk index aff12743bc..4cb2bbf8c8 100644 --- a/mk/paths.mk +++ b/mk/paths.mk @@ -233,7 +233,7 @@ TAGS_C_SRCS=$(C_SRCS) # Specifically glafp-utils/mkdependC/mkdependC.prl and others in driver/ and # possibly others elsewhere in the tree. ToDo: fix this properly. MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS) $(HSC_C_OBJS) $(GC_C_OBJS) -CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(SCRIPT_LINK) \ +CLEAN_FILES += $(HS_PROG) $(C_PROG) $(SCRIPT_LINK) \ $(PROG) $(LIBRARY) a.out \ $(DERIVED_HSC_SRCS) \ $(DERIVED_GC_SRCS) \ diff --git a/mk/target.mk b/mk/target.mk index 155e7bd438..6e2f0d6940 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -215,7 +215,6 @@ endif # HS_PROG Haskell program # C_PROG C program # LIBRARY Library -# SCRIPT_PROG Script (e.g. Perl script) # # For details of exactly what rule is generated, see the # relevant section below @@ -483,77 +482,6 @@ DllVersionInfo.$(way_)rc ExeVersionInfo.$(way_)rc: echo " END" >> $@ echo "END" >> $@ -#---------------------------------------- -# Script programs - -ifneq "$(SCRIPT_PROG)" "" - -# To produce a fully functional script, you may -# have to add some configuration variables at the top of -# the script, i.e., the compiler driver needs to know -# the path to various utils in the build tree for instance. -# -# To have the build rule for the script automatically do this -# for you, set the variable SCRIPT_SUBST_VARS to the list of -# variables you need to put in. - -# -# SCRIPT_SUBST creates a string of echo commands that -# will when evaluated append the (perl)variable name and its value -# to the target it is used for, i.e., -# -# A=foo -# B=bar -# SCRIPT_SUBST_VARS = A B -# SCRIPT_SUBST=echo "$""A=\"foo\";" >> $@; echo "$""B=\"bar\";" >> $@ -# -# so if you have a rule like the following -# -# foo: -# @(RM) $@ -# @(TOUCH) $@ -# @eval $(SCRIPT_SUBST) -# -# `make foo' would create a file `foo' containing the following -# -# % cat foo -# $A=foo; -# $B=bar; -# % -# -# ToDo: make this work for shell scripts (drop the initial $). -# -ifeq "$(INTERP)" "$(SHELL)" -SCRIPT_SUBST=$(foreach val,$(SCRIPT_SUBST_VARS),"echo \"$(val)=\\\"$($(val))\\\";\" >> $@;") -else -SCRIPT_SUBST=$(foreach val,$(SCRIPT_SUBST_VARS),"echo \"$$\"\"$(val)=\\\"$($(val))\\\";\" >> $@;") -endif - -all :: $(SCRIPT_PROG) - -$(SCRIPT_PROG) : $(SCRIPT_OBJS) - $(RM) $@ - @echo Creating $@... -ifeq "$(INTERP)" "perl" - echo "#! "$(PERL) > $@ -else -ifneq "$(INTERP)" "" - @echo "#!"$(INTERP) > $@ -else - @touch $@ -endif -endif -ifneq "$(SCRIPT_PREFIX_FILES)" "" - @cat $(SCRIPT_PREFIX_FILES) >> $@ -endif -ifneq "$(SCRIPT_SUBST)" "" - @eval $(SCRIPT_SUBST) -endif - @cat $(SCRIPT_OBJS) >> $@ - @chmod a+x $@ - @echo Done. -endif - # --------------------------------------------------------------------------- # Symbolic links @@ -562,43 +490,17 @@ endif ifneq "$(LINK)" "" -all :: $(LINK) - -CLEAN_FILES += $(LINK) - ifeq "$(LINK_TARGET)" "" -ifneq "$(SCRIPT_PROG)" "" -LINK_TARGET = $(SCRIPT_PROG) -else ifneq "$(HS_PROG)" "" LINK_TARGET = $(HS_PROG) else ifneq "$(C_PROG)" "" LINK_TARGET = $(C_PROG) else -LINK_TARGET = dunno +$(error Cannot deduce LINK_TARGET) endif endif endif -endif - -# -# Don't want to overwrite $(LINK)s that aren't symbolic -# links. Testing for symbolic links is problematic to do in -# a portable fashion using a /bin/sh test, so we simply rely -# on perl. -# -$(LINK) : $(LINK_TARGET) - @if ( $(PERL) -e '$$fn="$(LINK)"; exit ((! -f $$fn || -l $$fn) ? 0 : 1);' ); then \ - echo "Creating a symbolic link from $(LINK_TARGET) to $(LINK)"; \ - $(RM) $(LINK); \ - $(LN_S) $(LINK_TARGET) $(LINK); \ - else \ - echo "Creating a symbolic link from $(LINK_TARGET) to $(LINK) failed: \`$(LINK)' already exists"; \ - echo "Perhaps remove \`$(LINK)' manually?"; \ - exit 1; \ - fi; - # # install links to script drivers. diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile index 6a4dbcf253..e4c8b74948 100644 --- a/utils/ghc-pkg/Makefile +++ b/utils/ghc-pkg/Makefile @@ -1,9 +1,6 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -# hack for ghci-inplace script, see below -INSTALLING=1 - # ----------------------------------------------------------------------------- # ghc-pkg.bin @@ -53,60 +50,36 @@ DIST_CLEAN_FILES += $(VERSION_HS) # ----------------------------------------------------------------------------- # ghc-pkg script -ifeq "$(INSTALLING)" "1" -ifeq "$(BIN_DIST)" "1" -GHCPKGBIN=$$\"\"libexecdir/$(HS_PROG) -PKGCONF=$$\"\"libdir/package.conf -else -GHCPKGBIN=$(libexecdir)/$(HS_PROG) -PKGCONF=$(libdir)/package.conf -endif # BIN_DIST +ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" +# See "MSys Note 3" in compiler/Makefile +INPLACE_SCRIPT=ghc-pkg-inplace.bat +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo '@call $(subst /,\,$(FPTOOLS_TOP_ABS_PLATFORM)/utils/ghc-pkg/$(HS_PROG)) --global-conf $(FPTOOLS_TOP_ABS_PLATFORM)/driver/package.conf.inplace %*' >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) else -GHCPKGBIN=$(FPTOOLS_TOP_ABS)/utils/ghc-pkg/$(HS_PROG) -PKGCONF=$(FPTOOLS_TOP_ABS_PLATFORM)/driver/package.conf.inplace -endif - -ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -INSTALLED_SCRIPT_PROG = ghc-pkg-$(ProjectVersion) -endif -INPLACE_SCRIPT_PROG = ghc-pkg-inplace - -SCRIPT_OBJS = ghc-pkg.sh -INTERP = $(SHELL) -SCRIPT_SUBST_VARS = GHCPKGBIN PKGCONFOPT -ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -INSTALL_SCRIPTS += $(SCRIPT_PROG) +INPLACE_SCRIPT=ghc-pkg-inplace +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) + echo "GHCPKGBIN=$(FPTOOLS_TOP_ABS)/utils/ghc-pkg/$(HS_PROG)" >> $(INPLACE_SCRIPT) + echo "PKGCONF=$(FPTOOLS_TOP_ABS_PLATFORM)/driver/package.conf.inplace" >> $(INPLACE_SCRIPT) + echo 'exec $$GHCPKGBIN --global-conf $$PKGCONF $${1+"$$@"}' >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) endif -PKGCONFOPT = --global-conf $(PKGCONF) +CLEAN_FILES += $(INPLACE_SCRIPT) -ifeq "$(INSTALLING)" "1" -SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -LINK = ghc-pkg -endif -else -SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) -endif - -# ----------------------------------------------------------------------------- -# don't recurse on 'make install' -# -ifeq "$(INSTALLING)" "1" -all :: $(HS_PROG) - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ -clean distclean maintainer-clean :: - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ -endif - -ifeq "$(INSTALLING)$(HOSTPLATFORM)" "0i386-unknown-mingw32" -all :: $(INPLACE_SCRIPT_PROG).bat - -# See "MSys Note 3" in compiler/Makefile -$(INPLACE_SCRIPT_PROG).bat : - echo '@call $(subst /,\,$(FPTOOLS_TOP_ABS_PLATFORM)/utils/ghc-pkg/$(HS_PROG)) --global-conf $(PKGCONF) %*' >> $@ - chmod 755 $@ - -CLEAN_FILES += $(INPLACE_SCRIPT_PROG).bat +LINK = ghc-pkg +LINK_TARGET = $(LINK)-$(ProjectVersion) +INSTALLED_SCRIPT=$(bindir)/$(LINK_TARGET) +install:: + $(RM) -f $(INSTALLED_SCRIPT) + echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) + echo "GHCPKGBIN=$(libexecdir)/$(HS_PROG)" >> $(INSTALLED_SCRIPT) + echo "PKGCONF=$(libdir)/package.conf" >> $(INSTALLED_SCRIPT) + echo 'exec $$GHCPKGBIN --global-conf $$PKGCONF $${1+"$$@"}' >> $(INSTALLED_SCRIPT) + $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) endif # ghc-pkg is needed to boot in rts/ and library dirs diff --git a/utils/ghc-pkg/ghc-pkg.sh b/utils/ghc-pkg/ghc-pkg.sh deleted file mode 100644 index d482fc094e..0000000000 --- a/utils/ghc-pkg/ghc-pkg.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Mini-driver for ghc-pkg -exec $GHCPKGBIN $PKGCONFOPT ${1+"$@"} diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile index 07e574c0ac..38be1f4d71 100644 --- a/utils/hsc2hs/Makefile +++ b/utils/hsc2hs/Makefile @@ -5,8 +5,6 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -INSTALLING=1 - # This causes libghccompat.a to be used: include $(GHC_COMPAT_DIR)/compat.mk @@ -28,77 +26,57 @@ endif # clean solution impossible. So we revert to a hack in Main.hs... SRC_HC_OPTS += -Wall -ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -INSTALLED_SCRIPT_PROG = hsc2hs-ghc -endif -INPLACE_SCRIPT_PROG = hsc2hs-inplace - -ifeq "$(INSTALLING)" "1" -TOP_PWD := $(prefix) -SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) -else -TOP_PWD := $(FPTOOLS_TOP_ABS) -SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) -endif - -ifeq "$(INSTALLING)" "1" -ifeq "$(BIN_DIST)" "1" -HSC2HS_BINDIR=$$\"\"libexecdir -HSC2HS_DIR=$$\"\"libdir -HSC2HS_EXTRA= -else -HSC2HS_BINDIR=$(libexecdir) -HSC2HS_DIR=$(libdir) -HSC2HS_EXTRA=--cc=$(bindir)/ghc-$(ProjectVersion) -endif # BIN_DIST -else -HSC2HS_BINDIR=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL) -HSC2HS_DIR=$(FPTOOLS_TOP_ABS_PLATFORM)/$(GHC_HSC2HS_DIR_REL) +# ----------------------------------------------------------------------------- +# hsc2hs script ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" extra_flags=$(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS))) endif +HSC2HS_INPLACE_EXTRA=--cc=$(CC) --ld=$(CC) $(extra_flags) --cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt) -I$(FPTOOLS_TOP_ABS_PLATFORM)/$(GHC_INCLUDE_DIR_REL) -HSC2HS_EXTRA=--cc=$(CC) --ld=$(CC) $(extra_flags) --cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt) -I$(FPTOOLS_TOP_ABS_PLATFORM)/$(GHC_INCLUDE_DIR_REL) +ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" +# See "MSys Note 3" in compiler/Makefile +INPLACE_SCRIPT=hsc2hs-inplace.bat +FULL_INPLACE_PATH=$(subst /,\,$(FPTOOLS_TOP_ABS_PLATFORM)/utils/hsc2hs/) +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo '@call $(FULL_INPLACE_PATH)$(HS_PROG)) ----template=$(FULL_INPLACE_PATH)template-hsc.h $(HSC2HS_EXTRA) %*' >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) +else +INPLACE_SCRIPT=hsc2hs-inplace +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo "#!$(SHELL)" >> $(INPLACE_SCRIPT) + echo "HSC2HS_BINDIR=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)" >> $(INPLACE_SCRIPT) + echo "HSC2HS_DIR=$(FPTOOLS_TOP_ABS_PLATFORM)/$(GHC_HSC2HS_DIR_REL)" >> $(INPLACE_SCRIPT) + echo "HS_PROG=$(HS_PROG)" >> $(INPLACE_SCRIPT) + echo "HSC2HS_EXTRA=$(HSC2HS_INPLACE_EXTRA)" >> $(INPLACE_SCRIPT) + cat hsc2hs.sh >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) endif +CLEAN_FILES += $(INPLACE_SCRIPT) -$(SCRIPT_PROG) : Makefile -$(INSTALLED_SCRIPT_PROG) : $(TOP)/mk/config.mk - -SCRIPT_SUBST_VARS = HSC2HS_BINDIR HSC2HS_DIR HS_PROG HSC2HS_EXTRA - -SCRIPT_OBJS=hsc2hs.sh -INTERP=$(SHELL) - -ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" -INSTALL_SCRIPTS += $(SCRIPT_PROG) -INSTALL_LIBEXECS += $(HS_PROG) -else +ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALL_PROGS += $(HS_PROG) +else +INSTALL_LIBEXECS += $(HS_PROG) +LINK = hsc2hs +LINK_TARGET = $(LINK)-$(ProjectVersion) +INSTALLED_SCRIPT=$(bindir)/$(LINK_TARGET) +install:: + $(RM) -f $(INSTALLED_SCRIPT) + echo "#!$(SHELL)" >> $(INSTALLED_SCRIPT) + echo "HSC2HS_BINDIR=$(libexecdir)" >> $(INSTALLED_SCRIPT) + echo "HSC2HS_DIR=$(libdir)" >> $(INSTALLED_SCRIPT) + echo "HS_PROG=$(HS_PROG)" >> $(INSTALLED_SCRIPT) + echo "HSC2HS_EXTRA=" >> $(INSTALLED_SCRIPT) + cat hsc2hs.sh >> $(INSTALLED_SCRIPT) + $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) endif -override datadir=$(libdir) -INSTALL_DATAS += template-hsc.h - # ----------------------------------------------------------------------------- -# don't recurse on 'make install' -# -ifeq "$(INSTALLING)" "1" -all :: $(HS_PROG) - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ -clean distclean maintainer-clean :: - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ -endif - -ifeq "$(INSTALLING)$(HOSTPLATFORM)" "0i386-unknown-mingw32" -all :: $(INPLACE_SCRIPT_PROG).bat - -# See "MSys Note 3" in compiler/Makefile -FULL_INPLACE_PATH=$(subst /,\,$(FPTOOLS_TOP_ABS_PLATFORM)/utils/hsc2hs/) -$(INPLACE_SCRIPT_PROG).bat : - echo '@call $(FULL_INPLACE_PATH)$(HS_PROG) --template=$(FULL_INPLACE_PATH)template-hsc.h $(HSC2HS_EXTRA) %*' >> $@ - chmod 755 $@ -endif +override datadir=$(libdir) +INSTALL_DATAS += template-hsc.h include $(TOP)/mk/target.mk diff --git a/utils/hstags/Makefile b/utils/hstags/Makefile index 981bafd897..f1ce8e1320 100644 --- a/utils/hstags/Makefile +++ b/utils/hstags/Makefile @@ -16,10 +16,6 @@ SCRIPT_SUBST_VARS=\ TOP_PWD \ ProjectVersionInt -ifneq "$(BIN_DIST)" "1" -SCRIPT_SUBST_VARS += libdir libexecdir DEFAULT_TMPDIR -endif - # # The hstags script is configured with different # set of config variables, depending on whether it @@ -27,9 +23,7 @@ endif # ifeq "$(INSTALLING)" "1" TOP_PWD := $(prefix) -ifeq "$(BIN_DIST)" "1" SCRIPT_PREFIX_FILES += prefix.txt -endif else TOP_PWD := $(FPTOOLS_TOP_ABS) HSP_IMPORTS:="$(TOP_PWD)/ghc/lib/ghc":"$(TOP_PWD)/ghc/lib/required":"$(TOP_PWD)/ghc/lib/glaExts":"$(TOP_PWD)/ghc/lib/concurrent" @@ -66,5 +60,5 @@ include $(TOP)/mk/target.mk # install :: @$(RM) $(SCRIPT_PROG) - @$(MAKE) $(MFLAGS) BIN_DIST=0 $(SCRIPT_PROG) + @$(MAKE) $(MFLAGS) $(SCRIPT_PROG) diff --git a/utils/mkdependC/Makefile b/utils/mkdependC/Makefile index 9b07685bb3..9c00c09018 100644 --- a/utils/mkdependC/Makefile +++ b/utils/mkdependC/Makefile @@ -7,15 +7,15 @@ include $(TOP)/mk/boilerplate.mk boot :: all -SCRIPT_PROG=mkdependC -SCRIPT_OBJS=mkdependC.prl -# -# Prepend (perl) bindings for these Makefile variables -# when creating `mkdependC' (a more flexible way of doing msub). -# -SCRIPT_SUBST_VARS=DEFAULT_TMPDIR CPP BUILDPLATFORM - -CLEAN_FILES += $(SCRIPT_PROG) -INTERP=perl +PROG=mkdependC +CLEAN_FILES += $(PROG) +all:: + $(RM) -f $(PROG) + echo '#!$(PERL)' >> $(PROG) + echo '$$DEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)";' >> $(PROG) + echo '$$CPP = "$(CPP)";' >> $(PROG) + echo '$$BUILDPLATFORM = "$(BUILDPLATFORM)";' >> $(PROG) + cat $(PROG).prl >> $(PROG) + $(EXECUTABLE_FILE) $(PROG) include $(TOP)/mk/target.mk diff --git a/utils/mkdirhier/Makefile b/utils/mkdirhier/Makefile index f698112dbb..1190557655 100644 --- a/utils/mkdirhier/Makefile +++ b/utils/mkdirhier/Makefile @@ -3,9 +3,12 @@ include $(TOP)/mk/boilerplate.mk boot :: all -SCRIPT_PROG=mkdirhier -SCRIPT_OBJS=mkdirhier.sh -INTERP=$(SHELL) -CLEAN_FILES += $(SCRIPT_PROG) +PROG=mkdirhier +CLEAN_FILES += $(PROG) +all:: + $(RM) -f $(PROG) + echo '#!$(SHELL)' >> $(PROG) + cat $(PROG).sh >> $(PROG) + $(EXECUTABLE_FILE) $(PROG) include $(TOP)/mk/target.mk diff --git a/utils/parallel/Makefile b/utils/parallel/Makefile index 094c5cbba1..b297de04c5 100644 --- a/utils/parallel/Makefile +++ b/utils/parallel/Makefile @@ -1,49 +1,45 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk +# +# You'll only get this with Parallel Haskell or +# GranSim.. +# +ifeq "$(BuildingParallel)" "YES" +INSTALL_PARALLEL_SCRIPTS = YES +endif +ifeq "$(BuildingGranSim)" "YES" +INSTALL_PARALLEL_SCRIPTS = YES +endif + +ifeq "$(INSTALL_PARALLEL_SCRIPTS)" "YES" + PERL_PROGS = \ grs2gr gr2qp qp2ps ghc-fool-sort ghc-unfool-sort gr2pe gr2java \ qp2ap gr2RTS RTS2gran gran-extr gp-ext-imp tf avg-RTS SPLIT \ AVG SN get_SN sn_filter ps-scale-y - BASH_PROGS = gr2ps gr2jv gr2ap gr2gran -# -# One rule fits all, not particularly selective. -# -$(PERL_PROGS) : $(patsubst %,%.pl,$(PERL_PROGS)) -$(BASH_PROGS) : $(patsubst %,%.bash,$(BASH_PROGS)) - +$(PERL_INSTALLERS) = $(addprefix install.perl.,$(PERL_PROGS)) +$(BASH_INSTALLERS) = $(addprefix install.bash.,$(BASH_PROGS)) -all :: $(PERL_PROGS) $(BASH_PROGS) +.PHONY: install.perl.% +.PHONY: install.bash.% -$(PERL_PROGS) : - $(RM) $@ - @echo Creating $@... - @echo "#!"$(PERL) > $@ - @cat $@.pl >> $@ - @chmod a+x $@ +install :: $(PERL_INSTALLERS) $(BASH_INSTALLERS) -$(BASH_PROGS) : - $(RM) $@ - @echo Creating $@... - @echo "#!"$(BASH) > $@ - @cat $@.bash >> $@ - @chmod a+x $@ +$(PERL_INSTALLERS): install.perl.%: + rm -f $(bindir)/$* + echo "#!$(PERL)" >> $(bindir)/$* + cat $*.pl >> $(bindir)/$* + $(EXECUTABLE_FILE) $(bindir)/$* -# -# You'll only get this with Parallel Haskell or -# GranSim.. -# -ifeq "$(BuildingParallel)" "YES" -INSTALL_SCRIPTS += $(BASH_PROGS) $(PERL_PROGS) -else -ifeq "$(BuildingGranSim)" "YES" -INSTALL_SCRIPTS += $(BASH_PROGS) $(PERL_PROGS) +$(BASH_INSTALLERS): install.bash.%: + rm -f $(bindir)/$* + echo "#!$(BASH)" >> $(bindir)/$* + cat $*.bash >> $(bindir)/$* + $(EXECUTABLE_FILE) $(bindir)/$* endif -endif - -CLEAN_FILES += $(BASH_PROGS) $(PERL_PROGS) include $(TOP)/mk/target.mk diff --git a/utils/prof/Makefile b/utils/prof/Makefile index 994d8c83f5..28e6f50bd6 100644 --- a/utils/prof/Makefile +++ b/utils/prof/Makefile @@ -1,40 +1,30 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -INSTALLING=1 - -ifeq "$(INSTALLING)" "1" SUBDIRS = cgprof icons -endif - -SCRIPT_SUBST_VARS= \ - FPTOOLS_TOP_ABS \ - INSTALLING \ - DEFAULT_TMPDIR \ - TARGETPLATFORM - -INSTALLED_SCRIPT_PROG = ghcprof -INPLACE_SCRIPT_PROG = ghcprof-inplace - -ifeq "$(INSTALLING)" "1" -SCRIPT_PROG = $(INSTALLED_SCRIPT_PROG) -else -SCRIPT_PROG = $(INPLACE_SCRIPT_PROG) -endif - -ifneq "$(BIN_DIST)" "1" -SCRIPT_SUBST_VARS += libdir libexecdir -endif - -# don't recurse on 'make install' -# -ifeq "$(INSTALLING)" "1" -all clean distclean mostlyclean maintainer-clean :: - $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ -endif -INTERP = perl -SCRIPT_OBJS = ghcprof.prl -INSTALL_SCRIPTS += $(SCRIPT_PROG) +INPLACE_SCRIPT=ghcprof-inplace +all:: + $(RM) -f $(INPLACE_SCRIPT) + echo '#!$(PERL)' >> $(INPLACE_SCRIPT) + echo '$$DEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)";' >> $(INPLACE_SCRIPT) + echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(INPLACE_SCRIPT) + echo '$$icondir = "$(FPTOOLS_TOP_ABS)/ghc/utils/prof/icons";' >> $(INPLACE_SCRIPT) + echo '$$xmlparser = "$(FPTOOLS_TOP_ABS)/ghc/utils/prof/xmlparser/xmlparser";' >> $(INPLACE_SCRIPT) + echo '$$cgprof_dir = "$(FPTOOLS_TOP_ABS)/ghc/utils/prof/cgprof";' >> $(INPLACE_SCRIPT) + cat ghcprof.prl >> $(INPLACE_SCRIPT) + $(EXECUTABLE_FILE) $(INPLACE_SCRIPT) + +INSTALLED_SCRIPT=$(bindir)/ghcprof +install:: + $(RM) -f $(INSTALLED_SCRIPT) + echo '#!$(PERL)' >> $(INSTALLED_SCRIPT) + echo '$$DEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)";' >> $(INSTALLED_SCRIPT) + echo '$$TARGETPLATFORM = "$(TARGETPLATFORM)";' >> $(INSTALLED_SCRIPT) + echo '$$icondir = "$(libexecdir)/icons";' >> $(INSTALLED_SCRIPT) + echo '$$xmlparser = "$(libexecdir)/xmlparser";' >> $(INSTALLED_SCRIPT) + echo '$$cgprof_dir = "$(libexecdir)";' >> $(INSTALLED_SCRIPT) + cat ghcprof.prl >> $(INSTALLED_SCRIPT) + $(EXECUTABLE_FILE) $(INSTALLED_SCRIPT) include $(TOP)/mk/target.mk diff --git a/utils/prof/ghcprof.prl b/utils/prof/ghcprof.prl index bc3b344228..6ceb16af00 100644 --- a/utils/prof/ghcprof.prl +++ b/utils/prof/ghcprof.prl @@ -3,7 +3,7 @@ # # (c) The GHC Team 2000 # -# needs: FPTOOLS_TOP_ABS, INSTALLING, DEFAULT_TMPDIR, TARGETPLATFORM, libexecdir +# needs: DEFAULT_TMPDIR, TARGETPLATFORM, icondir, xmlparser, cgprof_dir # if ($ENV{'UDG_HOME'}) { @@ -20,15 +20,6 @@ $bsp_l = 12; $bsp_g = 13; $MaxNoNodes = 1900; -$icondir = ( $INSTALLING ? "$libexecdir/icons" - : "$FPTOOLS_TOP_ABS/ghc/utils/prof/icons" ); - -$xmlparser = ( $INSTALLING ? "$libexecdir/xmlparser" - : "$FPTOOLS_TOP_ABS/ghc/utils/prof/xmlparser/xmlparser" ); - -$cgprof_dir = ( $INSTALLING ? "$libexecdir" - : "$FPTOOLS_TOP_ABS/ghc/utils/prof/cgprof" ); - # where to make tmp file names? if ( $ENV{'TMPDIR'} ) { $Tmp_prefix = $ENV{'TMPDIR'} . "/ghcprof"; diff --git a/utils/runstdtest/Makefile b/utils/runstdtest/Makefile index 0bd2babfc2..5003bf79aa 100644 --- a/utils/runstdtest/Makefile +++ b/utils/runstdtest/Makefile @@ -1,12 +1,15 @@ TOP=../.. include $(TOP)/mk/boilerplate.mk -SCRIPT_PROG=runstdtest -SCRIPT_OBJS=runstdtest.prl -SCRIPT_SUBST_VARS=RM DEFAULT_TMPDIR CONTEXT_DIFF -INTERP=perl - -CLEAN_FILES += $(SCRIPT_PROG) -DESTDIR=$(INSTSCRIPTDIR) +PROG=runstdtest +CLEAN_FILES += $(PROG) +all:: + $(RM) -f $(PROG) + echo '#!$(PERL)' >> $(PROG) + echo '$$RM = "$(RM)";' >> $(PROG) + echo '$$DEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)";' >> $(PROG) + echo '$$CONTEXT_DIFF = "$(CONTEXT_DIFF)";' >> $(PROG) + cat $(PROG).prl >> $(PROG) + $(EXECUTABLE_FILE) $(PROG) include $(TOP)/mk/target.mk diff --git a/utils/stat2resid/Makefile b/utils/stat2resid/Makefile index f474f5229d..ef9ea2bcb2 100644 --- a/utils/stat2resid/Makefile +++ b/utils/stat2resid/Makefile @@ -13,24 +13,9 @@ SCRIPT_OBJS=stat2resid.prl # INSTALLING=0 -ifneq "$(BIN_DIST)" "1" -SCRIPT_SUBST_VARS=DEFAULT_TMPDIR -endif - INTERP=perl # -# The stat2resid script is configured with a different -# path to the supporting perl scripts, depending on whether it -# is to be installed or not. -# -ifeq "$(INSTALLING)" "1" -ifeq "$(BIN_DIST)" "1" -SCRIPT_PREFIX_FILES += prefix.txt -endif -endif - -# # install setup # INSTALL_LIBS += $(DYN_LOADABLE_BITS) |