blob: 50df5a51ccf67a10bc17fa46e0709fc937d11b7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#! /bin/sh
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Make sure that Makefile.in is not overwritten on error. Otherwise
# although the rebuilding rules would fail on error, they would
# succeed if make is run a second time immediately afterwards.
# Report from Harlan Stenn.
. test-init.sh
echo AC_OUTPUT>>configure.ac
: > Makefile.am
$ACLOCAL
# Create Makefile.in before configure. configure ensures files
# generated by it or later are newer than configure, so this allows
# us to avoid a $sleep before updating Makefile.am below.
$AUTOMAKE
$AUTOCONF
./configure
$MAKE
cat >Makefile.am <<END
AUTOMAKE_OPTIONS = -Werror
INCLUDES = -Ifoo
foo_SOURCES = unused
END
# This repetition is deliberate; see heading comments.
$MAKE && exit 1
$MAKE && exit 1
:
|