0007-Makefile-Don-t-run-genbuild_h-if-not-doing-a-build.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 65f0c7278ec0c1cb197e3110e2bc4ebb4bd5caf4 Mon Sep 17 00:00:00 2001
  2. From: Martin Roth <martin@coreboot.org>
  3. Date: Sun, 9 May 2021 10:26:10 -0600
  4. Subject: [PATCH 07/19] Makefile: Don't run genbuild_h if not doing a build
  5. genbuild_h was being run on every make invocation - clean, distclean,
  6. etc. to get the source date epoch value. This value isn't used unless
  7. a build is being done, so don't run it on non-compile make invocations.
  8. Signed-off-by: Martin Roth <martin@coreboot.org>
  9. Change-Id: I2afc0affc17116e0db849ea968474bc19dbb0ae1
  10. Reviewed-on: https://review.coreboot.org/c/coreboot/+/53997
  11. Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
  12. Reviewed-by: Angel Pons <th3fanbus@gmail.com>
  13. Reviewed-by: Patrick Georgi <pgeorgi@google.com>
  14. ---
  15. Makefile | 2 ++
  16. 1 file changed, 2 insertions(+)
  17. diff --git a/Makefile b/Makefile
  18. index 8290b45e89..1e6cca44b3 100644
  19. --- a/Makefile
  20. +++ b/Makefile
  21. @@ -24,7 +24,9 @@ COREBOOT_EXPORTS += top src srck obj objutil objk
  22. LANG:=C
  23. LC_ALL:=C
  24. TZ:=UTC0
  25. +ifneq ($(NOCOMPILE),1)
  26. SOURCE_DATE_EPOCH := $(shell $(top)/util/genbuild_h/genbuild_h.sh . | sed -n 's/^.define COREBOOT_BUILD_EPOCH\>.*"\(.*\)".*/\1/p')
  27. +endif
  28. # don't use COREBOOT_EXPORTS to ensure build steps outside the coreboot build system
  29. # are reproducible
  30. export LANG LC_ALL TZ SOURCE_DATE_EPOCH
  31. --
  32. 2.25.1