automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {master} maint: assume 'test -x' is portable


From: Stefano Lattarini
Subject: [FYI] {master} maint: assume 'test -x' is portable
Date: Thu, 23 Feb 2012 22:48:29 +0100

* 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.
---
 lib/Makefile.am |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 422544e..fb80351 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
-- 
1.7.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]