From 35e5a08057ab8953dcfaceab9f623c52be7a44e4 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Mon, 11 Mar 2019 00:36:30 +0000 Subject: =?UTF-8?q?Reduce=20entropy=20by=20sorting=20the=20output=20of=20a?= =?UTF-8?q?ll=20$(wildcard=20=E2=80=A6)=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introducing a function (i.e. sorted_wildcard) seemed to make sense at first but it would need to be defined in all Makefiles, before getting used. That's why a “replace all occurrences” approach was preferred in the end. Many occurrences aren't going to make a difference anyway, because they are about documenting target dependencies. But replacing everything means it's easier to check later on, in case entropy comes back. This file needs a slightly different diff because the Makefile snippet is embedded in a Perl script: english/security/parse-advisory.pl --- Makefile.common | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Makefile.common') diff --git a/Makefile.common b/Makefile.common index cf45e560073..a01a8aef20e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -52,7 +52,7 @@ WMLPROLOG := WMLEPILOG := WML = wml $(WMLOPTIONS) -o UNDEFu$(LANGUAGECAP):$(WMLOUTFILE)@g+w $(WMLPROLOG) $(WMLEPILOG) -WMLFILES = $(wildcard *.wml) +WMLFILES = $(sort $(wildcard *.wml)) ifndef SUBLANG HTMLFILES = $(patsubst %.wml,%.$(LANGUAGE).html,$(WMLFILES)) HTMLDESTFILES = $(patsubst %.wml,$(HTMLDIR)/%.$(LANGUAGE).html,$(WMLFILES)) @@ -63,11 +63,11 @@ HTMLDESTFILES = $(sort $(foreach i,$(SUBLANG),\ $(patsubst %.wml,$(HTMLDIR)/%.$(LANGUAGE)-$(i).html,$(WMLFILES)))) endif -OTHERFILES := $(wildcard *.ps.gz *.eps *.pdf *.css) -OTHERFILES += $(wildcard *.jpg *.jpeg *.gif *.png *.fig *.xcf *.xcf.gz *.ppm *.svg) +OTHERFILES := $(sort $(wildcard *.ps.gz *.eps *.pdf *.css)) +OTHERFILES += $(sort $(wildcard *.jpg *.jpeg *.gif *.png *.fig *.xcf *.xcf.gz *.ppm *.svg)) OTHERDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(OTHERFILES)) -existing-SUBS := $(shell for dir in $(wildcard $(SUBS)) ''; do test -d $$dir && echo $$dir; done) +existing-SUBS := $(shell for dir in $(sort $(wildcard $(SUBS))) ''; do test -d $$dir && echo $$dir; done) existing-SUBS-install := $(addsuffix -install,$(existing-SUBS)) existing-SUBS-clean := $(addsuffix -clean,$(existing-SUBS)) existing-SUBS-cleandest := $(addsuffix -cleandest,$(existing-SUBS)) @@ -146,7 +146,7 @@ ifeq "$(LANGUAGE)" "en" endif endif -LOCALEDESTFILES := $(patsubst $(ENGLISHDIR)/po/%.pot,$(LOCALEDIR)/%.mo,$(wildcard $(ENGLISHDIR)/po/*.pot)) +LOCALEDESTFILES := $(patsubst $(ENGLISHDIR)/po/%.pot,$(LOCALEDIR)/%.mo,$(sort $(wildcard $(ENGLISHDIR)/po/*.pot))) ifneq "$(LANGUAGE)" "en" # Ensure that MO files do exist -- cgit v1.2.3