2 # Copyright (C) 2009 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure `compile' deals correctly with w32 style paths.
23 cp "$testsrcdir/../lib/compile" .
29 test "X$arg" = X-o && exit 1
30 test "X$arg" = "X$amtest_source" && source_seen=yes
32 if test "$source_seen" != yes; then
33 echo "$0: no source file seen" >&2
36 if test ! -f "$amtest_source"; then
37 echo "$0: $amtest_source not readable" >&2
40 if test ! -d "$amtest_lock"; then
41 echo "$0: no lockdir $amtest_lock" >&2
49 # In case this test runs on a system with backslash directory separators:
50 mkdir libltdl libltdl/libltdl
52 # Backslashes in the input and the output name should be accepted.
53 # Since this test might run on non-w32 systems, we need to be careful not
54 # to use any backslash sequences which might be interpreted by `echo'.
55 amtest_source='libltdl\libltdl\slist.c'
56 amtest_object='libltdl\libltdl\libltdl_libltdl_la-slist.obj'
58 amtest_lock='slist_o.d'
59 export amtest_source amtest_object amtest_obj amtest_lock
62 ./compile ./mycc -c "$amtest_source" -o "$amtest_object"
63 test -f "$amtest_object"
66 # Absolute w32 paths should be accepted.
67 # Do not actually run this test on anything that could be w32.
68 test -d "C:\\" && Exit 77
69 # This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
70 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
71 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
75 amtest_source='C:\libltdl\libltdl\slist.c'
76 amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
78 amtest_lock='slist_o.d'
79 export amtest_source amtest_object amtest_obj amtest_lock
82 ./compile ./mycc -c "$amtest_source" -o "$amtest_object"
83 test -f "$amtest_object"