make parallel execution with setted --jobs flag fixed.

Now 'change_make_options' and 'TARGETS' executing sequentally.
This commit is contained in:
Kolan Sh 2012-02-22 18:17:48 +04:00
parent 278ddad205
commit 481ae5de97
1 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,9 @@ endif
CFLAGS += -Wall $(INCLUDES) CFLAGS += -Wall $(INCLUDES)
LDFLAGS += -Wall $(LIBS) LDFLAGS += -Wall $(LIBS)
all: change_make_options $(TARGETS) all:
@make change_make_options &>/dev/null
+make $(TARGETS)
ifneq ($(mode),debug) ifneq ($(mode),debug)
ifneq ($(mode),profile) ifneq ($(mode),profile)
@ -49,7 +51,7 @@ OLD_BUILD_LDFLAGS=$(shell grep ^LDFLAGS make_options.out 2>/dev/null | sed 's~^L
change_make_options: change_make_options:
ifneq ($(mode)|$(CFLAGS)|$(LDFLAGS), $(OLD_BUILD_MODE)|$(OLD_BUILD_CFLAGS)|$(OLD_BUILD_LDFLAGS)) ifneq ($(mode)|$(CFLAGS)|$(LDFLAGS), $(OLD_BUILD_MODE)|$(OLD_BUILD_CFLAGS)|$(OLD_BUILD_LDFLAGS))
@echo CLEANING... @echo CLEANING...
@make clean &>/dev/null @make clean
@echo "MODE=$(mode)" > make_options.out @echo "MODE=$(mode)" > make_options.out
@echo "CFLAGS=$(CFLAGS)" >> make_options.out @echo "CFLAGS=$(CFLAGS)" >> make_options.out
@echo "LDFLAGS=$(LDFLAGS)" >> make_options.out @echo "LDFLAGS=$(LDFLAGS)" >> make_options.out