From: Junio C Hamano Date: Mon, 22 Apr 2019 06:11:32 GMT Subject: Re: [PATCH/RFC] Makefile: dedup list of files obtained from ls-files Message-ID: In-Reply-To: Eric Sunshine writes: > On Sun, Apr 21, 2019 at 9:19 AM Junio C Hamano wrote: >> diff --git a/Makefile b/Makefile >> @@ -822,12 +822,12 @@ VCSSVN_LIB = vcs-svn/lib.a >> -LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \ >> +LIB_H := $(shell (git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \ >> $(FIND) . \ >> -name .git -prune -o \ >> -name t -prune -o \ >> -name Documentation -prune -o \ >> - -name '*.h' -print) >> + -name '*.h' -print) | sort -u) > > GNU make's "sort" function also de-dups, so an alternative is: > > LIB_H := $(sort $(shell ...)) That is a much better solution. Let me use that. Thanks.