Generate ghc.cabal and ghc-bin.cabal with configure
authorIan Lynagh <igloo@earth.li>
Thu, 18 Sep 2008 13:36:36 +0000 (13:36 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 18 Sep 2008 13:36:36 +0000 (13:36 +0000)
This allows us to put the proper version number into them

compiler/Makefile
compiler/ghc.cabal.in [moved from compiler/ghc.cabal with 99% similarity]
configure.ac
ghc/Makefile
ghc/ghc-bin.cabal.in [moved from ghc/ghc-bin.cabal with 95% similarity]

index 912d6cc..592498f 100644 (file)
@@ -71,6 +71,11 @@ else
 clean distclean:: clean.stage.$(stage)
 endif
 
+ifeq "$(CLEAN_ALL_STAGES)" "YES"
+distclean::
+       $(RM) -f ghc.cabal
+endif
+
 clean.stage.%:
        -$(CABAL) clean --distpref dist-stage$*
        $(RM) -f Makefile-stage$*
similarity index 99%
rename from compiler/ghc.cabal
rename to compiler/ghc.cabal.in
index ce02408..156a2f8 100644 (file)
@@ -1,6 +1,5 @@
 Name: ghc
--- XXX Version number!
-Version: 6.9
+Version: @ProjectVersion@
 Copyright: XXX
 -- License: XXX
 License-File: ../LICENSE
index 734dbd7..6e2adb6 100644 (file)
@@ -1276,6 +1276,6 @@ else
 fi
 AC_SUBST(HavePapi)
 
-AC_CONFIG_FILES([mk/config.mk ghc.spec extra-gcc-opts docs/users_guide/ug-book.xml])
+AC_CONFIG_FILES([mk/config.mk compiler/ghc.cabal ghc/ghc-bin.cabal ghc.spec extra-gcc-opts docs/users_guide/ug-book.xml])
 AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
 AC_OUTPUT
index 048b3a5..c0664df 100644 (file)
@@ -34,12 +34,18 @@ stage2 ::
 stage3 ::
        $(MAKE) stage=3
 
+
 ifeq "$(CLEAN_ALL_STAGES)" "YES"
 clean distclean:: clean.stage.1 clean.stage.2 clean.stage.3
 else
 clean distclean:: clean.stage.$(stage)
 endif
 
+ifeq "$(CLEAN_ALL_STAGES)" "YES"
+distclean::
+       $(RM) -f ghc-bin.cabal
+endif
+
 clean.stage.%:
        -$(CABAL) clean --distpref dist-stage$*
        $(RM) -rf stage$*-inplace
similarity index 95%
rename from ghc/ghc-bin.cabal
rename to ghc/ghc-bin.cabal.in
index ede227b..4e6d008 100644 (file)
@@ -1,6 +1,5 @@
 Name: ghc-bin
--- XXX Version number!
-Version: 6.9
+Version: @ProjectVersion@
 Copyright: XXX
 -- License: XXX
 -- License-File: XXX