diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
| commit | befddb21c845f8fb49e637997891ef97c6a869dc (patch) | |
| tree | 0e7629123184f2dd50291ad6d477b894175f0f26 /tools/scripts/Makefile.include | |
| parent | e716efde75267eab919cdb2bef5b2cb77f305326 (diff) | |
| parent | 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff) | |
Merge tag 'v3.8-rc4' into irq/core
Merge Linux 3.8-rc4 before pulling in new commits - we were on an old v3.7 base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/scripts/Makefile.include')
| -rw-r--r-- | tools/scripts/Makefile.include | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 96ce80a3743b..2964b96aa55f 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include | |||
| @@ -1,8 +1,11 @@ | |||
| 1 | ifeq ("$(origin O)", "command line") | 1 | ifeq ($(origin O), command line) |
| 2 | dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) | 2 | dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),) |
| 3 | ABSOLUTE_O := $(shell cd $(O) ; pwd) | 3 | ABSOLUTE_O := $(shell cd $(O) ; pwd) |
| 4 | OUTPUT := $(ABSOLUTE_O)/ | 4 | OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) |
| 5 | COMMAND_O := O=$(ABSOLUTE_O) | 5 | COMMAND_O := O=$(ABSOLUTE_O) |
| 6 | ifeq ($(objtree),) | ||
| 7 | objtree := $(O) | ||
| 8 | endif | ||
| 6 | endif | 9 | endif |
| 7 | 10 | ||
| 8 | ifneq ($(OUTPUT),) | 11 | ifneq ($(OUTPUT),) |
| @@ -41,7 +44,16 @@ else | |||
| 41 | NO_SUBDIR = : | 44 | NO_SUBDIR = : |
| 42 | endif | 45 | endif |
| 43 | 46 | ||
| 44 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir | 47 | # |
| 48 | # Define a callable command for descending to a new directory | ||
| 49 | # | ||
| 50 | # Call by doing: $(call descend,directory[,target]) | ||
| 51 | # | ||
| 52 | descend = \ | ||
| 53 | +mkdir -p $(OUTPUT)$(1) && \ | ||
| 54 | $(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2) | ||
| 55 | |||
| 56 | QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir | ||
| 45 | QUIET_SUBDIR1 = | 57 | QUIET_SUBDIR1 = |
| 46 | 58 | ||
| 47 | ifneq ($(findstring $(MAKEFLAGS),s),s) | 59 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
| @@ -56,5 +68,10 @@ ifndef V | |||
| 56 | $(MAKE) $(PRINT_DIR) -C $$subdir | 68 | $(MAKE) $(PRINT_DIR) -C $$subdir |
| 57 | QUIET_FLEX = @echo ' ' FLEX $@; | 69 | QUIET_FLEX = @echo ' ' FLEX $@; |
| 58 | QUIET_BISON = @echo ' ' BISON $@; | 70 | QUIET_BISON = @echo ' ' BISON $@; |
| 71 | |||
| 72 | descend = \ | ||
| 73 | @echo ' ' DESCEND $(1); \ | ||
| 74 | mkdir -p $(OUTPUT)$(1) && \ | ||
| 75 | $(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2) | ||
| 59 | endif | 76 | endif |
| 60 | endif | 77 | endif |
