Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339037
b: refs/heads/master
c: 9db48cd
h: refs/heads/master
i:
  339035: f4b013f
v: v3
  • Loading branch information
David Howells authored and Arnaldo Carvalho de Melo committed Nov 14, 2012
1 parent 41d3105 commit 021ced5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bca6cff89c6e7d1e383993cccf0f59146874a34
refs/heads/master: 9db48cd5ccd0d127e991c15509a0241a18043e91
6 changes: 4 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,12 @@ kernelversion:

# Clear a bunch of variables before executing the submake
tools/: FORCE
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= O=$(objtree) subdir=tools -C $(src)/tools/

tools/%: FORCE
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/ $*
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS= O=$(objtree) subdir=tools -C $(src)/tools/ $*

# Single targets
# ---------------------------------------------------------------------------
Expand Down
17 changes: 13 additions & 4 deletions trunk/tools/scripts/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
ifeq ("$(origin O)", "command line")
ifeq ($(origin O), command line)
dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
ABSOLUTE_O := $(shell cd $(O) ; pwd)
OUTPUT := $(ABSOLUTE_O)/
OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
COMMAND_O := O=$(ABSOLUTE_O)
ifeq ($(objtree),)
objtree := $(O)
endif
endif

ifneq ($(OUTPUT),)
Expand Down Expand Up @@ -47,9 +50,10 @@ endif
# Call by doing: $(call descend,directory[,target])
#
descend = \
$(QUIET_SUBDIR0)$(1) $(QUIET_SUBDIR1) $(2)
+mkdir -p $(OUTPUT)$(1) && \
$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1)

QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir
QUIET_SUBDIR1 =

ifneq ($(findstring $(MAKEFLAGS),s),s)
Expand All @@ -64,5 +68,10 @@ ifndef V
$(MAKE) $(PRINT_DIR) -C $$subdir
QUIET_FLEX = @echo ' ' FLEX $@;
QUIET_BISON = @echo ' ' BISON $@;

descend = \
@echo ' ' DESCEND $(1); \
mkdir -p $(OUTPUT)$(1) && \
$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1)
endif
endif

0 comments on commit 021ced5

Please sign in to comment.