* t/built-sources.sh (Makefile.am): In a recipe, use 'printf', not 'echo',
to print a string containing a "\n" sequence, because that is interpreted
like a newline by the echo built-in of NetBSD 5.1 /bin/ksh.
* t/maken.sh: Don't expect the timestamp of the current directory to be
unchanged after "make -n" is run in it; this doesn't hold on NetBSD 5.1.
Instead, make the current directory unwritable before running "make -n",
to ensure attempts to modify the directory fail.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
noinst_PROGRAMS = bar baz
foo.c:
rm -f $@ $@-t
- echo '#include <stdio.h>' > $@-t
- echo 'int main (void)' >> $@-t
- echo '{ ' >> $@-t
- echo ' printf ("%s\n", FOOMSG);' >> $@-t
- echo ' return 0;' >> $@-t
- echo '}' >> $@-t
+ # Use printf, not echo, to avoid spurious interpretation of
+ # the "\n" as a newline (see on NetBSD 5.1).
+ printf '%s\n' '#include <stdio.h>' > $@-t
+ printf '%s\n' 'int main (void)' >> $@-t
+ printf '%s\n' '{ ' >> $@-t
+ printf '%s\n' ' printf ("%s\n", FOOMSG);' >> $@-t
+ printf '%s\n' ' return 0;' >> $@-t
+ printf '%s\n' '}' >> $@-t
mv -f $@-t $@
CLEANFILES = foo.c
END
for target in dist distcheck; do
echo stamp > stampfile
$sleep
+ chmod a-w .
$MAKE -n $target
$MAKE -n $target | grep stamp-sub-dist-hook
+ chmod u+w .
# No file has been actually touched or created.
- is_newest stampfile $(find .)
+ is_newest stampfile $(find . | grep -v '^\.$')
$MAKE test-no-distdir
done