]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - tests/cyclictest/root/GNUmakefile
buildroot: Declare external sources in a better way
[linux-conf-perf.git] / tests / cyclictest / root / GNUmakefile
1 export SRCARCH=$(CONF_KERNEL_ARCH)
2 export BR2_EXTERNAL=$(CURDIR)/packages
3
4 lastword = $(word $(words $(1)),$(1))
5 makedir := $(dir $(call lastword,$(MAKEFILE_LIST)))
6
7 MAKEARGS := -C $(makedir)/../../../scripts/buildroot
8 MAKEARGS += O=$(if $(patsubst /%,,$(makedir)),$(CURDIR)/)$(patsubst %/,%,$(makedir))
9
10 MAKEFLAGS += --no-print-directory
11
12 .PHONY: all $(MAKECMDGOALS)
13
14 all     := $(filter-out Makefile .config,$(MAKECMDGOALS))
15
16 _all:
17         $(MAKE) $(MAKEARGS) $(all)
18
19 -include ../../../.conf.mk
20
21 ../../../.conf.mk:
22         $(MAKE) -C ../../../ .conf.mk
23
24 _all: .config
25 .config: config_base ../../../$(CONF_TEST_CONFIG_CYCLICTEST)
26         cp config_base .config
27         cat ../../../$(CONF_TEST_CONFIG_CYCLICTEST) >> .config
28         yes "" | make oldconfig
29
30 Makefile:;
31
32 $(all): _all
33         @:
34
35 %/: _all
36         @: