4326 |
12 Mar 23 |
peter |
#! /bin/sh |
4326 |
12 Mar 23 |
peter |
# $Id$ |
4326 |
12 Mar 23 |
peter |
3 |
# |
4326 |
12 Mar 23 |
peter |
# Copyright (C) 2023 Peter Johansson |
4326 |
12 Mar 23 |
peter |
5 |
# |
4326 |
12 Mar 23 |
peter |
# This file is part of the yat library, https://dev.thep.lu.se/yat |
4326 |
12 Mar 23 |
peter |
7 |
# |
4326 |
12 Mar 23 |
peter |
# The yat library is free software; you can redistribute it |
4326 |
12 Mar 23 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
4326 |
12 Mar 23 |
peter |
# published by the Free Software Foundation; either version 3 of the |
4326 |
12 Mar 23 |
peter |
# License, or (at your option) any later version. |
4326 |
12 Mar 23 |
peter |
12 |
# |
4326 |
12 Mar 23 |
peter |
# The yat library is distributed in the hope that it will be useful, |
4326 |
12 Mar 23 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4326 |
12 Mar 23 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4326 |
12 Mar 23 |
peter |
# General Public License for more details. |
4326 |
12 Mar 23 |
peter |
17 |
# |
4326 |
12 Mar 23 |
peter |
# You should have received a copy of the GNU General Public License |
4326 |
12 Mar 23 |
peter |
# along with yat. If not, see <https://www.gnu.org/licenses/>. |
4326 |
12 Mar 23 |
peter |
20 |
|
4326 |
12 Mar 23 |
peter |
21 |
|
4326 |
12 Mar 23 |
peter |
# test macro YAT_AM_LOCAL |
4326 |
12 Mar 23 |
peter |
23 |
|
4326 |
12 Mar 23 |
peter |
24 |
required="autoconf automake svnversion" |
4326 |
12 Mar 23 |
peter |
25 |
|
4326 |
12 Mar 23 |
peter |
26 |
set -e |
4326 |
12 Mar 23 |
peter |
27 |
|
4326 |
12 Mar 23 |
peter |
28 |
. test/init.sh || exit 99 |
4326 |
12 Mar 23 |
peter |
29 |
|
4326 |
12 Mar 23 |
peter |
30 |
cat >> configure.ac <<EOF |
4326 |
12 Mar 23 |
peter |
31 |
AC_PROG_CXX |
4326 |
12 Mar 23 |
peter |
32 |
|
4326 |
12 Mar 23 |
peter |
33 |
YAT_AM_LOCAL |
4326 |
12 Mar 23 |
peter |
34 |
YAT_SVN_REVISION |
4326 |
12 Mar 23 |
peter |
35 |
YAT_REVISION_HEADER |
4326 |
12 Mar 23 |
peter |
36 |
YAT_SVN_TIMESTAMP |
4326 |
12 Mar 23 |
peter |
37 |
YAT_SVN_RELEASE_YEAR |
4326 |
12 Mar 23 |
peter |
38 |
YAT_SVN_RELEASE(,[1.0], [helloworld.org], [download.me], [news.org]) |
4326 |
12 Mar 23 |
peter |
39 |
|
4326 |
12 Mar 23 |
peter |
40 |
AC_CONFIG_FILES([Makefile]) |
4326 |
12 Mar 23 |
peter |
41 |
AC_OUTPUT |
4326 |
12 Mar 23 |
peter |
42 |
EOF |
4326 |
12 Mar 23 |
peter |
43 |
|
4326 |
12 Mar 23 |
peter |
44 |
cat > Makefile.am <<EOF |
4326 |
12 Mar 23 |
peter |
45 |
EXTRA_PROGRAMS = hello.test |
4326 |
12 Mar 23 |
peter |
46 |
hello_test_SOURCES = hello.cc |
4326 |
12 Mar 23 |
peter |
47 |
TESTS = hello.test |
4326 |
12 Mar 23 |
peter |
48 |
|
4326 |
12 Mar 23 |
peter |
49 |
CLEANFILES = hello.test |
4326 |
12 Mar 23 |
peter |
50 |
|
4326 |
12 Mar 23 |
peter |
51 |
ACLOCAL_AMFLAGS = -I m4 |
4326 |
12 Mar 23 |
peter |
52 |
BUILT_SOURCES = |
4326 |
12 Mar 23 |
peter |
53 |
CONFIG_STATUS_DEPENDENCIES = |
4326 |
12 Mar 23 |
peter |
54 |
DISTCLEANFILES = |
4326 |
12 Mar 23 |
peter |
55 |
EXTRA_DIST = |
4326 |
12 Mar 23 |
peter |
56 |
yat_am_dist_hooks = |
4326 |
12 Mar 23 |
peter |
57 |
|
4326 |
12 Mar 23 |
peter |
58 |
include yat_am_local.am |
4326 |
12 Mar 23 |
peter |
59 |
|
4326 |
12 Mar 23 |
peter |
60 |
nodist_noinst_DATA = .timestamp |
4326 |
12 Mar 23 |
peter |
61 |
|
4326 |
12 Mar 23 |
peter |
62 |
dist-hook: \$(yat_am_dist_hooks) |
4326 |
12 Mar 23 |
peter |
63 |
|
4326 |
12 Mar 23 |
peter |
64 |
EOF |
4326 |
12 Mar 23 |
peter |
65 |
|
4326 |
12 Mar 23 |
peter |
66 |
cat > hello.cc <<EOF |
4326 |
12 Mar 23 |
peter |
#include "svn_revision.h" |
4326 |
12 Mar 23 |
peter |
68 |
|
4326 |
12 Mar 23 |
peter |
69 |
int main(void) |
4326 |
12 Mar 23 |
peter |
70 |
{ |
4326 |
12 Mar 23 |
peter |
#ifndef RELEASE_YEAR |
4326 |
12 Mar 23 |
peter |
#error release year not defined |
4326 |
12 Mar 23 |
peter |
#endif |
4326 |
12 Mar 23 |
peter |
74 |
return 0; |
4326 |
12 Mar 23 |
peter |
75 |
} |
4326 |
12 Mar 23 |
peter |
76 |
EOF |
4326 |
12 Mar 23 |
peter |
77 |
|
4326 |
12 Mar 23 |
peter |
78 |
$mkdir_p am |
4326 |
12 Mar 23 |
peter |
79 |
rm -f yat_am_local.am |
4326 |
12 Mar 23 |
peter |
80 |
bootstrap |
4326 |
12 Mar 23 |
peter |
81 |
test -e yat_am_local.am || exit_fail no file |
4326 |
12 Mar 23 |
peter |
82 |
|
4326 |
12 Mar 23 |
peter |
83 |
cat yat_am_local.am |
4326 |
12 Mar 23 |
peter |
84 |
|
4326 |
12 Mar 23 |
peter |
85 |
./configure $configure_opts |
4326 |
12 Mar 23 |
peter |
86 |
|
4326 |
12 Mar 23 |
peter |
87 |
$MAKE all |
4326 |
12 Mar 23 |
peter |
88 |
$MAKE check |
4326 |
12 Mar 23 |
peter |
89 |
$MAKE distcheck |
4326 |
12 Mar 23 |
peter |
90 |
|
4326 |
12 Mar 23 |
peter |
91 |
exit_success; |