[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR. |
Date: |
Sun, 07 Apr 2024 13:48:37 +0200 |
Hi Collin,
> It seems that gettext catches a lot of issues with gnulib-tool.py...
Thanks! I've applied both patches.
> Since joinpath() uses os.path.norm(), it will see '$(top_srcdir)/..'
> and delete both path components. This is incorrect.
So, I'm adding a comment about it:
2024-04-07 Bruno Haible <bruno@clisp.org>
gnulib-tool.py: Add comment.
* pygnulib/constants.py (joinpath): Document a limitation.
diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index 7a88c21c39..a07e473529 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -269,7 +269,10 @@ def cleaner(sequence: str | list[str]) -> str | list[str |
bool]:
def joinpath(head: str, *tail: str) -> str:
'''Join two or more pathname components, inserting '/' as needed. If any
component is an absolute path, all previous path components will be
- discarded.'''
+ discarded.
+ This function also replaces SUBDIR/../ with empty; therefore it is not
+ suitable when some of the pathname components use Makefile variables
+ such as '$(srcdir)'.'''
newtail = []
for item in tail:
newtail += [item]