projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c5ca5b3
)
New option --avoid.
author
Bruno Haible
<bruno@clisp.org>
Mon, 11 Jul 2005 11:37:09 +0000
(11:37 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Mon, 11 Jul 2005 11:37:09 +0000
(11:37 +0000)
ChangeLog
patch
|
blob
|
history
gnulib-tool
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index f2773f252f79aa2f7253605cc3a86b3d47f34871..752405f80d0d7902629ed3cc8e4bfca0ea58483d 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,10
@@
+2005-07-09 Bruno Haible <bruno@clisp.org>
+
+ * gnulib-tool (func_usage): Document option --avoid.
+ (Command line options): Handle --avoid.
+ (func_acceptable): New function.
+ (func_modules_transitive_closure): Use it.
+
2005-07-11 Bruno Haible <bruno@clisp.org>
* MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
2005-07-11 Bruno Haible <bruno@clisp.org>
* MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
diff --git
a/gnulib-tool
b/gnulib-tool
index b04b09257e16ceff62621d8520f5d50e43238118..ac9b0bf247122c71a2b489a6defb1a766aa25b58 100755
(executable)
--- a/
gnulib-tool
+++ b/
gnulib-tool
@@
-22,7
+22,7
@@
progname=$0
package=gnulib
progname=$0
package=gnulib
-cvsdatestamp='$Date: 2005-07-
05 07:14:00
$'
+cvsdatestamp='$Date: 2005-07-
11 11:37:09
$'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
@@
-90,6
+90,9
@@
Options:
placed (default \"m4\"), for --import.
--aux-dir=DIRECTORY Directory relative --dir where auxiliary build
tools are placed (default \".\"), for --import.
placed (default \"m4\"), for --import.
--aux-dir=DIRECTORY Directory relative --dir where auxiliary build
tools are placed (default \".\"), for --import.
+ --avoid=MODULE Avoid including the given MODULE. Useful if you
+ have code that provides equivalent functionality.
+ This option can be repeated.
--lgpl Abort if modules aren't available under the LGPL.
Also modify license template from GPL to LGPL.
--libtool Use libtool rules, for --import.
--lgpl Abort if modules aren't available under the LGPL.
Also modify license template from GPL to LGPL.
--libtool Use libtool rules, for --import.
@@
-181,8
+184,9
@@
func_ln_if_changed ()
# - sourcebase from --source-base
# - m4base from --m4-base
# - auxdir from --aux-dir
# - sourcebase from --source-base
# - m4base from --m4-base
# - auxdir from --aux-dir
-# -
libtool true if --libtool was given, blank otherwise
+# -
avoidlist list of modules to avoid, from --avoid
# - lgpl true if --lgpl was given, blank otherwise
# - lgpl true if --lgpl was given, blank otherwise
+# - libtool true if --libtool was given, blank otherwise
# - do_changelog false if --no-changelog was given, : otherwise
# - dry_run true if --dry-run was given, blank otherwise
{
# - do_changelog false if --no-changelog was given, : otherwise
# - dry_run true if --dry-run was given, blank otherwise
{
@@
-193,12
+197,12
@@
func_ln_if_changed ()
sourcebase=
m4base=
auxdir=
sourcebase=
m4base=
auxdir=
-
libtool
=
+
avoidlist
=
lgpl=
lgpl=
+ libtool=
do_changelog=:
dry_run=
symbolic=
do_changelog=:
dry_run=
symbolic=
- lgpl=
supplied_opts="$@"
supplied_opts="$@"
@@
-277,12
+281,22
@@
func_ln_if_changed ()
--aux-dir=* )
auxdir=`echo "X$1" | sed -e 's/^X--aux-dir=//'`
shift ;;
--aux-dir=* )
auxdir=`echo "X$1" | sed -e 's/^X--aux-dir=//'`
shift ;;
- --libtool )
- libtool=true
+ --avoid )
+ shift
+ if test $# = 0; then
+ func_fatal_error "missing argument for --avoid"
+ fi
+ avoidlist="$avoidlist $1"
+ shift ;;
+ --avoid=* )
+ avoidlist="$avoidlist "`echo "X$1" | sed -e 's/^X--avoid=//'`
shift ;;
--lgpl )
lgpl=true
shift ;;
shift ;;
--lgpl )
lgpl=true
shift ;;
+ --libtool )
+ libtool=true
+ shift ;;
--no-changelog | --no-changelo | --no-changel | --no-change | --no-chang | --no-chan | --no-cha | --no-ch | --no-c )
do_changelog=false
shift ;;
--no-changelog | --no-changelo | --no-changel | --no-change | --no-chang | --no-chan | --no-cha | --no-ch | --no-c )
do_changelog=false
shift ;;
@@
-429,9
+443,24
@@
func_get_maintainer ()
sed -n -e "/^Maintainer$sed_extract_prog" < "$gnulib_dir/modules/$1"
}
sed -n -e "/^Maintainer$sed_extract_prog" < "$gnulib_dir/modules/$1"
}
+# func_acceptable module
+# tests whether a module is acceptable.
+# Input:
+# - avoidlist list of modules to avoid
+func_acceptable ()
+{
+ for avoid in $avoidlist; do
+ if test "$avoid" = "$1"; then
+ return 1
+ fi
+ done
+ return 0
+}
+
# func_modules_transitive_closure
# Input:
# - modules list of specified modules
# func_modules_transitive_closure
# Input:
# - modules list of specified modules
+# - avoidlist list of modules to avoid
# Output:
# - modules list of modules, including dependencies
func_modules_transitive_closure ()
# Output:
# - modules list of modules, including dependencies
func_modules_transitive_closure ()
@@
-441,12
+470,19
@@
func_modules_transitive_closure ()
for module in $modules; do
func_verify_module
if test -n "$module"; then
for module in $modules; do
func_verify_module
if test -n "$module"; then
- # Duplicate dependenies are harmless, but Jim wants a warning.
+ # Duplicate dependen
c
ies are harmless, but Jim wants a warning.
duplicated_deps=`func_get_dependencies $module | sort | uniq -d`
if test -n "$duplicated_deps"; then
echo "warning: module $module has duplicated dependencies: "`echo $duplicated_deps` 1>&2
fi
duplicated_deps=`func_get_dependencies $module | sort | uniq -d`
if test -n "$duplicated_deps"; then
echo "warning: module $module has duplicated dependencies: "`echo $duplicated_deps` 1>&2
fi
- xmodules="$xmodules $module "`func_get_dependencies $module`
+ if func_acceptable $module; then
+ xmodules="$xmodules $module"
+ for depmodule in `func_get_dependencies $module`; do
+ if func_acceptable $depmodule; then
+ xmodules="$xmodules $depmodule"
+ fi
+ done
+ fi
fi
done
xmodules=`for m in $xmodules; do echo $m; done | sort | uniq`
fi
done
xmodules=`for m in $xmodules; do echo $m; done | sort | uniq`
@@
-554,8
+590,9
@@
func_emit_lib_Makefile_am ()
# - libname library name
# - sourcebase directory relative to destdir where to place source code
# - m4base directory relative to destdir where to place *.m4 macros
# - libname library name
# - sourcebase directory relative to destdir where to place source code
# - m4base directory relative to destdir where to place *.m4 macros
-# -
libtool true if libtool will be used, blank otherwise
+# -
avoidlist list of modules to avoid, from --avoid
# - lgpl true if library's license shall be LGPL, blank otherwise
# - lgpl true if library's license shall be LGPL, blank otherwise
+# - libtool true if libtool will be used, blank otherwise
# - dry_run true if actions shall only be printed, blank otherwise
# - symbolic true if files should be symlinked, copied otherwise
# - supplied_opts all options passed to gnulib-tool
# - dry_run true if actions shall only be printed, blank otherwise
# - symbolic true if files should be symlinked, copied otherwise
# - supplied_opts all options passed to gnulib-tool