All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] pkg-cmake: allow to build package in a subdirectory
@ 2015-02-17 17:55 Gwenhael Goavec-Merou
  2015-02-17 17:55 ` [Buildroot] [PATCH 2/4] python-cheetah: add host-package support Gwenhael Goavec-Merou
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-02-17 17:55 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

For some cmake based packages, like GNURadio, it's forbidden to do the
compilation directly in the sources directory. This patch add a new 
variable to specify, if needed, the name of a sub-directory used to compile.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/pkg-cmake.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 6c9955d..20243aa 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -57,7 +57,11 @@ $(2)_INSTALL_STAGING_OPTS	?= DESTDIR=$$(STAGING_DIR) install
 $(2)_INSTALL_TARGET_OPTS		?= DESTDIR=$$(TARGET_DIR) install
 
 $(2)_SRCDIR			= $$($(2)_DIR)/$$($(2)_SUBDIR)
+ifneq ($$($2)_BUILD_DIR,)
+$(2)_BUILDDIR                  = $$($(2)_SRCDIR)/$$($(2)_BUILD_DIR)
+else
 $(2)_BUILDDIR			= $$($(2)_SRCDIR)
+endif
 
 #
 # Configure step. Only define it if not already defined by the package
@@ -69,7 +73,8 @@ ifeq ($(4),target)
 
 # 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) \
@@ -93,7 +98,8 @@ else
 
 # 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) \
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-25 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17 17:55 [Buildroot] [PATCH 1/4] pkg-cmake: allow to build package in a subdirectory Gwenhael Goavec-Merou
2015-02-17 17:55 ` [Buildroot] [PATCH 2/4] python-cheetah: add host-package support Gwenhael Goavec-Merou
2015-02-17 17:55 ` [Buildroot] [PATCH 3/4] python-markdown: " Gwenhael Goavec-Merou
2015-02-17 17:55 ` [Buildroot] [PATCH 4/4] GNURadio: new package Gwenhael Goavec-Merou
2015-02-25  9:40 ` [Buildroot] [PATCH 1/4] pkg-cmake: allow to build package in a subdirectory gwenhael.goavec
2015-02-25 13:43 ` Samuel Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.