Use autoconf to generate version numbers for libiserv and friends
authorRyan Scott <ryan.gl.scott@gmail.com>
Mon, 26 Nov 2018 17:59:30 +0000 (12:59 -0500)
committerRyan Scott <ryan.gl.scott@gmail.com>
Mon, 26 Nov 2018 17:59:38 +0000 (12:59 -0500)
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

.gitignore
configure.ac
docs/users_guide/8.8.1-notes.rst
libraries/libiserv/libiserv.cabal.in [moved from libraries/libiserv/libiserv.cabal with 80% similarity]
utils/iserv-proxy/iserv-proxy.cabal.in [moved from utils/iserv-proxy/iserv-proxy.cabal with 90% similarity]
utils/iserv/iserv.cabal.in [moved from utils/iserv/iserv.cabal with 81% similarity]

index 59ca1cc..b205b24 100644 (file)
@@ -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
@@ -215,4 +218,4 @@ GIT_COMMIT_ID
 ghc.nix/
 
 
-.gdb_history
\ No newline at end of file
+.gdb_history
index 5ae1c6a..88eddca 100644 (file)
@@ -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
index 69b9c5d..6f6404e 100644 (file)
@@ -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
similarity index 80%
rename from libraries/libiserv/libiserv.cabal
rename to libraries/libiserv/libiserv.cabal.in
index 196d36c..31eaaeb 100644 (file)
@@ -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
similarity index 90%
rename from utils/iserv-proxy/iserv-proxy.cabal
rename to utils/iserv-proxy/iserv-proxy.cabal.in
index 5d276b2..0819064 100644 (file)
@@ -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@
similarity index 81%
rename from utils/iserv/iserv.cabal
rename to utils/iserv/iserv.cabal.in
index 912734f..356c8a4 100644 (file)
@@ -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