From: Stefano Lattarini Date: Thu, 23 Feb 2012 21:47:42 +0000 (+0100) Subject: maint: assume 'test -x' is portable X-Git-Tag: v1.11b~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a38f18045c251a1e73dd499d8bafe186bb0130b;p=thirdparty%2Fautomake.git maint: assume 'test -x' is portable * lib/Makefile.am (installcheck-local): To verify that the installed scripts are actually executable, simply use 'test -x', instead of resorting to perl and its '-x' file operator. Today, 'test -x' should today be portable to any non-museum system. Since we are at it, improve diagnostic in case of failure. --- diff --git a/lib/Makefile.am b/lib/Makefile.am index 422544e28..fb80351fc 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -54,9 +54,10 @@ install-data-hook: chmod +x "$(DESTDIR)$(scriptdir)/$$prog"; \ done -## 'test -x' is not portable. So we use Perl instead. If Perl -## doesn't exist, then this test is meaningless anyway. installcheck-local: - for file in $(dist_script_DATA); do \ - $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \ - done + @for file in $(dist_script_DATA); do \ + path="$(pkgvdatadir)/$$file"; \ + test -x "$$path" || echo $$path; \ + done \ + | sed 's/$$/: not executable/' \ + | grep . && exit 1; exit 0