On Fri, Dec 20, 2024 at 09:45:36AM +0100, Patrick Steinhardt wrote: > > version-def.h: version-def.h.in GIT-VERSION-GEN GIT-VERSION-FILE GIT-USER-AGENT > > $(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ./GIT-VERSION-GEN "$(shell pwd)" $< $@+ > > @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi > > > > Should we do the same thing for GIT_VERSION? And GIT_DATE, etc? If we're > > going to do many of these, it might also be easier to just add "export > > GIT_VERSION", etc, in the Makefile. > > I guess. It'll become quite painful to do this at every callsite, so > I'll add another commit on top to introduce a call template that does > all of this for us. Is there any reason not to just do: export GIT_VERSION export GIT_DATE export GIT_BUILT_FROM_COMMIT export GIT_USER_AGENT in shared.mak? Then you only have to do it once, and no need for templates. -Peff