@@ -15,7 +15,7 @@ find $BUILDDIR/* -not -name 'build.sh' -delete
15
15
# ========= symlink files to the build directory ==============
16
16
17
17
cp --symbolic-link $SRCDIR /* $BUILDDIR
18
- mv $BUILDDIR /configure.ac configure.ac.orig
18
+ mv $BUILDDIR /configure.ac $BUILDDIR / configure.ac.orig
19
19
20
20
# ========= patch the version in configure.ac ===================
21
21
@@ -25,11 +25,13 @@ VERSION=`grep '[[:space:]]*#[[:space:]]*define[[:space:]]*MVERSION[[:space:]]"[^
25
25
# extract the version (without quotes) from the saved line
26
26
VERSION=` echo $VERSION | sed ' s/[^"]*"\([^"]*\)"/\1/' `
27
27
28
- # find the line with the AC_INIT command, prepend the line number at the beginning
29
- AC_INIT_LINE=` grep -n ' [[:space:]]*AC_INIT[[:space:]]*(.*' $BUILDDIR /configure.ac.orig`
28
+ # find the line with the AC_INIT command, prepend the line number
29
+ # line-nr:AC_INIT([FULL-PACKAGE-NAME], [VERSION], [REPORT-ADDRESS])
30
+ AC_INIT_LINE=` grep -n ' [[:space:]]*AC_INIT[[:space:]]*(.*' $BUILDDIR /configure.ac.orig`
30
31
AC_INIT_LINE_NR=` echo $AC_INIT_LINE | sed ' s/\([0-9]*\).*/\1/' `
31
- # remove the line number
32
+ # AC_INIT([FULL-PACKAGE-NAME], [VERSION], [REPORT-ADDRESS])
32
33
AC_INIT_LINE=` echo $AC_INIT_LINE | sed ' s/[0-9]:\(.*\)/\1/' `
34
+ # replace the second parameter to AC_INIT
33
35
PATCHED_INIT_LINE=` echo $AC_INIT_LINE | sed " s/\\ ([[:space:]]*AC_INIT(.*\\ ),.*,\\ (.*\\ )/\\ 1, \[$VERSION \],\\ 2/" `
34
36
35
37
# replace the AC_INIT line with new content
0 commit comments