summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 5a71a12d0..ae05f8c52 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -115,6 +115,13 @@ sc_x_sc_dist_check:
> $@-t
@mv $@-t $@
+define gl_trap_
+ Exit () { set +e; (exit $$1); exit $$1; }; \
+ for sig in 1 2 3 13 15; do \
+ eval "trap 'Exit $$(expr $$sig + 128)' $$sig"; \
+ done
+endef
+
# Files in src/ should not include directly any of
# the headers already included via system.h.
sc_system_h_headers: .re-list