On Fri, Feb 12, 2021 at 12:09 AM Andreas Fritiofson
<andreas.fritiof...@gmail.com> wrote:
>
>
>
> On Thu, Feb 11, 2021 at 8:02 PM Antonio Borneo <borneo.anto...@gmail.com> 
> wrote:
>>
>>
>> No, you cannot have the wildcard NEWS-* in the makefile variable.
>> That's the original reason of the $(wildcard xxx) GNU make function.
>>
>
> I didn't think so either, but it seems to work!
>
> I tried distcheck, works fine, and the NEWS files are included in the 
> tarball. Everything is updated automatically if you add NEWS files without 
> manually rerunning autoconf or configure. What else could be needed?

Looking in the Makefile generated by configure, after your proposal.
Here are parts of the relevant lines:
EXTRA_DIST = ... $(srcdir)/NEWS-* ...
DISTFILES = ...  $(EXTRA_DIST)
distdir-am: $(DISTFILES)
    ...
    list='$(DISTFILES)'; \
    dist_files=`for file in $$list; do echo $$file; done | \
    ....

The second use of DISTFILE is within a shell script fragment, and then
NEWS-* is properly expanded, so no problem here

The first use of DISTFILE is in the 'prerequisites'.
The manual of GNU make states that wildcards are allowed in the
prerequisites, and are expanded as in the Bourne shell.
Also the manual of the old GNU make 3.82 reports the same.
What about other 'make' implementations? What about POSIX make?
I have only found this
https://unix.stackexchange.com/questions/513644/does-posix-make-not-support-globs-in-prerequisites

Maybe you are right and it's fine to simply put a wildcard there.
I've just pushed http://openocd.zylin.com/6056/ with you as the
author. Let's see what jenkins say and let's have reviewers comments
there

Anyone


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to