summaryrefslogtreecommitdiff
path: root/apps/Makefile
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-03 08:24:24 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-03 08:24:24 -0600
commit36c809cf028f928e504bc7da0a1af134e7556331 (patch)
tree1efb501fd05c59a15cedbed6746529c6559e64ef /apps/Makefile
parentd2dd063179ec9ab25b0db59573aa5231ba82ad93 (diff)
downloadpx4-nuttx-36c809cf028f928e504bc7da0a1af134e7556331.tar.gz
px4-nuttx-36c809cf028f928e504bc7da0a1af134e7556331.tar.bz2
px4-nuttx-36c809cf028f928e504bc7da0a1af134e7556331.zip
apps/builtin: better fix for building with parallel make
Build-server sometimes fails 'make -j24' with: In file included from builtin_list.c:62:0: builtin_list.h:1:46: error: 'ts_engine_main' undeclared here (not in a function) { "ts_engine", SCHED_PRIORITY_DEFAULT, 2048, ts_engine_main }, or sometimes silently succeeds but generates builds that contain a random subset of configured NuttX applications. There are two root causes for this: 1) Recipes for building builtin_list.h and builtin_proto.h are not linearizable. 2) Nothing ensures that 'make context' is run first for apps/builtin This patch addresses both issues. Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
Diffstat (limited to 'apps/Makefile')
-rw-r--r--apps/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/Makefile b/apps/Makefile
index fc04a8878..d580d2f10 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -45,7 +45,7 @@ TOPDIR ?= $(APPDIR)/import
# CONFIGURED_APPS is the list of all configured built-in directories/built
# action.
# SUBDIRS is the list of all directories containing Makefiles. It is used
-# only for cleaning. builtin must always be the first in the list.
+# only for cleaning.
CONFIGURED_APPS =
SUBDIRS = examples graphics interpreters modbus builtin import nshlib
@@ -114,7 +114,7 @@ BIN = libapps$(LIBEXT)
# Build targets
all: $(BIN)
-.PHONY: import install context .depdirs depend clean distclean
+.PHONY: import install context context_serialize context_rest .depdirs depend clean distclean
define SDIR_template
$(1)_$(2):
@@ -142,7 +142,13 @@ install: $(BIN_DIR) .install
import:
$(Q) $(MAKE) .import TOPDIR="$(APPDIR)$(DELIM)import"
-context: $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_context)
+context_rest: $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_context)
+
+context_serialize:
+ $(Q) $(MAKE) -C builtin context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
+ $(Q) $(MAKE) context_rest
+
+context: context_serialize
.depdirs: $(foreach SDIR, $(INSTALLED_APPS), $(SDIR)_depend)