Re: RFC: Add public macros AC_LOG_CMD and AC_LOG_FILE.

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

 



On 2024-06-24 10:04, Zack Weinberg wrote:
> On Mon, Jun 24, 2024, at 2:56 AM, Nick Bowler wrote:
>> I think at the same time it would be worth documenting the AS_LINENO
>> functionality, which is the main internal functionality of these
>> macros that (unless you just goes ahead and use it) Autoconf users
>> can't really replicate in their own logging.
> 
> I believe what you mean is you want _AS_ECHO_LOG to be promoted to a
> documented and supported macro, and for AS_LINENO_PUSH and AS_LINENO_POP
> also to be documented for external use.  Is this correct?  Did I miss
> any other internal macros that ought to be available for external
> use?

> I don't think we should tell people to be using $as_lineno directly,
> is there some use case for it that isn't covered by existing macros?

On reflection, I think I may have had a mistaken understanding of the
purpose of the as_lineno when I last looked at these macros.  I assumed
it was related to supporting shells without LINENO support but it seems
it is not the case, so maybe nothing is actually needed.

Perhaps a link from the (very short) description of AS_LINENO_PREPARE[1]
to the description of LINENO[2] might have helped.

That being said, something like AS_ECHO_LOG (with or without
AS_LINENO_PUSH/POP) looks generally useful, although I don't have an
immediate use case offhand besides implementing an AC_RUN_LOG workalike.

[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#index-AS_005fLINENO_005fPREPARE
[2] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#index-LINENO-1

[...]
> Will do.  The main point of the macro is that it does something a little
> fancier than "cat file", so it's unambiguous where normal log output
> resumes. Like the existing _AC_MSG_LOG_CONFTEST does:
> 
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "lexlib-probe"
> | #define PACKAGE_TARNAME "lexlib-probe"
> | #define PACKAGE_VERSION "1"
> | ... etc ...
> configure: result: no
> 
> The "label" will go where _AC_MSG_LOG_CONFTEST prints "failed program was".

Looks great, this example output definitely helps to understand when one
might want to use this macro.

Cheers,
  Nick




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux