[[project @ 2004-09-19 09:41:29 by panne] panne**20040919094129 Use version info from configure.ac ] { addfile ./ghc/VERSION.in addfile ./ghc/docs/users_guide/ug-book.xml.in hunk ./ghc/VERSION 1 -The Glasgow Haskell Compiler, version 6.3 rmfile ./ghc/VERSION hunk ./ghc/VERSION.in 1 +The @PACKAGE_NAME@, version @PACKAGE_VERSION@ hunk ./ghc/configure.ac 5 -# Compute the version number and the release, they are needed by the .spec file. -AC_SUBST([version], [[`sed 's/.* version \([0-9][0-9.]*\).*/\1/' VERSION`]]) +# Calculate project version as an integer, using 2 digits for minor version +case $PACKAGE_VERSION in + *.?) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(.\)$,\10\2,'` ;; + *.??) ProjectVersionInt=`echo "$PACKAGE_VERSION" | sed 's,^\(.*\)\.\(..\)$,\1\2,'` ;; + *) AC_MSG_ERROR([bad package version $PACKAGE_VERSION]) ;; +esac +AC_SUBST([ProjectVersionInt]) + +# Hmmm, we fix the RPM release number to 1 here... Is this convenient? hunk ./ghc/configure.ac 17 -AC_CONFIG_FILES([ghc.spec]) +AC_CONFIG_FILES([ghc.spec VERSION docs/users_guide/ug-book.xml]) hunk ./ghc/docs/users_guide/ug-book.xml 1 - - -The Glasgow Haskell Compiler User's Guide, Version 6.3 -The GHC Team -
-glasgow-haskell-{bugs,users}-request@haskell.org -
-
- -&license; -&intro; -&installing; -&ghci; -&using; -&prof; -&sooner; -&lang-features; -&ffi-chap; -&wrong; -&utils; -&win32-dll; -&bugs; -&faq; - - - rmfile ./ghc/docs/users_guide/ug-book.xml hunk ./ghc/docs/users_guide/ug-book.xml.in 1 + + +The @PACKAGE_NAME@ User's Guide, Version @PACKAGE_VERSION@ +The GHC Team +
+glasgow-haskell-{bugs,users}-request@haskell.org +
+
+ +&license; +&intro; +&installing; +&ghci; +&using; +&prof; +&sooner; +&lang-features; +&ffi-chap; +&wrong; +&utils; +&win32-dll; +&bugs; +&faq; + + + hunk ./ghc/ghc.spec.in 11 -%define version @version@ +%define version @PACKAGE_VERSION@ hunk ./ghc/mk/version.mk 39 -ProjectVersion = 6.3 -ProjectVersionInt = 603 +ProjectVersion = @PACKAGE_VERSION@ +ProjectVersionInt = @ProjectVersionInt@ }