On Fri, Jul 14, 2023 at 11:12:33PM +0200, Jean-Marc Lasgouttes wrote:
Le 14/07/2023 à 21:42, Enrico Forestieri a écrit :
I see (or maybe not). Next question is: why is fake custom target
names %?
Because that defines a dynamic target in a makefile:
https://stackoverflow.com/questions/7404444/what-does-a-percent-symbol-do-in-a-makefile
Thanks! I still have to understand whuy this is useful here, but I'll
read the code again.
Because qmake creates a makefile with the following target:
%:
@echo -n $($(@))
so, if you say "make INCPATH" it executes "echo $INCPATH", while if you
say "make LIBS" it executes "echo $LIBS".
Other point: I guess the issue with QtSvg is that you add modules only
when they are available. What are you doing that?
That was an oversight.
We want to fail in some way when there is no svg, not build without
it, don't we?
Yep. What about the attached?
--
Enrico
diff --git a/config/qt.m4 b/config/qt.m4
index aa90d56348..f5875fd6f4 100644
--- a/config/qt.m4
+++ b/config/qt.m4
@@ -414,12 +414,14 @@ EOF1
AC_SUBST(QT_CORE_LDFLAGS)
AC_SUBST(QT_CORE_LIB)
cat > $lyx_test_qt_pro << EOF2
-qtHaveModule(core): QT += core
-qtHaveModule(concurrent): QT += concurrent
-qtHaveModule(gui): QT += gui gui-private
-qtHaveModule(svg): QT += svg
-qtHaveModule(svgwidgets): QT += svgwidgets
-qtHaveModule(widgets): QT += widgets
+QMAKE_EXTRA_VARIABLES = MISSING
+MISSING =
+qtHaveModule(core) {QT += core} else {MISSING += core}
+qtHaveModule(concurrent) {QT += concurrent} else {MISSING += concurrent}
+qtHaveModule(gui) {QT += gui gui-private} else {MISSING += gui}
+qtHaveModule(svg) {QT += svg} else {MISSING += svg}
+qtHaveModule(svgwidgets) {QT += svgwidgets} else {MISSING += svgwidgets}
+qtHaveModule(widgets) {QT += widgets} else {MISSING += widgets}
percent.target = %
percent.commands = @echo -n "\$(\$(@))\ "
QMAKE_EXTRA_TARGETS += percent
@@ -439,6 +441,10 @@ EOF2
if test -z "$QT_LIB"; then
AC_MSG_RESULT(no)
else
+ QT_MISSING=`cd $lyx_test_qt_dir; make -s -f
$lyx_test_qt_mak EXPORT_MISSING | sed 's/^ *//'`
+ if test -n "$QT_MISSING"; then
+ LYX_WARNING([Qt6 module(s) $QT_MISSING not found.])
+ fi
AC_MSG_RESULT(yes)
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LDFLAGS)
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel