1 | #! /bin/sh
|
---|
2 | # Copyright (C) 2006 Free Software Foundation, Inc.
|
---|
3 | #
|
---|
4 | # This file is part of GNU Automake.
|
---|
5 | #
|
---|
6 | # GNU Automake is free software; you can redistribute it and/or modify
|
---|
7 | # it under the terms of the GNU General Public License as published by
|
---|
8 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | # any later version.
|
---|
10 | #
|
---|
11 | # GNU Automake is distributed in the hope that it will be useful,
|
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | # GNU General Public License for more details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License
|
---|
17 | # along with Automake; see the file COPYING. If not, write to
|
---|
18 | # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
---|
19 | # Boston, MA 02110-1301, USA.
|
---|
20 |
|
---|
21 | # test how well `missing' finds output file names of various tools.
|
---|
22 | # PR automake/483.
|
---|
23 |
|
---|
24 | . ./defs || exit 1
|
---|
25 |
|
---|
26 | set -e
|
---|
27 |
|
---|
28 | # these programs may be invoked by `missing'
|
---|
29 | needed_tools='chmod find sed test touch'
|
---|
30 | needed_tools_csep=`echo $needed_tools | sed 's/ /, /g'`
|
---|
31 |
|
---|
32 | cat >configure.in <<EOF
|
---|
33 | AC_INIT([missing4], [1.0])
|
---|
34 | m4_foreach([tool], [$needed_tools_csep],
|
---|
35 | [AC_PATH_PROG(tool, tool, [false])
|
---|
36 | AC_CONFIG_FILES(tool, chmod +x tool)
|
---|
37 | ])
|
---|
38 | AC_OUTPUT
|
---|
39 | EOF
|
---|
40 |
|
---|
41 | for tool in $needed_tools; do
|
---|
42 | cat >$tool.in <<EOF
|
---|
43 | #! /bin/sh
|
---|
44 | exec @$tool@ "\$@"
|
---|
45 | EOF
|
---|
46 | done
|
---|
47 |
|
---|
48 | $AUTOCONF
|
---|
49 | ./configure
|
---|
50 |
|
---|
51 | echo output-file > output-file
|
---|
52 | cp output-file my--output--file-o
|
---|
53 |
|
---|
54 | save_PATH=$PATH
|
---|
55 | PATH=.
|
---|
56 | export PATH
|
---|
57 | missing --help
|
---|
58 | missing --version
|
---|
59 | for tool in autom4te help2man makeinfo; do
|
---|
60 | missing --run $tool -o my--output--file-o input
|
---|
61 | missing --run $tool --output my--output--file-o input
|
---|
62 | done
|
---|
63 | PATH=$save_PATH
|
---|
64 | export PATH
|
---|
65 | diff output-file my--output--file-o
|
---|
66 | test ! -f ./--file-o
|
---|
67 | test ! -f input
|
---|