[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] how many #includes?
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] how many #includes? |
Date: |
Mon, 11 Dec 2006 16:20:02 +0100 |
User-agent: |
KMail/1.9.1 |
Karl Berry wrote on 2006-11-15:
> Would it be reasonable/possible to have gnulib-tool output only the
> top-level #includes?
Implemented. Thanks for bringing this up.
2006-12-10 Bruno Haible <address@hidden>
* gnulib-tool (func_import): Show the include files only for those
modules that are copied and specified.
Reported by Karl Berry.
*** gnulib-tool.bak 2006-12-09 19:47:45.000000000 +0100
--- gnulib-tool 2006-12-10 16:50:14.000000000 +0100
***************
*** 2179,2188 ****
echo "Finished."
echo
echo "You may need to add #include directives for the following .h files."
# First the #include <...> directives without #ifs, sorted for convenience,
# then the #include "..." directives without #ifs, sorted for convenience,
# then the #include directives that are surrounded by #ifs. Not sorted.
! for module in $modules; do
include_directive=`func_get_include_directive "$module"`
case "$nl$include_directive" in
*"$nl#if"*)
--- 2179,2195 ----
echo "Finished."
echo
echo "You may need to add #include directives for the following .h files."
+ # Intersect $specified_modules and $modules
+ # (since $specified_modules is not necessarily of subset of $modules - some
+ # may have been skipped through --avoid, and since the elements of $modules
+ # but not in $specified_modules can go away without explicit notice -
through
+ # changes in the module dependencies).
+ echo "$specified_modules" > "$tmp"/modules1 # a sorted list, one module per
line
+ echo "$modules" > "$tmp"/modules2 # also a sorted list, one module per line
# First the #include <...> directives without #ifs, sorted for convenience,
# then the #include "..." directives without #ifs, sorted for convenience,
# then the #include directives that are surrounded by #ifs. Not sorted.
! for module in `join "$tmp"/modules1 "$tmp"/modules2`; do
include_directive=`func_get_include_directive "$module"`
case "$nl$include_directive" in
*"$nl#if"*)
- Re: [bug-gnulib] how many #includes?,
Bruno Haible <=