[Git][reproducible-builds/reproducible-website][master] 4 commits: Update information about sorting behavior of GNU Make.

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Apr 20 23:16:19 UTC 2026



Chris Lamb pushed to branch master at Reproducible Builds / reproducible-website


Commits:
69cb802c by Manuel Jacob at 2026-04-20T22:57:13+00:00
Update information about sorting behavior of GNU Make.

I noticed that the information about GNU Make was outdated. It stopped sorting the output of the `wildcard` function in version 3.82, but started sorting it again in version 4.3 (released 2020-01-19). I removed the footnote because the affected versions are old and the recommended practice recommends explicit sorting anyway.

The GNU Make `sort` function uses the C function `glob`, which takes locale into account (if sorting is not disabled). As it turns out that both examples are in fact about locale, I extracted the paragraph about locale-dependent sorting to the top level, changed the section headers and did a few changes to adopt to the change in structure.

- - - - -
0a926e8f by Manuel Jacob at 2026-04-20T22:57:13+00:00
Clarify when order should be stable.

The phrase “building your software requires processing several inputs at once” is a bit vague.

- - - - -
0b62a165 by Manuel Jacob at 2026-04-20T22:57:13+00:00
Clarify case-dependent sorting issue.

I don’t know what was meant by “not distinguish” in the previous text, but I understand the intention. Hopefully, the new text more clearly describes the issue.

- - - - -
3eb4b174 by Manuel Jacob at 2026-04-20T22:57:13+00:00
Use simple present instead of future.

I’m not a native speaker, but I think that the simple present tense is better for generalizing statements.

- - - - -


1 changed file:

- _docs/stable_inputs.md


Changes:

=====================================
_docs/stable_inputs.md
=====================================
@@ -4,18 +4,22 @@ layout: docs
 permalink: /docs/stable-inputs/
 ---
 
-If building your software requires processing several inputs at once,
+If some step in the build depends on the order of its inputs,
 make sure the order is stable across builds.
 
 A typical example is creating an archive from the content of a
 directory. Most filesystems do not guarantee that listing files in a
-directory will always result in the same order.
+directory always results in the same order.
 
-Example Makefile
-----------------
+When sorting inputs, one must ensure that the sorting order is not affected by
+the system locale settings. Different locales have different orders of e.g.
+uppercase characters relative to lowercase characters.
+
+Example: Makefile
+-----------------
 
-The following `Makefile` will result in unreproducible
-builds[^sorted-wildcard]:
+The following `Makefile`, run with GNU Make, can result in unreproducible
+builds, as the `wildcard` function sorts according to the current locale:
 
 <div class="wrong">
 {% highlight makefile %}
@@ -37,7 +41,7 @@ tool: $(SRCS:.c=.o)
 {% endhighlight %}
 </div>
 
-b) Sort inputs:
+b) Sort inputs with `sort` function (which does not take locale into account).
 
 <div class="correct">
 {% highlight makefile %}
@@ -47,17 +51,10 @@ tool: $(SRCS:.c=.o)
 {% endhighlight %}
 </div>
 
-[^sorted-wildcard]:
-    GNU Make used to sort the output of the [wildcard](https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html#Wildcard-Function) function until version 3.82.
-
-Watch out for locale-related issues
------------------------------------
-
-When sorting inputs, one must ensure that the sorting order is not affected by
-the system locale settings. Some locales will not distinguish between uppercase
-and lowercase characters.
+Example: tar
+------------
 
-For example, `tar` will by default use the filesystem order when
+Most `tar` implementations by default use the filesystem order when
 descending directories:
 
 <div class="wrong">



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/8e943b1e57586b8d1d12bc07516276e93c5bb647...3eb4b174e51e5db2bb2280510c957413c8b65d73

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/8e943b1e57586b8d1d12bc07516276e93c5bb647...3eb4b174e51e5db2bb2280510c957413c8b65d73
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260420/cdf093cb/attachment.htm>


More information about the rb-commits mailing list