summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Sandberg Ericsson <adam@sandbergericsson.se>2020-02-22 20:13:02 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-27 16:23:25 -0500
commit59c023ba5ccb10fff62810591f20608bd73c97af (patch)
treeaa576b41f0e41b474b47250dba29cdba97c339c7
parent74311e10bbb6ced9cd3093c8949f2535a715d8f6 (diff)
downloadhaskell-59c023ba5ccb10fff62810591f20608bd73c97af.tar.gz
configure: correctly generate LIBRARY_template_haskell_VERSION
-rw-r--r--aclocal.m46
-rw-r--r--configure.ac6
2 files changed, 7 insertions, 5 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 5b16f6c3eb..a31bdbd124 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2127,14 +2127,14 @@ fi
AC_SUBST($1)
])
-# LIBRARY_VERSION(lib, [dir])
+# LIBRARY_VERSION(lib, [cabal_file])
# --------------------------------
# Gets the version number of a library.
# If $1 is ghc-prim, then we define LIBRARY_ghc_prim_VERSION as 1.2.3
# $2 points to the directory under libraries/
AC_DEFUN([LIBRARY_VERSION],[
-dir=m4_default([$2],[$1])
-LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/${dir}/$1.cabal | sed "s/.* //"`
+cabal_file=m4_default([$2],[$1/$1.cabal])
+LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/${cabal_file} | sed "s/.* //"`
AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
])
diff --git a/configure.ac b/configure.ac
index 02a04dd15f..7785884296 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1370,8 +1370,10 @@ dnl ** Determine library versions
dnl The packages below should include all packages needed by
dnl doc/users_guide/ghc_config.py.in.
LIBRARY_VERSION(base)
-LIBRARY_VERSION(Cabal, Cabal/Cabal)
-LIBRARY_VERSION(template-haskell)
+LIBRARY_VERSION(Cabal, Cabal/Cabal/Cabal.cabal)
+dnl template-haskell.cabal is generated later
+dnl but the .in file already has the version
+LIBRARY_VERSION(template-haskell, template-haskell/template-haskell.cabal.in)
LIBRARY_VERSION(array)
LIBRARY_VERSION(ghc-prim)
LIBRARY_VERSION(ghc-compact)