From 27603f48017022e7aa4afd6f46eff5f59b046807 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 18 Jun 2015 10:46:52 -0400 Subject: [PATCH] Revert "Kbuild: Tools build at TIMO_BASE directory." This reverts commit 23da104f0dc8c6c4a768a727b564272c084aa79b. Conflicts: Makefile Makefile.inc Change-Id: Ia8f2efe3cd37e82c04c304f04c46d787d2265dde Signed-off-by: Anas Nashif --- Makefile | 28 +++++++++------------------- Makefile.inc | 8 ++++---- scripts/Kbuild.include | 2 +- scripts/Makefile.build | 2 +- scripts/kconfig/confdata.c | 6 +----- 5 files changed, 16 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 9e146edb136..79f1d3b7cce 100644 --- a/Makefile +++ b/Makefile @@ -275,17 +275,8 @@ endif # Where to locate arch specific headers hdr-arch := $(SRCARCH) -ifdef O -KCONFIG_CONFIG := $(O)/.config -KCONFIG_AUTOCONFIG := $(O)/include/config/auto.conf -KCONFIG_AUTOHEADER := $(O)/include/generated/autoconf.h -KCONFIG_TRISTATE := $(O)/include/config/tristate.conf -KCONFIG_AUTOCMD := $(O)/include/config/auto.conf.cmd -else -KCONFIG_CONFIG := .config -endif - -export KCONFIG_CONFIG KCONFIG_AUTOCONFIG KCONFIG_AUTOHEADER KCONFIG_TRISTATE KCONFIG_AUTOCMD +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG # SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -339,9 +330,8 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump AWK = awk -GENKSYMS = $(ZEPHYR_BASE)/scripts/genksyms/genksyms -GENIDT = $(ZEPHYR_BASE)/scripts/gen_idt/gen_idt -FIXDEP = $(ZEPHYR_BASE)/scripts/basic/fixdep +GENKSYMS = scripts/genksyms/genksyms +GENIDT = scripts/gen_idt/gen_idt PERL = perl PYTHON = python CHECK = sparse @@ -401,7 +391,7 @@ export VERSION_GENERATION VERSION_MAJOR VERSION_MINOR VERSION_REVISION VERSION_R export PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP -export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE GENIDT FIXDEP +export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE GENIDT export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS ZEPHYRINCLUDE OBJCOPYFLAGS LDFLAGS @@ -426,8 +416,8 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ # Basic helpers built in scripts/ PHONY += scripts_basic scripts_basic: - $(Q)$(MAKE) -C $(ZEPHYR_BASE) $(build)=scripts/basic - $(Q)$(MAKE) -C $(ZEPHYR_BASE) $(build)=scripts/gen_idt + $(Q)$(MAKE) $(build)=scripts/basic + $(Q)$(MAKE) $(build)=scripts/gen_idt $(Q)rm -f .tmp_quiet_recordmcount # To avoid any implicit rule to kick in, define an empty command. @@ -513,10 +503,10 @@ include $(srctree)/arch/$(SRCARCH)/Makefile export KBUILD_DEFCONFIG KBUILD_KCONFIG config: scripts_basic outputmakefile FORCE - $(Q)$(MAKE) -C $(ZEPHYR_BASE) $(build)=scripts/kconfig $@ + $(Q)$(MAKE) $(build)=scripts/kconfig $@ %config: scripts_basic outputmakefile FORCE - $(Q)$(MAKE) -C $(ZEPHYR_BASE) $(build)=scripts/kconfig $@ + $(Q)$(MAKE) $(build)=scripts/kconfig $@ else # =========================================================================== diff --git a/Makefile.inc b/Makefile.inc index 0941e5125fc..96fd3a27845 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -47,7 +47,7 @@ else S = -s endif -all: $(CONFIG_DEPS) $(O)/include/config/.dir +all: $(CONFIG_DEPS) $(O)/.dir $(Q)$(MAKE) -C $(ZEPHYR_BASE) O=$(O) \ PROJECT=$(PROJECT_BASE) SOURCE_DIR=$(SOURCE_DIR) CFLAGS=$(CFLAGS) @@ -76,16 +76,16 @@ mrproper: FORCE $(Q)$(MAKE) -C $(ZEPHYR_BASE) \ PROJECT=$(PROJECT_BASE) mrproper -%config: $(O)/include/config/.dir FORCE +%config: $(O)/.dir FORCE $(Q)$(MAKE) $(S) -C $(ZEPHYR_BASE) O=$(O) \ PROJECT=$(PROJECT_BASE) $@ -qemu: $(CONFIG_DEPS) $(O)/include/config/.dir +qemu: $(CONFIG_DEPS) $(O)/.dir $(Q)$(MAKE) -C $(ZEPHYR_BASE) O=$(O) \ PROJECT=$(PROJECT_BASE) SOURCE_DIR=$(SOURCE_DIR) CFLAGS=$(CFLAGS) qemu -$(O)/.config: $(O)/include/config/.dir $(O)/include/generated/.dir +$(O)/.config: $(O)/.dir $(Q)cp $(ZEPHYR_BASE)/arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) $(O)/.config $(O)/.initconfig: mergeconfig diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ba17d9a6a92..a6ab07b38bf 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -259,7 +259,7 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ @set -e; \ $(echo-cmd) $(cmd_$(1)); \ - $(FIXDEP) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ + scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ rm -f $(depfile); \ mv -f $(dot-target).tmp $(dot-target).cmd) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 04c4621193f..97a367cb42a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -249,7 +249,7 @@ define rule_cc_o_c $(cmd_modversions) \ $(call echo-cmd,record_mcount) \ $(cmd_record_mcount) \ - $(FIXDEP) $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ + scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ $(dot-target).tmp; \ rm -f $(depfile); \ mv -f $(dot-target).tmp $(dot-target).cmd diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index e129283f239..f88d90f2022 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -953,11 +953,7 @@ int conf_write_autoconf(void) sym_clear_all_valid(); - name = getenv("KCONFIG_AUTOCMD"); - if (!name) - name = "include/config/auto.conf.cmd"; - - file_write_dep(name); + file_write_dep("include/config/auto.conf.cmd"); if (conf_split_config()) return 1;