From 51d7126ec1ac139e583af6375cde09acb8ddfed4 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 18 Sep 2008 13:36:36 +0000 Subject: [PATCH] Generate ghc.cabal and ghc-bin.cabal with configure This allows us to put the proper version number into them --- compiler/Makefile | 5 +++++ compiler/{ghc.cabal => ghc.cabal.in} | 3 +-- configure.ac | 2 +- ghc/Makefile | 6 ++++++ ghc/{ghc-bin.cabal => ghc-bin.cabal.in} | 3 +-- 5 files changed, 14 insertions(+), 5 deletions(-) rename compiler/{ghc.cabal => ghc.cabal.in} (99%) rename ghc/{ghc-bin.cabal => ghc-bin.cabal.in} (95%) diff --git a/compiler/Makefile b/compiler/Makefile index 912d6cc..592498f 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -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$* diff --git a/compiler/ghc.cabal b/compiler/ghc.cabal.in similarity index 99% rename from compiler/ghc.cabal rename to compiler/ghc.cabal.in index ce02408..156a2f8 100644 --- a/compiler/ghc.cabal +++ b/compiler/ghc.cabal.in @@ -1,6 +1,5 @@ Name: ghc --- XXX Version number! -Version: 6.9 +Version: @ProjectVersion@ Copyright: XXX -- License: XXX License-File: ../LICENSE diff --git a/configure.ac b/configure.ac index 734dbd7..6e2adb6 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/ghc/Makefile b/ghc/Makefile index 048b3a5..c0664df 100644 --- a/ghc/Makefile +++ b/ghc/Makefile @@ -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 diff --git a/ghc/ghc-bin.cabal b/ghc/ghc-bin.cabal.in similarity index 95% rename from ghc/ghc-bin.cabal rename to ghc/ghc-bin.cabal.in index ede227b..4e6d008 100644 --- a/ghc/ghc-bin.cabal +++ b/ghc/ghc-bin.cabal.in @@ -1,6 +1,5 @@ Name: ghc-bin --- XXX Version number! -Version: 6.9 +Version: @ProjectVersion@ Copyright: XXX -- License: XXX -- License-File: XXX -- 1.7.10.4