[project @ 2000-11-10 14:29:20 by simonmar]
authorsimonmar <unknown>
Fri, 10 Nov 2000 14:29:21 +0000 (14:29 +0000)
committersimonmar <unknown>
Fri, 10 Nov 2000 14:29:21 +0000 (14:29 +0000)
cleanups; print the full version number of the building compiler
(inc. the patchlevel) in verbose mode.

ghc/compiler/Makefile
ghc/compiler/main/DriverFlags.hs
ghc/compiler/main/DriverUtil.hs
ghc/compiler/main/Main.hs

index e0c461f..0cdd97a 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.112 2000/11/08 13:51:16 simonmar Exp $
+# $Id: Makefile,v 1.113 2000/11/10 14:29:20 simonmar Exp $
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
@@ -39,6 +39,7 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile
        @echo "cProjectName          = \"$(ProjectName)\"" >> $(CONFIG_HS)
        @echo "cProjectVersion       = \"$(ProjectVersion)\"" >> $(CONFIG_HS)
        @echo "cProjectVersionInt    = \"$(ProjectVersionInt)\"" >> $(CONFIG_HS)
+       @echo "cBooterVersion        = \"$(GhcVersion)\"" >> $(CONFIG_HS)
        @echo "cHscIfaceFileVersion  = \"$(HscIfaceFileVersion)\"" >> $(CONFIG_HS)
        @echo "cHOSTPLATFORM         = \"$(HOSTPLATFORM)\"" >> $(CONFIG_HS)
        @echo "cTARGETPLATFORM       = \"$(TARGETPLATFORM)\"" >> $(CONFIG_HS)
index aca47d8..75462ca 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.16 2000/11/08 16:24:34 simonmar Exp $
+-- $Id: DriverFlags.hs,v 1.17 2000/11/10 14:29:21 simonmar Exp $
 --
 -- Driver flags
 --
@@ -147,9 +147,9 @@ static_flags =
 
       ------- version ----------------------------------------------------
   ,  ( "-version"       , NoArg (do hPutStrLn stdout (cProjectName
-                                     ++ ", version " ++ version_str)
+                                     ++ ", version " ++ cProjectVersion)
                                     exitWith ExitSuccess))
-  ,  ( "-numeric-version", NoArg (do hPutStrLn stdout version_str
+  ,  ( "-numeric-version", NoArg (do hPutStrLn stdout cProjectVersion
                                     exitWith ExitSuccess))
 
       ------- verbosity ----------------------------------------------------
index 9a92b83..8215996 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.5 2000/10/27 13:50:25 sewardj Exp $
+-- $Id: DriverUtil.hs,v 1.6 2000/11/10 14:29:21 simonmar Exp $
 --
 -- Utils for the driver
 --
@@ -42,8 +42,6 @@ long_usage = do
      dump ('$':'$':s) = hPutStr stderr get_prog_name >> dump s
      dump (c:s) = hPutChar stderr c >> dump s
 
-version_str = cProjectVersion
-
 data BarfKind
   = PhaseFailed String ExitCode
   | Interrupted
@@ -164,10 +162,3 @@ newdir dir s = dir ++ '/':drop_longest_prefix s '/'
 
 remove_spaces :: String -> String
 remove_spaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace
-
-booter_version
- = case "\ 
-       \ __GLASGOW_HASKELL__" of
-    ' ':n:ns -> n:'.':ns
-    ' ':m    -> m
-
index 7dfcd97..efaf532 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -W -fno-warn-incomplete-patterns #-}
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.18 2000/11/08 15:25:25 simonmar Exp $
+-- $Id: Main.hs,v 1.19 2000/11/10 14:29:21 simonmar Exp $
 --
 -- GHC Driver program
 --
@@ -208,9 +208,9 @@ main =
    verb <- readIORef v_Verbose
 
    when verb (do hPutStr stderr "Glasgow Haskell Compiler, Version "
-                hPutStr stderr version_str
+                hPutStr stderr cProjectVersion
                 hPutStr stderr ", for Haskell 98, compiled by GHC version "
-                hPutStrLn stderr booter_version)
+                hPutStrLn stderr cBooterVersion)
 
    when verb (hPutStrLn stderr ("Using package config file: " ++ conf_file))