Makefile: Don't run genbuild_h if not doing a build

genbuild_h was being run on every make invocation - clean, distclean,
etc. to get the source date epoch value.  This value isn't used unless
a build is being done, so don't run it on non-compile make invocations.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I2afc0affc17116e0db849ea968474bc19dbb0ae1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/53997
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Martin Roth 2021-05-09 10:26:10 -06:00 committed by Patrick Georgi
parent b403da65cd
commit 6318f1f500
1 changed files with 2 additions and 0 deletions

View File

@ -24,7 +24,9 @@ COREBOOT_EXPORTS += top src srck obj objutil objk
LANG:=C
LC_ALL:=C
TZ:=UTC0
ifneq ($(NOCOMPILE),1)
SOURCE_DATE_EPOCH := $(shell $(top)/util/genbuild_h/genbuild_h.sh . | sed -n 's/^.define COREBOOT_BUILD_EPOCH\>.*"\(.*\)".*/\1/p')
endif
# don't use COREBOOT_EXPORTS to ensure build steps outside the coreboot build system
# are reproducible
export LANG LC_ALL TZ SOURCE_DATE_EPOCH