summaryrefslogtreecommitdiff
path: root/gnulib-tool
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-12-11 12:41:09 +0000
committerBruno Haible <bruno@clisp.org>2006-12-11 12:41:09 +0000
commitbce6be1d95ee28c132ba2ed9e3240239bddf0c70 (patch)
treeabc4e362127637bc5f05a5d545af12a8d0814d48 /gnulib-tool
parent4bda7c3bed8255bdb4c14c1c9ebeb0a0e7b2e4e8 (diff)
downloadgnulib-bce6be1d95ee28c132ba2ed9e3240239bddf0c70.tar.gz
Don't show the includes for modules that were not explicitly specified.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-xgnulib-tool11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnulib-tool b/gnulib-tool
index 29dca28cdc..06e5b847c5 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
progname=$0
package=gnulib
-cvsdatestamp='$Date: 2006-11-29 14:30:01 $'
+cvsdatestamp='$Date: 2006-12-11 12:41:09 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
nl='
@@ -2179,10 +2179,17 @@ func_import ()
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 $modules; do
+ for module in `join "$tmp"/modules1 "$tmp"/modules2`; do
include_directive=`func_get_include_directive "$module"`
case "$nl$include_directive" in
*"$nl#if"*)