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 > @....@. So, change _GL_STDLIB_H to _...@guard_prefix@_STDLIB_H in > lib/stdlib.in.h, > 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. Cheers, -- Gary V. Vaughan (g...@gnu.org)
PGP.sig
Description: This is a digitally signed message part