[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] gnulib-tool: transform include guards with `--macro-pref
From: |
Bruno Haible |
Subject: |
Re: [PATCH 1/7] gnulib-tool: transform include guards with `--macro-prefix' |
Date: |
Tue, 12 Oct 2010 22:17:10 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Gary,
> * 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.
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
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.
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.
Bruno
[PATCH 1/7] gnulib-tool: transform include guards with `--macro-prefix', Gary V. Vaughan, 2010/10/12
- Re: [PATCH 1/7] gnulib-tool: transform include guards with `--macro-prefix',
Bruno Haible <=
[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