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  <br...@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]




Reply via email to