]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Sort input file list
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Thu, 8 Jun 2023 13:07:48 +0000 (15:07 +0200)
committerBernhard M. Wiedemann <bwiedemann@suse.de>
Thu, 8 Jun 2023 13:07:48 +0000 (15:07 +0200)
so that libbcachefs.so builds in a reproducible way
in spite of non-deterministic filesystem readdir order.

See https://reproducible-builds.org/ for why this is good.

Makefile

index 033cdfbacda1126e25e10c91589588c8d4183a93..c77c0c51c2a0c1be872b5011ffedaca274455aff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,7 @@ TAGS:
 tags:
        ctags -R .
 
-SRCS=$(shell find . -type f ! -path '*/.*/*' -iname '*.c')
+SRCS=$(sort $(shell find . -type f ! -path '*/.*/*' -iname '*.c'))
 DEPS=$(SRCS:.c=.d)
 -include $(DEPS)