[Top][All Lists]

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

Re: [PATCH] doc: note that $(wildcard) is implemented in terms of glob(3

From: Paul Smith
Subject: Re: [PATCH] doc: note that $(wildcard) is implemented in terms of glob(3)
Date: Fri, 03 Dec 2021 11:26:21 -0500
User-agent: Evolution 3.36.5-0ubuntu1

On Fri, 2021-12-03 at 11:08 +0100, Ævar Arnfjörð Bjarmason wrote:
> The motivation for this patch is that I've seen code like this in the
> wild:
>     FILES = $(sort $(wildcard t*.sh))
> I thought that it would be documented that that sort of thing was
> redundant, but I didn't find any mention of it in the manual. After
> some source spelunking I came up with this addition, which would have
> helped me when I consulted the manual.

Originally it was not _guaranteed_ that wildcard yields sorted output.

However, the output did happen to be sorted in older versions of GNU
make.  In GNU make 3.82, that was changed to yield unsorted output.  As
of GNU make 4.3, it was changed back and it is now guaranteed that
wildcard results are sorted:


I thought that I had updated the documentation to make this guarantee
clear but perhaps I forgot?

reply via email to

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