From: Ævar Arnfjörð Bjarmason Date: Mon, 01 Nov 2021 20:06:24 GMT Subject: Re: [PATCH] Makefile: replace most hardcoded object lists with $(wildcard) Message-ID: <211101.867ddr3ak5.gmgdl@evledraar.gmail.com> In-Reply-To: On Sat, Oct 30 2021, Paul Smith wrote: > On Sun, 2021-10-31 at 00:32 +0200, Ævar Arnfjörð Bjarmason wrote: >> +LIB_OBJS += $(patsubst %.c,%.o,$(foreach dir,$(LIB_OBJS_DIRS),$(wildcard $(dir)/*.c))) > > Another way to write this would be: > > LIB_OBJS += $(patsubst %.c,%.o,$(wildcard $(addsuffix /*.c,$(LIB_OBJS_DIRS))) > > I don't know that there's any reason to choose one over the other. I > don't think there's any real performance difference although one could > imagine this version to be VERY SLIGHTLY faster. Also this one is a > little more "Lisp-ish"... that might be a pro or a con depending :). > > Just kibitzing while waiting for dinner to arrive... Thanks. I changed it to use that in the v2.