** +BUILD_EXAMPLE+, +BUILD_EXAMPLES+ are disabled;
** +BUILD_TEST+, +BUILD_TESTS+, +BUILD_TESTING+ are disabled.
+* +LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO+ should be set when the package
+ cannot be built inside the source tree but needs a separate build
+ directory.
+
* +LIBFOO_MAKE+, to specify an alternate +make+ command. This is
typically useful when parallel make is enabled in the configuration
(using +BR2_JLEVEL+) but that this feature should be disabled for
$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install
$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
+
+$(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
+
+
+ifeq ($$($(3)_SUPPORTS_IN_SOURCE_BUILD),YES)
$(2)_BUILDDIR = $$($(2)_SRCDIR)
+else
+$(2)_BUILDDIR = $$($(2)_SRCDIR)/buildroot-build
+endif
#
# Configure step. Only define it if not already defined by the package
# Configure package for target
define $(2)_CONFIGURE_CMDS
- (cd $$($$(PKG)_BUILDDIR) && \
+ (mkdir -p $$($$(PKG)_BUILDDIR) && \
+ cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
PATH=$$(BR_PATH) \
$$($$(PKG)_CONF_ENV) $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
# Configure package for host
define $(2)_CONFIGURE_CMDS
- (cd $$($$(PKG)_BUILDDIR) && \
+ (mkdir -p $$($$(PKG)_BUILDDIR) && \
+ cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
PATH=$$(BR_PATH) \
$$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \