[commit: ghc] master: Build system: Cabalize genapply (0cc4aad)

git at git.haskell.org git at git.haskell.org
Thu Dec 17 11:54:22 UTC 2015


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

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

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

commit 0cc4aad36f91570b1b489e3d239256d1c781daac
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Dec 17 12:13:17 2015 +0100

    Build system: Cabalize genapply
    
    Test Plan: Validate
    
    Reviewers: thomie, austin
    
    Reviewed By: thomie, austin
    
    Differential Revision: https://phabricator.haskell.org/D1639


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

0cc4aad36f91570b1b489e3d239256d1c781daac
 utils/genapply/{GenApply.hs => Main.hs}                  |  1 -
 utils/{ghc-pwd/ghc-pwd.cabal => genapply/genapply.cabal} | 15 +++++++++++----
 utils/genapply/ghc.mk                                    | 14 +++++---------
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/utils/genapply/GenApply.hs b/utils/genapply/Main.hs
similarity index 97%
rename from utils/genapply/GenApply.hs
rename to utils/genapply/Main.hs
index 26b5154..e58a496 100644
--- a/utils/genapply/GenApply.hs
+++ b/utils/genapply/Main.hs
@@ -1042,4 +1042,3 @@ genBitmapArray types =
         where bitmap_val =
                 (fromIntegral (mkBitmap ty) `shiftL` BITMAP_BITS_SHIFT)
                  .|. sum (map argSize ty)
-
diff --git a/utils/ghc-pwd/ghc-pwd.cabal b/utils/genapply/genapply.cabal
similarity index 52%
copy from utils/ghc-pwd/ghc-pwd.cabal
copy to utils/genapply/genapply.cabal
index dcd9529..dba3b6d 100644
--- a/utils/ghc-pwd/ghc-pwd.cabal
+++ b/utils/genapply/genapply.cabal
@@ -1,4 +1,4 @@
-Name: ghc-pwd
+Name: genapply
 Version: 0.1
 Copyright: XXX
 License: BSD3
@@ -7,13 +7,20 @@ License: BSD3
 -- XXX Maintainer:
 Synopsis: XXX
 Description:
-	XXX
+  XXX
 build-type: Simple
 cabal-version: >=1.10
 
-Executable ghc-pwd
+Flag unregisterised
+    description: Are we building an unregisterised compiler?
+    default:     False
+    manual:      True
+
+Executable genapply
     Default-Language: Haskell2010
     Main-Is: Main.hs
     Build-Depends: base       >= 3   && < 5,
-                   directory  >= 1   && < 1.3
+                   pretty
 
+    if flag(unregisterised)
+        Cpp-Options: -DNO_REGS
diff --git a/utils/genapply/ghc.mk b/utils/genapply/ghc.mk
index 2eea233..e0e5886 100644
--- a/utils/genapply/ghc.mk
+++ b/utils/genapply/ghc.mk
@@ -10,18 +10,14 @@
 #
 # -----------------------------------------------------------------------------
 
-utils/genapply_dist_MODULES = GenApply
-utils/genapply_dist_PROGNAME = genapply
+utils/genapply_USES_CABAL           = YES
+utils/genapply_PACKAGE              = genapply
+utils/genapply_dist_PROGNAME        = genapply
+utils/genapply_dist_INSTALL         = NO
 utils/genapply_dist_INSTALL_INPLACE = YES
 
-utils/genapply_HC_OPTS += -package pretty
-
 ifeq "$(GhcUnregisterised)" "YES"
-utils/genapply_HC_OPTS += -DNO_REGS
+utils/genapply_CONFIGURE_OPTS = --flag unregisterised
 endif
 
-utils/genapply/GenApply.hs : includes/ghcconfig.h
-utils/genapply/GenApply.hs : includes/MachRegs.h
-utils/genapply/GenApply.hs : includes/Constants.h
-
 $(eval $(call build-prog,utils/genapply,dist,0))



More information about the ghc-commits mailing list