From: Jeff King Date: Fri, 20 Dec 2024 15:54:33 GMT Subject: Re: [PATCH v2 4/5] Makefile: respect build info declared in "config.mak" Message-ID: <20241220155433.GC152570@coredump.intra.peff.net> In-Reply-To: <20241220-b4-pks-git-version-via-environment-v2-4-f1457a5e8c38@pks.im> On Fri, Dec 20, 2024 at 01:22:48PM +0100, Patrick Steinhardt wrote: > In preceding commits we fixed that build info set via e.g. `make > GIT_VERSION=foo` didn't get propagated to GIT-VERSION-GEN. Similarly > though, setting build info via "config.mak" does not work anymore either > because the variables are only declared as Makefile variables and thus > aren't accessible by the script. > > Fix the issue by exporting those variables via "shared.mak". This also > allows us to deduplicate the export of GIT_USER_AGENT. This looks good. It fixes the issue, and I am happy that: > asciidoctor-extensions.rb: asciidoctor-extensions.rb.in FORCE > - $(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@ > + $(QUIET_GEN)$(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@ ...these spots get even simpler. -Peff