test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / bootstrap.sh
index 93bf3fd..5add98a 100755 (executable)
@@ -95,14 +95,15 @@ dosubst ()
 dosubst automake-$APIVERSION/Automake/Config.in \
         automake-$APIVERSION/Automake/Config.pm
 
-# Create temporary replacement for aclocal.
-dosubst aclocal.in aclocal.tmp
-
 # Overwrite amversion.m4.
 dosubst m4/amversion.in m4/amversion.m4
 
-# Create temporary replacement for automake.
-dosubst automake.in automake.tmp
+# Create temporary replacement for aclocal and automake.
+for p in bin/aclocal bin/automake; do
+  dosubst $p.in $p.tmp
+  $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2
+  mv -f $p.tmp2 $p.tmp
+done
 
 # Create required makefile snippets.
 $PERL ./gen-testsuite-part > t/testsuite-part.tmp
@@ -112,11 +113,11 @@ mv -f t/testsuite-part.tmp t/testsuite-part.am
 # Run the autotools.  Bail out if any warning is triggered.
 # Use '-I' here so that our own *.m4 files in m4/ gets included,
 # not copied, in aclocal.m4.
-$PERL ./aclocal.tmp -Wall -Werror -I m4 \
-                    --automake-acdir=m4 --system-acdir=m4/acdir
+$PERL ./bin/aclocal.tmp -Wall -Werror -I m4 \
+                        --automake-acdir=m4 --system-acdir=m4/acdir
 $AUTOCONF -Wall -Werror
-$PERL ./automake.tmp -Wall -Werror
+$PERL ./bin/automake.tmp -Wall -Werror
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
-rm -f aclocal.tmp automake.tmp
+rm -f bin/aclocal.tmp bin/automake.tmp