[commit: ghc] master: Build system: fix 'make install-strip' in bindist (aaed24a)

git at git.haskell.org git at git.haskell.org
Sat Dec 12 17:39:01 UTC 2015


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

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

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

commit aaed24a4e0d8fa0d49aca167fddfb8b606755e05
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Dec 12 17:02:28 2015 +0100

    Build system: fix 'make install-strip' in bindist
    
    The INSTALL_PROGRAM variable is set in mk/config.mk, so we have to
    include that file before using it.
    
    Running 'make install' before './configure' in a bindist will now also
    display a nice message.
    
    Reviewers: hvr, austin, bgamari
    
    Reviewed By: bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1604
    
    GHC Trac Issues: #1851


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

aaed24a4e0d8fa0d49aca167fddfb8b606755e05
 Makefile         | 25 +++++++++++++------------
 rules/haddock.mk |  2 ++
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 348375f..6be584f 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,18 @@
 MAKEFLAGS += --no-builtin-rules
 .SUFFIXES:
 
+ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
+-include mk/config.mk
+else
+include mk/config.mk
+ifeq "$(ProjectVersion)" ""
+$(error Please run ./configure first)
+endif
+endif
+
+include mk/custom-settings.mk
+
+
 ifeq "$(wildcard distrib/)" ""
 
 # We're in a bindist
@@ -45,7 +57,7 @@ install show:
 .PHONY: install-strip
 install-strip:
 	# See Note [install-strip].
-	$(MAKE) --no-print-directory -f ghc.mk INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
+	$(MAKE) --no-print-directory -f ghc.mk INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install BINDIST=YES NO_INCLUDE_DEPS=YES
 
 else
 
@@ -58,17 +70,6 @@ default : all
 help:
 	@cat MAKEHELP.md
 
-ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
--include mk/config.mk
-else
-include mk/config.mk
-ifeq "$(ProjectVersion)" ""
-$(error Please run ./configure first)
-endif
-endif
-
-include mk/custom-settings.mk
-
 # Verify that stage 0 LLVM backend isn't affected by Bug #9439 if needed
 ifeq "$(GHC_LLVM_AFFECTED_BY_9439)" "1"
 ifneq "$(findstring -fllvm,$(SRC_HC_OPTS) $(GhcHcOpts) $(GhcStage1HcOpts))" ""
diff --git a/rules/haddock.mk b/rules/haddock.mk
index e716bb8..f6978a7 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -10,11 +10,13 @@
 #
 # -----------------------------------------------------------------------------
 
+ifneq "$(BINDIST)" "YES"
 HADDOCK_VER := $(shell grep "^version:" utils/haddock/haddock.cabal | sed "s/version: *//")
 HADDOCK_MAJOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\1/')
 HADDOCK_MINOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\2/')
 HADDOCK_PATCH_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\3/')
 HADDOCK_VERSION_STRING := $(shell echo $$(($(HADDOCK_MAJOR_VER) * 1000 + $(HADDOCK_MINOR_VER) * 10 + $(HADDOCK_PATCH_VER))))
+endif
 
 define haddock  # args: $1 = dir,  $2 = distdir
 $(call trace, haddock($1,$2))



More information about the ghc-commits mailing list