[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] tests: minor improvement of sc_tight_scope rule
From: |
Jim Meyering |
Subject: |
[PATCH 1/6] tests: minor improvement of sc_tight_scope rule |
Date: |
Mon, 4 Apr 2011 07:13:36 +0200 |
From: Jim Meyering <address@hidden>
* src/Makefile.am (sc_tight_scope): Adjust rule to use an eval-based
trap-setting for-loop rather than 4x hard-coded 128+N constants.
Also catch SIGQUIT (3). Tweak comments.
---
src/Makefile.am | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 5bd71d2..1727d67 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -707,8 +707,8 @@ sc_check-AUTHORS: $(all_programs)
# Most functions in src/*.c should have static scope.
# Any that don't must be marked with `extern', but `main'
-# and `usage' are exceptions. They're always extern, but
-# don't need to be marked. Also functions starting with __
+# and `usage' are exceptions: they're always extern, but
+# do not need to be marked. Also functions starting with __
# are exempted due to possibly being added by the compiler
# (when compiled as a shared library for example).
#
@@ -717,9 +717,9 @@ sc_check-AUTHORS: $(all_programs)
sc_tight_scope: $(bin_PROGRAMS)
@t=exceptions-$$$$; \
trap 's=$$?; rm -f $$t; exit $$s' 0; \
- am__exit='(exit $s); exit $s'; \
- trap "s=129; $$am__exit" 1; trap "s=130; $$am__exit" 2; \
- trap "s=141; $$am__exit" 13; trap "s=143; $$am__exit" 15; \
+ for sig in 1 2 3 13 15; do \
+ eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
+ done; \
src=`for f in $(SOURCES); do \
test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
hdr=`for f in $(noinst_HEADERS); do \
--
1.7.4.2.662.gcbd0
- minor test improvements, Jim Meyering, 2011/04/04
- [PATCH 1/6] tests: minor improvement of sc_tight_scope rule,
Jim Meyering <=
- [PATCH 2/6] tests: convert common root-build test failure to a "skip", Jim Meyering, 2011/04/04
- [PATCH 3/6] tests: preserve-gid: remove useless use of "env", Jim Meyering, 2011/04/04
- [PATCH 4/6] tests: preserve-gid: don't chown temporary PATH dir to a nameless UID, Jim Meyering, 2011/04/04
- [PATCH 5/6] tests: don't ever leave a backgrounded "sleep 10m" process, Jim Meyering, 2011/04/04
- [PATCH 6/6] tests: avoid spurious parallel failure due to temporary disk full, Jim Meyering, 2011/04/04