bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnulib-tool.py: Adjust construction of configure.ac path.


From: Bruno Haible
Subject: Re: [PATCH] gnulib-tool.py: Adjust construction of configure.ac path.
Date: Mon, 04 Mar 2024 15:37:51 +0100

Hi Collin,

> When using gnulib-tool.py this comment in gnulib-comp.m4 is different
> (using Emacs merge-gnulib):
> 
> -# This macro should be invoked from ./configure.ac, in the section
> +# This macro should be invoked from configure.ac, in the section

Good point. In packages that have several gnulib-tool invocations,
such as GNU gettext, this file name is important in order to avoid
confusion.

> This patch just changes GLConfig.setAutoconfFile to use os.path.join
> which seems most similar and fixes the output.

Thanks! Applied.

> I think that this may _still_ give the incorrect output in some
> situations. This test program:
> 
>     import os
>     print(os.path.join('.//', 'configure.ac'))
> 
> prints (on GNU/Linux and most likely anything but Windows):
> 
>     .//configure.ac
> 
> where gnulib-tool would give (assuming unsanitized input):
> 
>     .///configure.ac

The important cases are:

>>> print(os.path.join('.', 'configure.ac'))
./configure.ac
>>> print(os.path.join('./', 'configure.ac'))
./configure.ac

The cases where destdir ends in multiple slashes are not important, since
  - they are not typical values that users provide in the --dir option,
  - the only effect is inside comments.

> Feel free to propose a better solution if you think of one.

What you added is good enough. Thanks!

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]