diff --git a/ghc/driver/Makefile b/ghc/driver/Makefile index 9fc7bff7b3bb4416ee184371a8a333d342098efb..53140a848542780d991ce2a535791115db6f6f9f 100644 --- a/ghc/driver/Makefile +++ b/ghc/driver/Makefile @@ -36,7 +36,7 @@ endif SCRIPT_SUBST_VARS := \ INSTALLING \ - PROJECTNAME PROJECTVERSION PROJECTPATCHLEVEL \ + ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel CURRENT_DIR HOSTPLATFORM TARGETPLATFORM \ GHC_LIB_DIR GHC_RUNTIME_DIR GHC_UTILS_DIR GHC_INCLUDE_DIR \ GHC_OPT_HILEV_ASM GhcWithNativeCodeGen LeadingUnderscore\ diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index 25d46bceabb23fda5e6c341defd9508e0893b8ef..0c0cb1ea47733b1955bfa9e814343d9c5e0787df 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -99,7 +99,7 @@ INSTALLING HOSTPLATFORM TARGETPLATFORM -PROJECTNAME PROJECTVERSION PROJECTPATCHLEVEL +ProjectName ProjectVersion ProjectVersionInt ProjectPatchLevel TOP_PWD @@ -379,7 +379,7 @@ require special handling. # We need to look in ghc/ and glaExts/ when searching for implicitly needed .hi files, but # we should really *not* look there for explicitly imported modules. -$GhcVersionInfo = int($PROJECTVERSION * 100 + .5); # i.e., round (X.Y * 100) +$GhcVersionInfo = $ProjectVersionInt $Haskell1Version = 4; # i.e., Haskell 1.4 @Cpp_define = (); @@ -1337,7 +1337,7 @@ if ($#Input_file < 0 && $#Link_file < 0) { Tell the world who we are, if they asked. \begin{code} -print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n" +print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n" if $Verbose; \end{code} @@ -1431,7 +1431,7 @@ eval 'exec perl -S \$0 \${1+"\$@"}' if \$running_under_some_shell; # =!=!=!=!=!=!=!=!=!=!=! # This script is automatically generated: DO NOT EDIT!!! -# Generated by Glasgow Haskell, version ${PROJECTVERSION} ${PROJECTPATCHLEVEL} +# Generated by Glasgow Haskell, version ${ProjectVersion} ${ProjectPatchLevel} # \$pvm_executable = '$pvm_executable'; \$pvm_executable_base = '$pvm_executable_base'; @@ -2579,7 +2579,7 @@ arg: while($_ = $Args[0]) { if (/^-\?$/ || /^--?help$/) { print $LongUsage; exit $Status; } #-----------version ---------------------------------------------------- - /^--version$/ && do { print STDERR "${PROJECTNAME}, version ${PROJECTVERSION}, patchlevel ${PROJECTPATCHLEVEL}\n"; exit $Status; }; + /^--version$/ && do { print STDERR "${ProjectName}, version ${ProjectVersion}, patchlevel ${ProjectPatchLevel}\n"; exit $Status; }; #---------- verbosity and such ----------------------------------------- /^-v$/ && do { $Verbose = '-v'; $Time = 'time'; next arg; }; diff --git a/ghc/mk/paths.mk b/ghc/mk/paths.mk index 4b11470fb266e22384979cee6ec725c3f63cc2b9..f995c4034936123e74dafd7bdd4784ae0db9ca47 100644 --- a/ghc/mk/paths.mk +++ b/ghc/mk/paths.mk @@ -3,12 +3,6 @@ # ghc project specific make variables # -# -PROJECTVERSION=$(GhcProjectVersion) -PROJECTNAME=$(GhcProjectName) -PROJECTPATCHLEVEL=$(GhcProjectPatchLevel) - - # Override default haskell compiler if required #HC = $(WithGhcHc) HaskellCompilerType = $(WithGhcHcType) diff --git a/ghc/utils/hstags/Makefile b/ghc/utils/hstags/Makefile index 4f46318bfbc39ba618de0b83d7fcb513b1263abd..c45966f0cc1df36014a4c2ac769037a8c96f2fc4 100644 --- a/ghc/utils/hstags/Makefile +++ b/ghc/utils/hstags/Makefile @@ -13,7 +13,7 @@ SCRIPT_OBJS=hstags.prl SCRIPT_SUBST_VARS=\ INSTALLING \ TOP_PWD \ - PROJECTVERSION + ProjectVersionInt ifneq "$(BIN_DIST)" "1" SCRIPT_SUBST_VARS += libdir TMPDIR diff --git a/ghc/utils/hstags/hstags.prl b/ghc/utils/hstags/hstags.prl index 9d4afddabc78bf5026c1c2ed980e08016b66bfc2..2b8370059b299c58d5c5b5c93eef1bed1f809fed 100644 --- a/ghc/utils/hstags/hstags.prl +++ b/ghc/utils/hstags/hstags.prl @@ -7,7 +7,7 @@ # TOP_PWD # libdir # libexecdir -# PROJECTVERSION +# ProjectVersionInt # HSP_IMPORTS if ( $ENV{'TMPDIR'} ) { # where to make tmp file names @@ -56,7 +56,7 @@ while ($ARGV[0] =~ /^-./) { push(@Files, $_); } -$ghc_version_info = int(${PROJECTVERSION} * 100); +$ghc_version_info = ${ProjectVersionInt} $DoHsCpp = ( ! $DoCpp ) ? 'cat' : "$HsCpp -D__HASKELL1__=2 -D__GLASGOW_HASKELL__=$ghc_version_info $Cpp_opts"; diff --git a/ghc/utils/mkdependHS/Makefile b/ghc/utils/mkdependHS/Makefile index e05813d3c7c342a2fc5be1735fc045138a83cd2f..abcd8f65a0c334e13eaee9d3484be849e47d4a24 100644 --- a/ghc/utils/mkdependHS/Makefile +++ b/ghc/utils/mkdependHS/Makefile @@ -9,7 +9,7 @@ SCRIPT_OBJS=mkdependHS.prl SCRIPT_SUBST_VARS= \ TOP_PWD \ INSTALLING \ - PROJECTVERSION + ProjectVersionInt INTERP=perl diff --git a/ghc/utils/mkdependHS/mkdependHS.prl b/ghc/utils/mkdependHS/mkdependHS.prl index afad027a40a8f7706e2a3c35d894e154f2f65e15..5bec22260f3f54abf3fe035b10b7b3b3c5af2e93 100644 --- a/ghc/utils/mkdependHS/mkdependHS.prl +++ b/ghc/utils/mkdependHS/mkdependHS.prl @@ -3,7 +3,7 @@ # # RAWCPP TMPDIR TOP_PWD # libdir libexecdir datadir INSTALLING -# PROJECTVERSION SED +# ProjectVersionInt SED # # tries to work like mkdependC - capable of dealing with: # @@ -87,7 +87,7 @@ $Begin_magic_str = "# DO NOT DELETE: Beginning of Haskell dependencies\n"; $End_magic_str = "# DO NOT DELETE: End of Haskell dependencies\n"; @Obj_suffix = ("o"); @File_suffix = (); -$ghc_version_info = int ( ${PROJECTVERSION} * 100 ); +$ghc_version_info = ${ProjectVersionInt} $Import_dirs = '.'; %Syslibs = (); diff --git a/mk/config.mk.in b/mk/config.mk.in index 538c1bac89485c2436351f5a3890218436f816bb..8e39638470e545b6b9c67c3b6d68f512fb03a383 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -128,6 +128,7 @@ Project = Ghc ProjectName = $($(Project)ProjectName) ProjectNameShort = $($(Project)ProjectNameShort) ProjectVersion = $($(Project)ProjectVersion) +ProjectVersionInt = $($(Project)ProjectVersionInt) ProjectPatchLevel = $($(Project)ProjectPatchLevel) ################################################################################# @@ -144,7 +145,8 @@ ProjectPatchLevel = $($(Project)ProjectPatchLevel) # GhcProjectName = The Glorious Glasgow Haskell Compilation System GhcProjectNameShort = ghc -GhcProjectVersion = 3.01 +GhcProjectVersion = 3.01 # treated as a *string* +GhcProjectVersionInt = 301 # treated as an *integer* (for cpp defines) GhcProjectPatchLevel = 0 #--------------------------------------------------------------- @@ -284,6 +286,7 @@ GhcBinDistBins = hp2ps HappyProjectName = Happy HappyProjectNameShort = happy HappyProjectVersion = 1.5 +HappyProjectVersionInt = 15 HappyProjectPatchLevel = 0 # The compiler you'd like to use to compile Happy