autoconf-patches
[Top][All Lists]
Advanced

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

document $at_status for use in RUN-IF-{PASS,FAIL} of AT_CHECK


From: Ralf Wildenhues
Subject: document $at_status for use in RUN-IF-{PASS,FAIL} of AT_CHECK
Date: Sat, 21 Aug 2010 06:51:37 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

It would be nice if I could write:
  AT_CHECK([command that may fail with status 63],
           [], [], [],
           [AT_CHECK([test $at_status -ne 63 || exit 77])])

instead of:
  AT_CHECK([command that may fail with status 63 || ]dnl
           [ { test $? -eq 63 && exit 77; }],
           [], [], [])

or even:
  AT_CHECK([command that may fail with status 63 || ]dnl
           [ { res=$?; test $res -eq 63 && exit 77; exit $res }],
           [], [], [])

for mapping an exit status of 63 to a SKIP.  The second variant destroys
the information of what value other than 0 or 63 the status had, the
third is even uglier, the former nicely shows the status in the verbose
log and works with Autoconf 2.59+ (at least).

Would you accept a patch to document $at_status being usable in the
RUN-IF-FAIL and RUN-IF-PASS arguments of AT_CHECK (including coverage
of course)?

If not, then we could think about using a 'stdout'-like special
value for the STATUS argument to AT_CHECK that just captures $?,
but IMVHO the status has sufficiently different semantics from
output that I hope we don't need to go this way.

Thanks,
Ralf



reply via email to

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