Skip to contentSkip to conversation

xconfig: use pkgconfig to find moc

PATCH In review Yaakov (Cygwin/X) 2 participants 4 messages Jun 11, 2012 – Jul 13, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xconfig: use pkgconfig to find moc

From: Yaakov Selkowitz <[email protected]>

Various schemes exist to allow parallel installations of multiple major versions of Qt (4.x with the previous 3.x and/or the upcoming 5.x). QtCore.pc includes a moc_location variable which should be a more reliable way to find moc.

---
Also applies to all 3.x stable branches

 scripts/kconfig/Makefile |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
scripts/kconfig/Makefile +1 -2
index 7966265..059b5ca 100644
@@ -260,8 +260,7 @@ $(obj)/.tmp_qtcheck:
 	else \
 	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
 	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
-	  binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
-	  moc="$$binpath/bin/moc"; \
+	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
 	fi; \
 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 	echo "KC_QT_LIBS=$$libs" >> $@; \
Signature · 1 line
1.7.9
#1 lore raw

scripts/kconfig/Makefile $(obj)/.tmp_qtcheck: · line 264

Quoted 4 lines · Yaakov (Cygwin/X)
scripts/kconfig/Makefile +1 -2
-	  binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
-	  moc="$$binpath/bin/moc"; \
+	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
 	fi; \

Could you keep the $$binpath/bin/moc as a fallback, so that make xconfig works even with old Qt4 releases. We support even Qt3, so let's continue to be nice to users.

Michal

#2 lore raw

PATCH 1/1 xconfig: use pkgconfig to find moc

From: Yaakov Selkowitz <[email protected]>

Various schemes exist to allow parallel installations of multiple major versions of Qt (4.x with the previous 3.x and/or the upcoming 5.x). QtCore.pc includes a moc_location variable which should be a more reliable way to find moc.

---
 scripts/kconfig/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/kconfig/Makefile +2 -2
index 7966265..5e2176c 100644
@@ -260,8 +260,8 @@ $(obj)/.tmp_qtcheck:
 	else \
 	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
 	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
-	  binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
-	  moc="$$binpath/bin/moc"; \
+	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
+	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
 	fi; \
 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 	echo "KC_QT_LIBS=$$libs" >> $@; \
Signature · 1 line
1.7.9
#3 lore raw
Quoted 8 lines · Yaakov (Cygwin/X)

From: Yaakov Selkowitz <[email protected]>

Various schemes exist to allow parallel installations of multiple major versions of Qt (4.x with the previous 3.x and/or the upcoming 5.x). QtCore.pc includes a moc_location variable which should be a more reliable way to find moc.

Thanks, applied to kbuild.git#kconfig.

Michal