2 # Copyright (C) 2010-2012 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).
24 ln -s file lnk || skip_
"cannot create symlinks to files"
39 ln -s "$(pwd)/foo" quux
41 cat >> configure.ac
<< 'END'
45 echo "me = $me" > Makefile.am
# For better failure messages.
46 cat >> Makefile.am
<< 'END'
47 EXTRA_DIST
= lnk B
/bbb bar1 bar2 bar3 quux
50 ls -l $
(distdir
) $
(distdir
)/B
51 fail
() { echo "$(me): $$*" >&2; e
=1; }; \
53 set file lnk A
/aaa B
/bbb foo quux foo bar1 foo bar2 foo bar3
; \
54 while test $
$# -ge 2; do \
55 file=$
$1; shift; link
=$
(distdir
)/$
$1; shift; \
56 test -f $
$link || fail
"$$link is not a regular file"; \
57 test ! -h $
$link || fail
"$$link is a symlink"; \
58 diff $
$file $
$link || fail
"$$link differs from $$file"; \