[commit: ghc] master: Build system: also put scripts in libexecdir/bin (c1bd3d4)

git at git.haskell.org git at git.haskell.org
Thu Dec 17 20:25:32 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c1bd3d444f8c52c688fdbea695ee0ae7f402945d/ghc

>---------------------------------------------------------------

commit c1bd3d444f8c52c688fdbea695ee0ae7f402945d
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Thu Dec 17 19:45:13 2015 +0100

    Build system: also put scripts in libexecdir/bin
    
    This follows a similar change in
    4905b83a2d448c65ccced385343d4e8124548a3b, where binaries are installed
    in libexecdir/bin instead of libexecdir.
    
    This fixes a problem with ghc not able to find ghc-split, when
    SplitObjs=YES.


>---------------------------------------------------------------

c1bd3d444f8c52c688fdbea695ee0ae7f402945d
 ghc.mk              | 17 ++++++-----------
 mk/install.mk.in    |  5 -----
 rules/build-perl.mk |  6 +++---
 3 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 64eb9bb..4455eb9 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -851,7 +851,7 @@ TAGS: TAGS_compiler
 # Installation
 
 install: install_libs install_packages install_libexecs \
-         install_bins install_topdirs
+         install_bins install_libexec_scripts
 ifeq "$(HADDOCK_DOCS)" "YES"
 install: install_docs
 endif
@@ -910,14 +910,11 @@ ifeq "$(Windows_Host)" "NO"
 endif
 endif
 
-install_topdirs: $(INSTALL_TOPDIR_BINS) $(INSTALL_TOPDIR_SCRIPTS)
-	$(INSTALL_DIR) "$(DESTDIR)$(topdir)"
-	for i in $(INSTALL_TOPDIR_BINS); do \
-		$(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(topdir)"; \
-	done
-ifneq "$(INSTALL_TOPDIR_SCRIPTS)" ""
-	for i in $(INSTALL_TOPDIR_SCRIPTS); do \
-		$(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(topdir)"; \
+install_libexec_scripts: $(INSTALL_LIBEXEC_SCRIPTS)
+ifneq "$(INSTALL_LIBEXEC_SCRIPTS)" ""
+	$(INSTALL_DIR) "$(DESTDIR)$(ghclibexecdir)/bin"
+	for i in $(INSTALL_LIBEXEC_SCRIPTS); do \
+		$(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibexecdir)/bin"; \
 	done
 endif
 
@@ -1035,8 +1032,6 @@ $(eval $(call bindist-list,.,\
     $(libffi_HEADERS) \
     $(INSTALL_LIBEXECS) \
     $(INSTALL_LIBEXEC_SCRIPTS) \
-    $(INSTALL_TOPDIR_BINS) \
-    $(INSTALL_TOPDIR_SCRIPTS) \
     $(INSTALL_BINS) \
     $(INSTALL_SCRIPTS) \
     $(INSTALL_MANPAGES) \
diff --git a/mk/install.mk.in b/mk/install.mk.in
index 38e6459..e404397 100644
--- a/mk/install.mk.in
+++ b/mk/install.mk.in
@@ -100,11 +100,6 @@ else
 
 # Unix: override libdir and datadir to put ghc-specific stuff in
 # a subdirectory with the version number included.
-#
-# datadir is set to libdir here as GHC needs package.conf and unlit
-# to be in the same place (and things like ghc-pkg need to agree on
-# where package.conf is, so we just set it globally).
-#
 ghclibdir     = $(libdir)/$(CrossCompilePrefix)ghc-$(ProjectVersion)
 ghcdocdir     = $(datarootdir)/doc/ghc
 endif
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 5a1660c..58660fc 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -36,7 +36,7 @@ ifneq "$$($$($1_$2_PROG)_INPLACE)" ""
 $$(error $$($1_$2_PROG)_INPLACE defined twice)
 endif
 ifeq "$$($1_$2_TOPDIR)" "YES"
-$$($1_$2_PROG)_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
+$$($1_$2_PROG)_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG)
 else
 $$($1_$2_PROG)_INPLACE = $$(INPLACE_BIN)/$$($1_$2_PROG)
 endif
@@ -66,11 +66,11 @@ $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
 endif
 
 ifeq "$$($1_$2_INSTALL)" "YES"
-# Don't add to INSTALL_BINS or INSTAL_TOPDIR_BINS, because they will get
+# Don't add to INSTALL_BINS or INSTALL_LIBEXECS, because they will get
 # stripped when calling 'make install-strip', and stripping a Perl script
 # doesn't work.
 ifeq "$$($1_$2_TOPDIR)" "YES"
-INSTALL_TOPDIR_SCRIPTS += $$($1_$2_INPLACE)
+INSTALL_LIBEXEC_SCRIPTS += $$($1_$2_INPLACE)
 else
 INSTALL_SCRIPTS += $$($1_$2_INPLACE)
 endif



More information about the ghc-commits mailing list