diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build index ae203f21cc86734c658a0817583e0ea59878ee0e..35174d92047693fc272a34b711d8d228ecdec61d 100644 --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -22,6 +22,9 @@ build-dir := $(srctree)/tools/build # Generic definitions include $(build-dir)/Build.include +# do not force detected configuration +-include .config-detected + # Init all relevant variables used in build files so # 1) they have correct type # 2) they do not inherit any value from the environment diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index cc224080b52560d5b37ed2035b436215a13ea095..ba414216e5061a3fc68fdf14f6a807b22fddefda 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -11,6 +11,10 @@ ifneq ($(obj-perf),) obj-perf := $(abspath $(obj-perf))/ endif +$(shell echo -n > .config-detected) +detected = $(shell echo "$(1)=y" >> .config-detected) +detected_var = $(shell echo "$(1)=$($(1))" >> .config-detected) + LIB_INCLUDE := $(srctree)/tools/lib/ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)