* [Buildroot] [PATCHv5 0/1] qt: Add option to build and install tools on the @ 2012-03-05 11:10 Ismael Luceno 2012-03-05 11:10 ` [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target Ismael Luceno 0 siblings, 1 reply; 4+ messages in thread From: Ismael Luceno @ 2012-03-05 11:10 UTC (permalink / raw) To: buildroot Changes since v4: * Fixed to handle empty $(QT_TARGET_PROGRAMS-y) correctly Changes since v3: * Fixed comment and typo Changes since v2: * Comment tools dependency on SQL module * Replaced $(if $(...)) for VAR-$(...) * More granularity on the installation of target tools ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target 2012-03-05 11:10 [Buildroot] [PATCHv5 0/1] qt: Add option to build and install tools on the Ismael Luceno @ 2012-03-05 11:10 ` Ismael Luceno 2012-03-05 12:50 ` Thomas Petazzoni 0 siblings, 1 reply; 4+ messages in thread From: Ismael Luceno @ 2012-03-05 11:10 UTC (permalink / raw) To: buildroot Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com> --- package/qt/Config.in | 25 +++++++++++++++++++++++++ package/qt/qt.mk | 12 ++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/package/qt/Config.in b/package/qt/Config.in index 3a552d0..1c24d1f 100644 --- a/package/qt/Config.in +++ b/package/qt/Config.in @@ -16,6 +16,31 @@ config BR2_PACKAGE_QT_DEBUG help If unsure, say N. +menuconfig BR2_PACKAGE_QT_TOOLS + bool "Compile and install tools" + depends on BR2_PACKAGE_QT_SQL_MODULE && BR2_PACKAGE_QT_GUI_MODULE + # SQL module is needed to build, but only required at run-time by a + # few tools (assistant, designer, qmlviewer). + +if BR2_PACKAGE_QT_TOOLS + +config BR2_PACKAGE_QT_TOOLS_QTCONFIG + bool "qtconfig" + depends on BR2_PACKAGE_QT_GUI_X11 + +config BR2_PACKAGE_QT_TOOLS_QMLVIEWER + bool "qmlviewer" + depends on BR2_PACKAGE_QT_DECLARATIVE + +config BR2_PACKAGE_QT_TOOLS_QMLPLUGINDUMP + bool "qmlplugindump" + depends on BR2_PACKAGE_QT_DECLARATIVE + +endif # BR2_PACKAGE_QT_TOOLS + +comment "Tools need the SQL and GUI modules" + depends on !BR2_PACKAGE_QT_SQL_MODULE || !BR2_PACKAGE_QT_GUI_MODULE + config BR2_PACKAGE_QT_DEMOS bool "Compile and install demos and examples (with code)" help diff --git a/package/qt/qt.mk b/package/qt/qt.mk index 776eb63..23fa53d 100644 --- a/package/qt/qt.mk +++ b/package/qt/qt.mk @@ -417,6 +417,12 @@ else QT_CONFIGURE_OPTS += -no-declarative endif +ifeq ($(BR2_PACKAGE_QT_TOOLS),y) +QT_CONFIGURE_OPTS += -make tools +else +QT_CONFIGURE_OPTS += -nomake tools +endif + # ccache and precompiled headers don't play well together ifeq ($(BR2_CCACHE),y) QT_CONFIGURE_OPTS += -no-pch @@ -514,6 +520,9 @@ endef QT_INSTALL_LIBS += QtCore QT_HOST_PROGRAMS += moc rcc qmake lrelease +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QTCONFIG) += qtconfig +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QMLVIEWER) += qmlviewer +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QMLPLUGINDUMP) += qmlplugindump ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y) QT_INSTALL_LIBS += QtGui @@ -583,6 +592,9 @@ define QT_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) install mkdir -p $(HOST_DIR)/usr/bin mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin +ifneq ($(strip $(QT_TARGET_PROGRAMS-y)),) + mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS-y)) $(TARGET_DIR)/usr/bin +endif rm -rf $(HOST_DIR)/usr/mkspecs mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr $(QT_INSTALL_QT_CONF) -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target 2012-03-05 11:10 ` [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target Ismael Luceno @ 2012-03-05 12:50 ` Thomas Petazzoni 2012-03-05 14:55 ` Ismael Luceno 0 siblings, 1 reply; 4+ messages in thread From: Thomas Petazzoni @ 2012-03-05 12:50 UTC (permalink / raw) To: buildroot Hello Ismael, I think you're going to get crazy, but... Le Mon, 5 Mar 2012 09:10:27 -0200, Ismael Luceno <ismael.luceno@gmail.com> a ?crit : > @@ -583,6 +592,9 @@ define QT_INSTALL_STAGING_CMDS > $(MAKE) -C $(@D) install > mkdir -p $(HOST_DIR)/usr/bin > mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin > +ifneq ($(strip $(QT_TARGET_PROGRAMS-y)),) > + mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS-y)) $(TARGET_DIR)/usr/bin > +endif > rm -rf $(HOST_DIR)/usr/mkspecs > mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr > $(QT_INSTALL_QT_CONF) this will not work. You cannot do ifeq/ifneq tests within define...endef blocks. I have another question about: +menuconfig BR2_PACKAGE_QT_TOOLS + bool "Compile and install tools" + depends on BR2_PACKAGE_QT_SQL_MODULE && BR2_PACKAGE_QT_GUI_MODULE + # SQL module is needed to build, but only required at run-time by a + # few tools (assistant, designer, qmlviewer). + +if BR2_PACKAGE_QT_TOOLS + +config BR2_PACKAGE_QT_TOOLS_QTCONFIG + bool "qtconfig" + depends on BR2_PACKAGE_QT_GUI_X11 + +config BR2_PACKAGE_QT_TOOLS_QMLVIEWER + bool "qmlviewer" + depends on BR2_PACKAGE_QT_DECLARATIVE + +config BR2_PACKAGE_QT_TOOLS_QMLPLUGINDUMP + bool "qmlplugindump" + depends on BR2_PACKAGE_QT_DECLARATIVE + +endif # BR2_PACKAGE_QT_TOOLS + +comment "Tools need the SQL and GUI modules" + depends on !BR2_PACKAGE_QT_SQL_MODULE || !BR2_PACKAGE_QT_GUI_MODULE So it means that *all* tools depend on the GUI module and SQL module, and then qtconfig specifically needs X11 in addition to SQL and GUI, and qmlviewer and qmlplugindump need the QtDeclarative module in addition to SQL and GUI. I am a bit surprised that the qmlviewer and qmlplugindump tools require the SQL module. Is this correct? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target 2012-03-05 12:50 ` Thomas Petazzoni @ 2012-03-05 14:55 ` Ismael Luceno 0 siblings, 0 replies; 4+ messages in thread From: Ismael Luceno @ 2012-03-05 14:55 UTC (permalink / raw) To: buildroot On Mon, 5 Mar 2012 13:50:03 +0100 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: <...> > Le Mon, 5 Mar 2012 09:10:27 -0200, > Ismael Luceno <ismael.luceno@gmail.com> a ?crit : > > > @@ -583,6 +592,9 @@ define QT_INSTALL_STAGING_CMDS > > $(MAKE) -C $(@D) install > > mkdir -p $(HOST_DIR)/usr/bin > > mv $(addprefix > > $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin > > +ifneq ($(strip $(QT_TARGET_PROGRAMS-y)),) > > + mv $(addprefix > > $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS-y)) > > $(TARGET_DIR)/usr/bin +endif rm -rf $(HOST_DIR)/usr/mkspecs > > mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr > > $(QT_INSTALL_QT_CONF) > > this will not work. You cannot do ifeq/ifneq tests within > define...endef blocks. <...> Oh :/. I gues I'll have to replace it with an $(if ...). > So it means that *all* tools depend on the GUI module and SQL module, <...> Not exactly. The problem is, there's no way to choose which tools are built, so the dependency just serves as a way to predict if the tool will be built or not. We're not telling anything to the build system based on those options. IMO, patching the project file is asking for problems. > I am a bit surprised that the qmlviewer and qmlplugindump tools > require the SQL module. Is this correct? Yes, I tried without the SQL module at first, but it gave an error. I guess it's only needed by qmlviewer, but both are built together. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120305/b4189aa9/attachment.asc> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-05 14:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-05 11:10 [Buildroot] [PATCHv5 0/1] qt: Add option to build and install tools on the Ismael Luceno 2012-03-05 11:10 ` [Buildroot] [PATCHv5 1/1] qt: Add option to build and install tools on the target Ismael Luceno 2012-03-05 12:50 ` Thomas Petazzoni 2012-03-05 14:55 ` Ismael Luceno
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox