summaryrefslogtreecommitdiff
path: root/gnulib-tool
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-07-31 18:39:19 +0200
committerBruno Haible <bruno@clisp.org>2022-07-31 23:52:27 +0200
commit6bdf668e5748a511082efed773b2b127e93fcb1d (patch)
tree4096874c27798c4bb6a647899436b1aa0304a3b0 /gnulib-tool
parent18dcc627ddeced96bc192e169bf19e1a38c53374 (diff)
downloadgnulib-6bdf668e5748a511082efed773b2b127e93fcb1d.tar.gz
gnulib-tool.py: Follow gnulib-tool changes, part 19.
Follow gnulib-tool changes 2015-12-09 Pavel Raiskup <praiskup@redhat.com> gnulib-tool: allow multiple --local-dir usage 2019-02-14 Bruno Haible <bruno@clisp.org> gnulib-tool: Improve handling of multiple --local-dir options. * gnulib-tool (func_reconstruct_cached_dir): When the argument is absolute, return it unmodified. (func_compute_relative_local_gnulib_path): Renamed from func_count_relative_local_gnulib_path. Add comment. * gnulib-tool.py: Accept multiple --local-dir options and collect the values into localpath. * pygnulib/GLConfig.py: Take a localpath argument instead of a localdir argument. (getLocalDir, setLocalDir, resetLocalDir): Remove methods. (getLocalPath, setLocalPath, resetLocalPath): New methods. * pygnulib/GLFileSystem.py (CopyAction): New class. (GLFileSystem.lookup): Consider all dirs in localpath. (GLFileSystem.shouldLink): New method. (GLFileAssistant): Use shouldLink. * pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all dirs in localpath. (GLModuleSystem.list): Likewise. * pygnulib/GLEmiter.py: Update. * pygnulib/GLImport.py (GLImport.__init__): Put the argument of gl_LOCAL_DIR into localpath, not localdir. (GLImport.actioncmd): Consider all dirs in localpath. (GLImport.relative_to_destdir, GLImport.relative_to_currdir): New methods. (GLImport.gnulib_cache): Combine all dirs in localpath. Use self.relative_to_destdir. * pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-xgnulib-tool17
1 files changed, 10 insertions, 7 deletions
diff --git a/gnulib-tool b/gnulib-tool
index bee85856f4..f1665f4002 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -4846,12 +4846,13 @@ func_reconstruct_cached_dir ()
{
cached_dir=$1
if test -n "$cached_dir"; then
- case "$destdir" in
+ case "$cached_dir" in
/*)
- func_path_append local_gnulib_path "$destdir/$cached_dir" ;;
+ func_path_append local_gnulib_path "$cached_dir" ;;
*)
- case "$cached_dir" in
+ case "$destdir" in
/*)
+ # XXX This doesn't look right.
func_path_append local_gnulib_path "$destdir/$cached_dir" ;;
*)
func_relconcat "$destdir" "$cached_dir"
@@ -5835,14 +5836,14 @@ s,//*$,/,'
fi
fi
- # func_count_relative_local_gnulib_path
+ # func_compute_relative_local_gnulib_path
# gl_LOCAL_DIR requires local_gnulib_path to be set relatively to destdir
# Input:
# - local_gnulib_path from --local-dir
# - destdir from --dir
# Output:
# - relative_local_dir path to be stored into gl_LOCAL_DIR
- func_count_relative_local_gnulib_path ()
+ func_compute_relative_local_gnulib_path ()
{
relative_local_gnulib_path=
save_IFS="$IFS"
@@ -5856,7 +5857,9 @@ s,//*$,/,'
relative_local_dir="$local_dir" ;;
* )
case "$destdir" in
- /*) relative_local_dir="$local_dir" ;;
+ /*)
+ # XXX This doesn't look right.
+ relative_local_dir="$local_dir" ;;
*)
# destdir, local_dir are both relative.
func_relativize "$destdir" "$local_dir"
@@ -5883,7 +5886,7 @@ s,//*$,/,'
printf '%s\n' "$actioncmd"
echo
echo "# Specification in the form of a few gnulib-tool.m4 macro invocations:"
- func_count_relative_local_gnulib_path
+ func_compute_relative_local_gnulib_path
echo "gl_LOCAL_DIR([$relative_local_gnulib_path])"
echo "gl_MODULES(["
echo "$specified_modules" | sed -e 's/^/ /g'