2 # Copyright (C) 2010 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 2, 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 # Check that distributed symlinks in the source tree will be expanded
18 # as regular files in $(distdir).
27 echo "$me: cannot create symlinks to files" >&2
44 ln -s "`pwd`/foo" quux
46 cat >> configure.
in << 'END'
50 echo "me = $me" > Makefile.am
# for better failure messages
51 cat >> Makefile.am
<< 'END'
52 EXTRA_DIST
= lnk B
/bbb bar1 bar2 bar3 quux
55 ls -l $
(distdir
) $
(distdir
)/B
56 fail
() { echo "$(me): $$*" >&2; e
=1; }; \
58 set file lnk A
/aaa B
/bbb foo quux foo bar1 foo bar2 foo bar3
; \
59 while test $
$# -ge 2; do \
60 file=$
$1; shift; link
=$
(distdir
)/$
$1; shift; \
61 test -f $
$link || fail
"$$link is not a regular file"; \
62 test ! -h $
$link || fail
"$$link is a symlink"; \
63 diff $
$file $
$link || fail
"$$link differs from $$file"; \