summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-07-08 20:09:59 +0200
committerJim Meyering <jim@meyering.net>2007-07-08 20:09:59 +0200
commit55c53863a87516e73c055c885dbefe80b003df82 (patch)
treec0ec94fd7a6a088dc7e24e0805b57f1951ec77ba /bootstrap
parent432a7c21f02654b2fc175d3c2038ae60413a607d (diff)
downloadcoreutils-55c53863a87516e73c055c885dbefe80b003df82.tar.xz
Run the coreutils-specific code only if tests/Makefile.am.in exists.
* bootstrap (mam_template): Move definition out of loop.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap30
1 files changed, 16 insertions, 14 deletions
diff --git a/bootstrap b/bootstrap
index 69dd57379..59c817df7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -484,20 +484,22 @@ fi
# Coreutils is unusual in that it generates some of its test-related
# Makefile.am files. That must be done before invoking automake.
-PERL=perl
-for tool in cut head join pr sort tac tail test tr uniq wc; do
- m=tests/$tool/Makefile.am
- t=${m}t
- mam_template=tests/Makefile.am.in
- rm -f $m $t
- sed -n '1,/^##test-files-begin/p' $mam_template > $t
- echo "x = $tool" >> $t
- srcdir=tests/$tool
- $PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
- sed -n '/^##test-files-end/,$p' $mam_template >> $t
- chmod -w $t
- mv $t $m
-done
+mam_template=tests/Makefile.am.in
+if test -f $mam_template; then
+ PERL=perl
+ for tool in cut head join pr sort tac tail test tr uniq wc; do
+ m=tests/$tool/Makefile.am
+ t=${m}t
+ rm -f $m $t
+ sed -n '1,/^##test-files-begin/p' $mam_template > $t
+ echo "x = $tool" >> $t
+ srcdir=tests/$tool
+ $PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
+ sed -n '/^##test-files-end/,$p' $mam_template >> $t
+ chmod -w $t
+ mv $t $m
+ done
+fi
# Reconfigure, getting other files.