diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-07-18 19:37:13 +0400 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-07-18 19:37:13 +0400 |
commit | c230345ccac08ba5742f5f03fe635ced94a0fcb7 (patch) | |
tree | 9408d2acc71487a7b2ea6e54284965acebb70503 | |
parent | 2dad81b175031972d4b2d8ae5d4b18db2136fc6b (diff) | |
parent | 0763c9e7a9898b5d23b508c472057497e65e3118 (diff) |
Merge branch 'tracking-llct-v3.10-misc-fixes' into merge-linux-linaro-core-trackingllct-20130718.0
-rw-r--r-- | scripts/Kbuild.include | 6 | ||||
-rw-r--r-- | scripts/Makefile.build | 6 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 30 | ||||
-rw-r--r-- | scripts/mod/Makefile | 10 | ||||
-rw-r--r-- | tools/lib/lk/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/Makefile | 4 |
6 files changed, 40 insertions, 18 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 547e15daf03..09aa90ce6e4 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -222,11 +222,15 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ $(echo-cmd) $(cmd_$(1)); \ echo 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) +ifeq ($(KBUILD_SCRIPTROOT),) +KBUILD_SCRIPTROOT=. +endif + # Execute the command and also postprocess generated .d dependencies file. if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ @set -e; \ $(echo-cmd) $(cmd_$(1)); \ - scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ + $(KBUILD_SCRIPTROOT)/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 d5d859c8072..de351927a7c 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -291,13 +291,17 @@ cmd_record_mcount = \ fi; endif +ifeq ($(KBUILD_SCRIPTROOT),) +KBUILD_SCRIPTROOT=. +endif + define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ $(cmd_modversions) \ $(call echo-cmd,record_mcount) \ $(cmd_record_mcount) \ - scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ + $(KBUILD_SCRIPTROOT)/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/Makefile b/scripts/kconfig/Makefile index 844bc9da08d..c58f91260cc 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -14,6 +14,12 @@ endif # We need this, in case the user has it in its environment unexport CONFIG_ +ifdef KBUILD_SCRIPTROOT +CONF = $(KBUILD_SCRIPTROOT)/scripts/kconfig/conf +else +CONF = $(obj)/conf +endif + xconfig: $(obj)/qconf $< $(Kconfig) @@ -23,31 +29,31 @@ gconfig: $(obj)/gconf menuconfig: $(obj)/mconf $< $(Kconfig) -config: $(obj)/conf +config: $(CONF) $< --oldaskconfig $(Kconfig) nconfig: $(obj)/nconf $< $(Kconfig) -oldconfig: $(obj)/conf +oldconfig: $(CONF) $< --$@ $(Kconfig) -silentoldconfig: $(obj)/conf +silentoldconfig: $(CONF) $(Q)mkdir -p include/generated $< --$@ $(Kconfig) -localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf +localyesconfig localmodconfig: $(obj)/streamline_config.pl $(CONF) $(Q)mkdir -p include/generated $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config $(Q)if [ -f .config ]; then \ cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ + $(CONF) --silentoldconfig $(Kconfig); \ mv -f .config.old.1 .config.old) \ else \ mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ + $(CONF) --silentoldconfig $(Kconfig); \ fi $(Q)rm -f .tmp.config @@ -76,24 +82,24 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(CONF) $< --$@ $(Kconfig) PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig -listnewconfig olddefconfig: $(obj)/conf +listnewconfig olddefconfig: $(CONF) $< --$@ $(Kconfig) # oldnoconfig is an alias of olddefconfig, because people already are dependent # on its behavior(sets new symbols to their default value but not 'n') with the # counter-intuitive name. -oldnoconfig: $(obj)/conf +oldnoconfig: $(CONF) $< --olddefconfig $(Kconfig) -savedefconfig: $(obj)/conf +savedefconfig: $(CONF) $< --$@=defconfig $(Kconfig) -defconfig: $(obj)/conf +defconfig: $(CONF) ifeq ($(KBUILD_DEFCONFIG),) $< --defconfig $(Kconfig) else @@ -101,7 +107,7 @@ else $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) endif -%_defconfig: $(obj)/conf +%_defconfig: $(CONF) $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) # Help text used by make help diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c11212ff351..8967d556035 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -1,6 +1,12 @@ hostprogs-y := modpost mk_elfconfig always := $(hostprogs-y) empty.o +ifdef KBUILD_SCRIPTROOT +MKELFCONFIG = $(KBUILD_SCRIPTROOT)/scripts/mod/mk_elfconfig +else +MKELFCONFIG = $(obj)/mk_elfconfig +endif + modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h @@ -40,9 +46,9 @@ $(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h $(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file) quiet_cmd_elfconfig = MKELF $@ - cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ + cmd_elfconfig = $(MKELFCONFIG) < $< > $@ -$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE +$(obj)/elfconfig.h: $(obj)/empty.o $(MKELFCONFIG) FORCE $(call if_changed,elfconfig) targets += elfconfig.h diff --git a/tools/lib/lk/Makefile b/tools/lib/lk/Makefile index 280dd820543..e5cccc10a44 100644 --- a/tools/lib/lk/Makefile +++ b/tools/lib/lk/Makefile @@ -33,6 +33,8 @@ EXTLIBS = -lelf -lpthread -lrt -lm ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ALL_LDFLAGS = $(LDFLAGS) +CC = $(CROSS_COMPILE)gcc +AR = $(CROSS_COMPILE)ar RM = rm -f $(LIBFILE): $(LIB_OBJS) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 641fccddb24..9f9ab7c5087 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -670,12 +670,12 @@ $(LIBTRACEEVENT)-clean: # already $(LIBLK): ifeq ($(subdir),) - $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) liblk.a + $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) CROSS_COMPILE=$(CROSS_COMPILE) O=$(OUTPUT) liblk.a endif $(LIBLK)-clean: ifeq ($(subdir),) - $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean + $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) CROSS_COMPILE=$(CROSS_COMPILE) O=$(OUTPUT) clean endif help: |