]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: transform include guards with `--macro-prefix'
authorSam Steingold <sds@gnu.org>
Tue, 12 Oct 2010 02:01:21 +0000 (09:01 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 12 Oct 2010 07:31:37 +0000 (14:31 +0700)
* 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.

ChangeLog
gnulib-tool

index 25790a619de667d1b1d7c1cf66f7774787554c0a..8b0f6a51fe399ffd843cf8900e95dcbdef92f77e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-12  Sam Steingold  <sds@gnu.org>
+           Gary V. Vaughan  <gary@gnu.org>
+
+       gnulib-tool: transform include guards with `--macro-prefix'
+       * 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.
+
 2010-10-11  Bruno Haible  <bruno@clisp.org>
 
        stdlib: Allow multiple gnulib generated replacements to coexist.
index 0e1694d76fedff04eee1dc475f31fbd470beb0f9..f43b7addb3e43df425cf8a91efeaed2425f264f1 100755 (executable)
@@ -3847,6 +3847,9 @@ s,^\(.................................................[^ ]*\) *,
       break
     fi
   done
+  test -n ${macro_prefix} && sed_transform_lib_file=$sed_transform_lib_file"
+    s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
+  "
   sed_transform_main_lib_file="$sed_transform_lib_file"
   if test -n "$do_copyrights"; then
     if test -n "$lgpl"; then
@@ -3885,6 +3888,10 @@ s,^\(.................................................[^ ]*\) *,
       s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
     '
   fi
+  test -n ${macro_prefix} \
+    && sed_transform_build_aux_file=$sed_transform_build_aux_file"
+         s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
+       "
 
   # Determine script to apply to library files that go into $testsbase/.
   sed_transform_testsrelated_lib_file="$sed_transform_lib_file"