(expand_modules): Implement 'avoid' feature.
Avoid expanding dirname into mailbox/, since it grags xalloc with it.
Showing
1 changed file
with
18 additions
and
4 deletions
... | @@ -124,17 +124,31 @@ get_modules() { | ... | @@ -124,17 +124,31 @@ get_modules() { |
124 | expand_modules() { | 124 | expand_modules() { |
125 | eval gnulib_modules="\$${1}" | 125 | eval gnulib_modules="\$${1}" |
126 | gnulib_modules="`echo $gnulib_modules | sort -u -`" | 126 | gnulib_modules="`echo $gnulib_modules | sort -u -`" |
127 | |||
128 | # gnulib-tool currently does not support --avoid with --extract-dependencies | ||
129 | # Hence this mess. | ||
130 | varname=$1 | ||
131 | filter='' | ||
132 | shift | ||
133 | for mod | ||
134 | do | ||
135 | filter="${filter}s/$mod//;" | ||
136 | done | ||
137 | if [ -z "$filter" ]; then | ||
138 | filter="b" | ||
139 | fi | ||
140 | |||
127 | previous_gnulib_modules= | 141 | previous_gnulib_modules= |
128 | while [ "$gnulib_modules" != "$previous_gnulib_modules" ] | 142 | while [ "$gnulib_modules" != "$previous_gnulib_modules" ] |
129 | do | 143 | do |
130 | previous_gnulib_modules=$gnulib_modules | 144 | previous_gnulib_modules=$gnulib_modules |
131 | gnulib_modules=`(echo "$gnulib_modules" | 145 | gnulib_modules=`(echo "$gnulib_modules" |
132 | for module in $gnulib_modules; do | 146 | for module in $gnulib_modules; do |
133 | $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $module | 147 | $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $module |
134 | done) | sort -u | 148 | done) | sed "$filter" | sort -u |
135 | ` | 149 | ` |
136 | done | 150 | done |
137 | eval ${1}=\"$gnulib_modules\" | 151 | eval ${varname}=\"$gnulib_modules\" |
138 | } | 152 | } |
139 | 153 | ||
140 | verbose() { | 154 | verbose() { |
... | @@ -295,7 +309,7 @@ trap cleanup 1 2 13 15 | ... | @@ -295,7 +309,7 @@ trap cleanup 1 2 13 15 |
295 | get_modules gnulib.modules | 309 | get_modules gnulib.modules |
296 | 310 | ||
297 | expand_modules muaux_modules | 311 | expand_modules muaux_modules |
298 | expand_modules mailutils_modules | 312 | expand_modules mailutils_modules dirname |
299 | 313 | ||
300 | MODLIST= | 314 | MODLIST= |
301 | for mod in $muaux_modules | 315 | for mod in $muaux_modules | ... | ... |
-
Please register or sign in to post a comment