2538 |
31 Jul 11 |
peter |
#! /bin/sh |
2538 |
31 Jul 11 |
peter |
# $Id$ |
2538 |
31 Jul 11 |
peter |
3 |
# |
3999 |
08 Oct 20 |
peter |
# Copyright (C) 2011, 2012, 2013, 2019, 2020 Peter Johansson |
2538 |
31 Jul 11 |
peter |
5 |
# |
2538 |
31 Jul 11 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2538 |
31 Jul 11 |
peter |
7 |
# |
2538 |
31 Jul 11 |
peter |
# The yat library is free software; you can redistribute it |
2538 |
31 Jul 11 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
2538 |
31 Jul 11 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2538 |
31 Jul 11 |
peter |
# License, or (at your option) any later version. |
2538 |
31 Jul 11 |
peter |
12 |
# |
2538 |
31 Jul 11 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2538 |
31 Jul 11 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2538 |
31 Jul 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2538 |
31 Jul 11 |
peter |
# General Public License for more details. |
2538 |
31 Jul 11 |
peter |
17 |
# |
2538 |
31 Jul 11 |
peter |
# You should have received a copy of the GNU General Public License |
2538 |
31 Jul 11 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2538 |
31 Jul 11 |
peter |
20 |
|
2538 |
31 Jul 11 |
peter |
21 |
|
2538 |
31 Jul 11 |
peter |
# test macro YAT_SVN_REVISION |
2538 |
31 Jul 11 |
peter |
23 |
|
2538 |
31 Jul 11 |
peter |
24 |
required="autoconf automake svnversion" |
2538 |
31 Jul 11 |
peter |
25 |
|
2538 |
31 Jul 11 |
peter |
26 |
set -e |
2538 |
31 Jul 11 |
peter |
27 |
|
3036 |
03 Jun 13 |
peter |
28 |
. test/init.sh || exit 99 |
2538 |
31 Jul 11 |
peter |
29 |
|
2538 |
31 Jul 11 |
peter |
30 |
cat >> configure.ac <<EOF |
2538 |
31 Jul 11 |
peter |
31 |
YAT_SVN_REVISION([my_svn_revision.am], [my_revision]) |
2538 |
31 Jul 11 |
peter |
32 |
AC_CONFIG_FILES([Makefile]) |
2538 |
31 Jul 11 |
peter |
33 |
AC_OUTPUT |
2538 |
31 Jul 11 |
peter |
34 |
EOF |
2538 |
31 Jul 11 |
peter |
35 |
|
2538 |
31 Jul 11 |
peter |
36 |
cat > Makefile.am <<EOF |
2543 |
04 Aug 11 |
peter |
37 |
ACLOCAL_AMFLAGS = -I m4 |
2538 |
31 Jul 11 |
peter |
38 |
EXTRA_DIST = |
2538 |
31 Jul 11 |
peter |
39 |
include my_svn_revision.am |
2538 |
31 Jul 11 |
peter |
40 |
EOF |
2538 |
31 Jul 11 |
peter |
41 |
|
2538 |
31 Jul 11 |
peter |
42 |
rm -f my_svn_revision.am |
2538 |
31 Jul 11 |
peter |
43 |
bootstrap |
2538 |
31 Jul 11 |
peter |
# automake should have complained about missing file, but why not... |
2538 |
31 Jul 11 |
peter |
45 |
test -r my_svn_revision.am || exit_fail |
2538 |
31 Jul 11 |
peter |
46 |
|
3783 |
09 Jan 19 |
peter |
47 |
cat my_svn_revision.am |
3783 |
09 Jan 19 |
peter |
48 |
grep '$@-t \\\\' my_svn_revision.am && exit_fail |
3783 |
09 Jan 19 |
peter |
49 |
|
2538 |
31 Jul 11 |
peter |
50 |
test -r my_revision || exit_fail |
2538 |
31 Jul 11 |
peter |
51 |
|
3112 |
10 Nov 13 |
peter |
52 |
./configure $configure_opts |
3945 |
20 Jul 20 |
peter |
53 |
$MAKE |
3783 |
09 Jan 19 |
peter |
54 |
|
3783 |
09 Jan 19 |
peter |
55 |
grep '$@-t \\\\$' Makefile && exit_fail |
3783 |
09 Jan 19 |
peter |
56 |
|
2538 |
31 Jul 11 |
peter |
57 |
exit_success; |