[commit: ghc] master: Put libexec binaries in lib/bin/ rather than just lib/ (d106284)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d106284b4018efeb1f3cf2249a4a713539150376

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

commit d106284b4018efeb1f3cf2249a4a713539150376
Author: Ian Lynagh <[email protected]>
Date:   Thu Sep 27 14:35:05 2012 +0100

    Put libexec binaries in lib/bin/ rather than just lib/
    
    Some binaries are installed in lib/, so if we wanted them to have a
    shell wrapper then under the old scheme both the binary and the wrapper
    would be installed under lib/. Now the binary is put under lib/bin/,
    leaving lib/ for the wrapper.

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

 ghc.mk                 |   22 ++++++----------------
 rules/build-prog.mk    |    2 +-
 rules/shell-wrapper.mk |    2 +-
 3 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 2118202..5df8e55 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -796,7 +796,7 @@ TAGS: TAGS_compiler
 # Installation
 
 install: install_libs install_packages install_libexecs \
-         install_libexec_scripts install_bins install_topdirs
+         install_bins install_topdirs
 ifeq "$(HADDOCK_DOCS)" "YES"
 install: install_docs
 endif
@@ -826,27 +826,17 @@ install_libs: $(INSTALL_LIBS)
 		esac; \
 	done
 
-install_libexec_scripts: $(INSTALL_LIBEXEC_SCRIPTS)
-ifeq "$(INSTALL_LIBEXEC_SCRIPTS)" ""
-	@:
-else
-	$(call INSTALL_DIR,"$(DESTDIR)$(ghclibexecdir)")
-	for i in $(INSTALL_LIBEXEC_SCRIPTS); do \
-		$(call INSTALL_SCRIPT,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(ghclibexecdir)"); \
-	done
-endif
-
 install_libexecs:  $(INSTALL_LIBEXECS)
 ifeq "$(INSTALL_LIBEXECS)" ""
 	@:
 else
-	$(call INSTALL_DIR,"$(DESTDIR)$(ghclibexecdir)")
+	$(call INSTALL_DIR,"$(DESTDIR)$(ghclibexecdir)/bin")
 	for i in $(INSTALL_LIBEXECS); do \
-		$(call INSTALL_PROGRAM,$(INSTALL_BIN_OPTS),$$i,"$(DESTDIR)$(ghclibexecdir)"); \
+		$(call INSTALL_PROGRAM,$(INSTALL_BIN_OPTS),$$i,"$(DESTDIR)$(ghclibexecdir)/bin"); \
 	done
 # We rename ghc-stage2, so that the right program name is used in error
 # messages etc.
-	"$(MV)" "$(DESTDIR)$(ghclibexecdir)/ghc-stage$(INSTALL_GHC_STAGE)" "$(DESTDIR)$(ghclibexecdir)/ghc"
+	"$(MV)" "$(DESTDIR)$(ghclibexecdir)/bin/ghc-stage$(INSTALL_GHC_STAGE)" "$(DESTDIR)$(ghclibexecdir)/bin/ghc"
 endif
 
 install_topdirs: $(INSTALL_TOPDIRS)
@@ -884,8 +874,8 @@ INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
 # Install packages in the right order, so that ghc-pkg doesn't complain.
 # Also, install ghc-pkg first.
 ifeq "$(Windows)" "NO"
-INSTALLED_GHC_REAL=$(DESTDIR)$(ghclibexecdir)/ghc
-INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(ghclibexecdir)/ghc-pkg
+INSTALLED_GHC_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc
+INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc-pkg
 else
 INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe
 INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 2a76943..5e8b4ba 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -67,7 +67,7 @@ endif
 else
 # Where do we install the inplace version?
 ifeq "$$($1_$2_SHELL_WRAPPER) $$(Windows)" "YES NO"
-$1_$2_INPLACE = $$(INPLACE_LIB)/$$($1_$2_PROG)
+$1_$2_INPLACE = $$(INPLACE_LIB)/bin/$$($1_$2_PROG)
 else
 ifeq "$$($1_$2_TOPDIR)" "YES"
 $1_$2_INPLACE = $$(INPLACE_TOPDIR)/$$($1_$2_PROG)
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 1fab27f..6601e3c 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -59,7 +59,7 @@ install_$1_$2_wrapper:
 	$$(call removeFiles,                                        "$$(WRAPPER)")
 	$$(CREATE_SCRIPT)                                           "$$(WRAPPER)"
 	echo '#!$$(SHELL)'                                       >> "$$(WRAPPER)"
-	echo 'exedir="$$(ghclibexecdir)"'                        >> "$$(WRAPPER)"
+	echo 'exedir="$$(ghclibexecdir)/bin"'                    >> "$$(WRAPPER)"
 	echo 'exeprog="$$($1_$2_PROG)"'                          >> "$$(WRAPPER)"
 	echo 'executablename="$$$$exedir/$$$$exeprog"'           >> "$$(WRAPPER)"
 	echo 'datadir="$$(datadir)"'                             >> "$$(WRAPPER)"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.