]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
Makefile: Only rebuild ramdisk if it doesn't exist or config changes
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 16 Oct 2015 21:12:53 +0000 (23:12 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 16 Oct 2015 21:12:53 +0000 (23:12 +0200)
Makefile

index d4b8f968d728c740f3428a0c17af5afeeb034b2e..439dc7790635c311425f371d9bda80e8eaac2703 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
 HELP=""
 include .conf.mk
+include .stamp/empty
 
 HELP+="all         - Builds basic programs and prints message about next steps.\n"
 .PHONY: all
-all: parse_kconfig write_config allconfig picosat initram_cyclictest
+all: parse_kconfig write_config allconfig picosat .stamp/initram_cyclictest
 
 .PHONY: help
 help:
@@ -58,7 +59,7 @@ HELP+="              target run. This target is for testing if initial kernel\n"
 HELP+="              configuration, buildroot configuration and benchmark are\n"
 HELP+="              configured right.\n"
 .PHONY: test
-test: parse_kconfig initram_cyclictest
+test: parse_kconfig .stamp/initram_cyclictest
        scripts/test.py
 
 HELP+="run         - Executes loop of kernel building, booting and benchmark execution.\n"
@@ -151,6 +152,10 @@ picosat:
        @if ! $(MAKE) -C scripts/picosat-959 -q; then \
        $(MAKE) -C scripts/picosat-959; fi
 
-.PHONY: initram_cyclictest
-initram_cyclictest:
+.stamp/initram_cyclictest: .conf.mk
        $(MAKE) -C tests/cyclictest/root
+       touch $@
+
+.stamp/empty:
+       mkdir -p $(dir $@)
+       touch $@