[commit: ghc] master: Use autoconf to generate version numbers for libiserv and friends (8f9f52d)

git at git.haskell.org git at git.haskell.org
Mon Nov 26 18:57:34 UTC 2018


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

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

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

commit 8f9f52d8e421ce544d5437a93117545d52d0eabd
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Mon Nov 26 12:59:30 2018 -0500

    Use autoconf to generate version numbers for libiserv and friends
    
    Summary:
    Currently, the version numbers for `libiserv`, `iserv`, and
    `iserv-proxy` are hard-coded directly into their `.cabal` files.
    These are easy to forget to update, and in fact, this has already
    happened once (see #15866). Let's use `autoconf` to do this for us
    so that it is not forgotten in the future.
    
    Test Plan: ./validate
    
    Reviewers: bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, erikd, carter
    
    GHC Trac Issues: #15866
    
    Differential Revision: https://phabricator.haskell.org/D5302


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

8f9f52d8e421ce544d5437a93117545d52d0eabd
 .gitignore                                                    |  3 +++
 configure.ac                                                  |  2 +-
 docs/users_guide/8.8.1-notes.rst                              |  1 +
 libraries/libiserv/{libiserv.cabal => libiserv.cabal.in}      |  8 ++++++--
 utils/iserv-proxy/{iserv-proxy.cabal => iserv-proxy.cabal.in} | 10 +++++++---
 utils/iserv/{iserv.cabal => iserv.cabal.in}                   | 10 +++++++---
 6 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index 59ca1cc..b205b24 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,6 +153,7 @@ _darcs/
 /libraries/hslogo-16.png
 /libraries/index-frames.html
 /libraries/index.html
+/libraries/libiserv/libiserv.cabal
 /libraries/minus.gif
 /libraries/ocean.css
 /libraries/plus.gif
@@ -178,6 +179,8 @@ _darcs/
 /testsuite_summary*.txt
 /testsuite*.xml
 /testlog*
+/utils/iserv/iserv.cabal
+/utils/iserv-proxy/iserv-proxy.cabal
 /utils/mkUserGuidePart/mkUserGuidePart.cabal
 /utils/runghc/runghc.cabal
 /utils/gen-dll/gen-dll.cabal
diff --git a/configure.ac b/configure.ac
index 5ae1c6a..88eddca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1334,7 +1334,7 @@ checkMake380() {
 checkMake380 make
 checkMake380 gmake
 
-AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk rts/rts.cabal compiler/ghc.cabal ghc/ghc-bin.cabal utils/runghc/runghc.cabal utils/gen-dll/gen-dll.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal libraries/ghc-heap/ghc-heap.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
+AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk rts/rts.cabal compiler/ghc.cabal ghc/ghc-bin.cabal utils/iserv/iserv.cabal utils/iserv-proxy/iserv-proxy.cabal utils/runghc/runghc.cabal utils/gen-dll/gen-dll.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal libraries/ghc-heap/ghc-heap.cabal libraries/libiserv/libiserv.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
 AC_OUTPUT
 [
 if test "$print_make_warning" = "true"; then
diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst
index 69b9c5d..6f6404e 100644
--- a/docs/users_guide/8.8.1-notes.rst
+++ b/docs/users_guide/8.8.1-notes.rst
@@ -176,6 +176,7 @@ for further change information.
     libraries/haskeline/haskeline.cabal:     Dependency of ``ghci`` executable
     libraries/hpc/hpc.cabal:                 Dependency of ``hpc`` executable
     libraries/integer-gmp/integer-gmp.cabal: Core library
+    libraries/libiserv/libiserv.cabal:       Internal compiler library
     libraries/mtl/mtl.cabal:                 Dependency of ``Cabal`` library
     libraries/parsec/parsec.cabal:           Dependency of ``Cabal`` library
     libraries/process/process.cabal:         Dependency of ``ghc`` library
diff --git a/libraries/libiserv/libiserv.cabal b/libraries/libiserv/libiserv.cabal.in
similarity index 80%
rename from libraries/libiserv/libiserv.cabal
rename to libraries/libiserv/libiserv.cabal.in
index 196d36c..31eaaeb 100644
--- a/libraries/libiserv/libiserv.cabal
+++ b/libraries/libiserv/libiserv.cabal.in
@@ -1,5 +1,9 @@
+-- WARNING: libiserv.cabal is automatically generated from libiserv.cabal.in by
+-- ../../configure.  Make sure you are editing libiserv.cabal.in, not
+-- libiserv.cabal.
+
 Name: libiserv
-Version: 8.7.1
+Version: @ProjectVersionMunged@
 Copyright: XXX
 License: BSD3
 License-File: LICENSE
@@ -25,7 +29,7 @@ Library
                    bytestring >= 0.10 && < 0.11,
                    containers >= 0.5 && < 0.7,
                    deepseq    >= 1.4 && < 1.5,
-                   ghci       == 8.7.*
+                   ghci       == @ProjectVersionMunged@
     if flag(network)
        Exposed-Modules: Remote.Message
                       , Remote.Slave
diff --git a/utils/iserv-proxy/iserv-proxy.cabal b/utils/iserv-proxy/iserv-proxy.cabal.in
similarity index 90%
rename from utils/iserv-proxy/iserv-proxy.cabal
rename to utils/iserv-proxy/iserv-proxy.cabal.in
index 5d276b2..0819064 100644
--- a/utils/iserv-proxy/iserv-proxy.cabal
+++ b/utils/iserv-proxy/iserv-proxy.cabal.in
@@ -1,5 +1,9 @@
+-- WARNING: iserv-proxy.cabal is automatically generated from iserv-proxy.cabal.in by
+-- ../../configure.  Make sure you are editing iserv-proxy.cabal.in, not
+-- iserv-proxy.cabal.
+
 Name: iserv-proxy
-Version: 8.6
+Version: @ProjectVersion@
 Copyright: XXX
 License: BSD3
 -- XXX License-File: LICENSE
@@ -74,5 +78,5 @@ Executable iserv-proxy
                   directory  >= 1.3 && < 1.4,
                   network    >= 2.6,
                   filepath   >= 1.4 && < 1.5,
-                  ghci       == 8.6.*,
-                  libiserv   == 8.6.*
+                  ghci       == @ProjectVersionMunged@,
+                  libiserv   == @ProjectVersionMunged@
diff --git a/utils/iserv/iserv.cabal b/utils/iserv/iserv.cabal.in
similarity index 81%
rename from utils/iserv/iserv.cabal
rename to utils/iserv/iserv.cabal.in
index 912734f..356c8a4 100644
--- a/utils/iserv/iserv.cabal
+++ b/utils/iserv/iserv.cabal.in
@@ -1,5 +1,9 @@
+-- WARNING: iserv.cabal is automatically generated from iserv.cabal.in by
+-- ../../configure.  Make sure you are editing iserv.cabal.in, not
+-- iserv.cabal.
+
 Name: iserv
-Version: 8.7.1
+Version: @ProjectVersion@
 Copyright: XXX
 License: BSD3
 -- XXX License-File: LICENSE
@@ -35,8 +39,8 @@ Executable iserv
                    bytestring >= 0.10 && < 0.11,
                    containers >= 0.5 && < 0.7,
                    deepseq    >= 1.4 && < 1.5,
-                   ghci       == 8.7.*,
-                   libiserv   == 8.7.*
+                   ghci       == @ProjectVersionMunged@,
+                   libiserv   == @ProjectVersionMunged@
 
     if os(windows)
         Cpp-Options: -DWINDOWS



More information about the ghc-commits mailing list