* syntax-checks.mk (sc_tests_executable): Here, in this new check. (syntax_check_rules): Add it. * Makefile.am (dist-hook): Drop, no need to make test cases executable anymore.
Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- syntax-checks.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/syntax-checks.mk b/syntax-checks.mk index 3bbc4da..3b20911 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -65,6 +65,7 @@ sc_tests_required_after_defs \ sc_tests_overriding_macros_on_cmdline \ sc_tests_plain_sleep \ sc_tests_ls_t \ +sc_tests_executable \ sc_m4_am_plain_egrep_fgrep \ sc_tests_no_configure_in \ sc_tests_PATH_SEPARATOR \ @@ -446,6 +447,19 @@ sc_tests_ls_t: exit 1; \ fi +## Test scripts must be executable. +sc_tests_executable: + @st=0; \ + for f in $(xtests); do \ + case $$f in \ + t/ax/*|./t/ax/*|$(srcdir)/t/ax/*);; \ + *) test -x $$f || { echo "$$f: not executable" >&2; st=1; }; \ + esac; \ + done; \ + test $$st -eq 0 || echo '$@: some test scripts are not executable' >&2; \ + exit $$st; + + ## Never use 'sleep 1' to create files with different timestamps. ## Use '$sleep' instead. Some filesystems (e.g., Windows) have only ## a 2sec resolution. -- 1.7.9.5