xconfig: use pkgconfig to find moc
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / scripts / kconfig / Makefile
index 79662658fb9158af1d7b3ee43dba0cfab0aa42cf..5e2176cba4a63f7474767adf274b447bec861a65 100644 (file)
@@ -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" >> $@; \