From 6f106cdeadea6ea32c7047247cdb800f8d105d02 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 7 Oct 2008 12:00:02 -0600 Subject: [PATCH] Ensure _AS_CLEANUP is defined. * lib/m4sugar/m4sh.m4 (_AS_CLEANUP): Give initial definition. * tests/m4sh.at (AS@&t@_INIT cleanup): Expose the need for this. Signed-off-by: Eric Blake --- ChangeLog | 4 ++++ lib/m4sugar/m4sh.m4 | 7 +++++++ tests/m4sh.at | 1 + 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index f610c79b..f072ae4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-10-07 Eric Blake + Ensure _AS_CLEANUP is defined. + * lib/m4sugar/m4sh.m4 (_AS_CLEANUP): Give initial definition. + * tests/m4sh.at (AS@&t@_INIT cleanup): Expose the need for this. + Improve m4sh maintainability. * lib/m4sugar/m4sh.m4: Sort macros for sanitizing the shell; no code change. diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index edad0408..b49f3028 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -134,6 +134,13 @@ m4_define([_AS_BOURNE_COMPATIBLE], ]) +# _AS_CLEANUP +# ----------- +# Expanded as the last thing before m4sugar cleanup begins. Macros +# may append m4sh cleanup hooks to this as appropriate. +m4_define([_AS_CLEANUP]) + + # AS_COPYRIGHT(TEXT) # ------------------ # Emit TEXT, a copyright notice, as a shell comment near the top of the diff --git a/tests/m4sh.at b/tests/m4sh.at index 33bcca53..1fc9852b 100644 --- a/tests/m4sh.at +++ b/tests/m4sh.at @@ -805,6 +805,7 @@ AT_DATA_M4SH([script.as], [[dnl dnl Registered before AS_INIT's cleanups m4_wrap([echo cleanup 1 ]) +m4_pushdef([_AS_SHELL_FN_SPY])dnl neutralize the spy, we don't care about it AS_INIT dnl Registered after AS_INIT's cleanups, thus goes to KILL diversion m4_wrap([echo cleanup 2 -- 2.11.4.GIT