[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] gnulib-tool: transform include guards with `--macro-pref
Gary V. Vaughan
Re: [PATCH 1/7] gnulib-tool: transform include guards with `--macro-prefix'
Wed, 13 Oct 2010 16:33:52 +0700
On 13 Oct 2010, at 03:17, Bruno Haible wrote:
>> * gnulib-tool (func_import): support multiple gllib directories:
>> headers are generated for each gllib differently, depending on which
>> features are actually used, so we need to be able to include all
>> these generated headers without fear that one will shadow another,
>> so we prepend the macro-prefix before the guard macros.
> I agree that transforming the the include guard with $macro_prefix is good.
I already mentioned in that other thread that I'm still conflicted over
whether overloading macro_prefix like this is the best approach. But
it's certainly the approach with the smallest amount of new code.
> But I'll prefer to do it differently, not via sed_transform_lib_file.
> sed_transform_lib_file is meant to transform the copyright notice, nothing
> else. If all lib/* files were subject to random sed substitutions all
> around, the result would become unmaintainable over time. No, the only
> substitutions (apart from the copyright notice) should be marked with
> @address@hidden So, change _GL_STDLIB_H to address@hidden@_STDLIB_H in
> and arrange for @GUARD_PREFIX@ to receive a substitution value in the
> module's Makefile.am snippet. The only modification needed in gnulib-tool
> is then some help in the expansion of the Makefile.am snippet.
I prefer that idea too.
> Also, I think this and the two other modifications I mentioned in the
> other mail - dealing with include_next and old compilers, and handling of
> typedefs and struct definitions in the *.in.h files - should be dealt with
> at the same time.
Sure. If you don't beat me to it, I'll try to post a revised patch
in a week or four.
Gary V. Vaughan (address@hidden)
Description: This is a digitally signed message part
[PATCH 1/7] gnulib-tool: transform include guards with `--macro-prefix', Gary V. Vaughan, 2010/10/12
[PATCH 2/7] gnulib-tool: transform hard-coded libgnu.a to $libname.l?a, Gary V. Vaughan, 2010/10/12
Re: [PATCH 0/7] contents of topic/libposix for merge to master, Bruno Haible, 2010/10/12