#! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# The $(SUDBIRS) entries are processed in the order they are specified.
-. ./defs || Exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([
: > run
END
+echo dummy: > Makefile
+if using_gmake; then
+ jobs=-j12
+elif $MAKE -j12; then
+ jobs=-j12
+elif $MAKE -j 12; then
+ jobs="-j 12"
+else
+ jobs=none
+fi
+rm -f Makefile
$ACLOCAL
$AUTOCONF
./configure
-for j in '' -j12; do
+for j in '' "$jobs"; do
+ test x"$j" = x"none" && continue
$MAKE $j
test -f run
test -f sub0/run
test -f sub3/a/run
test -f sub3/b/run
$MAKE clean
- find . | grep 'run$' && Exit 1
+ find . | grep 'run$' && exit 1
: # For shells with busted 'set -e'
done