build: add buildinfo as single Makefile target
authorPaul Spooren <mail@aparcar.org>
Sun, 13 Oct 2019 19:53:40 +0000 (09:53 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 17 Oct 2019 12:01:33 +0000 (14:01 +0200)
The prepare target was added some 11 years ago to build tools and
toolchain and was recently extended to  create buildinfo files for
reproducibility, meaning {feeds,version,config}.buildinfo.

As the buildbot workflow is more complex than the single prepare (kmod
feed insertion), prepare is only used to create those buildinfo files.
Running prepare however runs `target/compile` as well, taking time even
everything is already compiled.

Splitting this allows the buildbot to run only the `buildinfo` target
while others can still use the convenience feature `prepare`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Makefile

index 65ee10a84b8d57c5bfed7047f0ed114a78190df1..181c33b180f2016f6e1ce33c96b53791980ce940 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -100,9 +100,12 @@ diffconfig: FORCE
        mkdir -p $(BIN_DIR)
        $(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.buildinfo
 
-prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
+buildinfo: FORCE
        $(_SINGLE)$(SUBMAKE) -r diffconfig buildversion feedsversion
 
+prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
+       $(_SINGLE)$(SUBMAKE) -r buildinfo
+
 world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
        $(_SINGLE)$(SUBMAKE) -r package/index
        $(_SINGLE)$(SUBMAKE) -r checksum