From 8d69232b28165079aed1d754f9bdd8c7c4336b16 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 May 2013 11:07:13 +0200 Subject: let configure create the forwarding qconfig.h again this avoids that syncqt needs to forward to a yet unexisting file (which will have a yet unknown location, when syncqt is run at packaging time already). the %inject_headers syncqt config variable remains, so it can be told not to purge "foreign" files. Change-Id: I127ff6e0b7d5702fb0acaee9a5b7940b482d3608 Reviewed-by: Joerg Bornemann --- configure | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 079f2e7415..43e7f8851e 100755 --- a/configure +++ b/configure @@ -6424,6 +6424,23 @@ else fi fi +# create a forwarding header +mkdir -p "$outpath/include/QtCore" || exit +echo '#include "../../src/corelib/global/qconfig.h"' > $outpath/include/QtCore/qconfig.h.new +if cmp -s "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h"; then + rm -f "$outpath/include/QtCore/qconfig.h.new" +else + mv "$outpath/include/QtCore/qconfig.h.new" "$outpath/include/QtCore/qconfig.h" || exit +fi + +# create a camelcase forwarding header +echo '#include "qconfig.h"' > $outpath/include/QtCore/QtConfig.new +if cmp -s "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig"; then + rm -f "$outpath/include/QtCore/QtConfig.new" +else + mv "$outpath/include/QtCore/QtConfig.new" "$outpath/include/QtCore/QtConfig" || exit +fi + #------------------------------------------------------------------------------- # save configuration into qconfig.pri #------------------------------------------------------------------------------- -- cgit v1.2.3 From 0a1b89bff5015c8389807f55c1b39d360af55e9a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 May 2013 21:34:05 +0200 Subject: run syncqt only for builds from git the logic in the configures was even trying to express that, only that nowadays we always ship syncqt, so the tests were kinda pointless. this frees us from the perl dependency for non-developer builds of packaged modules (except for webkit, which needs almost every scripting language on earth anyway). obviously, this requires that the packaging scripts run syncqt in the source dir before tarring up the sources. note that for repositories other than qtbase, the -version argument needs to be passed to syncqt. Task-number: QTBUG-29465 Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6 Reviewed-by: Joerg Bornemann --- configure | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 43e7f8851e..1e15220ca1 100755 --- a/configure +++ b/configure @@ -2389,13 +2389,6 @@ fi if [ "$OPT_SHADOW" = "yes" ]; then echo "Preparing build tree..." - if [ -z "$PERL" ]; then - echo - echo "You need perl in your PATH to make a shadow build." - echo "Cannot proceed." - exit 1 - fi - [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" # save a pre-existing mkspecs/modules dir @@ -3895,7 +3888,14 @@ fi # ----------------------------------------------------------------------------- # symlink includes -if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt.pl" ]; then +if [ -e "$relpath/.git" ]; then + if [ -z "$PERL" ]; then + echo + echo "You need perl in your PATH to make a build from GIT." + echo "Cannot proceed." + exit 1 + fi + "$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1 fi @@ -4028,6 +4028,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; echo "BUILD_PATH = $adjoutpath" >> "$mkfile" echo "SOURCE_PATH = $adjrelpath" >> "$mkfile" + if [ -e "$relpath/.git" ]; then + echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile" + else + echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile" + fi echo "QMAKESPEC = $adjqmakespec" >> "$mkfile" echo "QT_VERSION = $QT_VERSION" >> "$mkfile" echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile" -- cgit v1.2.3 From 930dc240d1938dac8d6512b947cb143fc91c3d21 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 May 2013 11:11:56 +0200 Subject: remove pointless symlink fallback for qconfig.h syncqt does that nowadays. Change-Id: Iffc465cce86a7c6370afaa543ba9b9ed8d478eea Reviewed-by: Joerg Bornemann --- configure | 3 --- 1 file changed, 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1e15220ca1..d7c96749f4 100755 --- a/configure +++ b/configure @@ -6424,9 +6424,6 @@ else [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h" mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h" chmod -w "$outpath/src/corelib/global/qconfig.h" - if [ ! -f "$outpath/include/QtCore/qconfig.h" ]; then - ln -s "$outpath/src/corelib/global/qconfig.h" "$outpath/include/QtCore/qconfig.h" - fi fi # create a forwarding header -- cgit v1.2.3 From 49bee21d576df63c679584bb3665cc86cdaa1d01 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 May 2013 11:18:09 +0200 Subject: don't make qconfig.h read-only not much point in it, really. Change-Id: If984aa137993ae6b95cb3591fceac729ae3aa819 Reviewed-by: Joerg Bornemann --- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d7c96749f4..a5831efb50 100755 --- a/configure +++ b/configure @@ -6421,9 +6421,7 @@ echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\"" >>"$out if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then rm -f "$outpath/src/corelib/global/qconfig.h.new" else - [ -f "$outpath/src/corelib/global/qconfig.h" ] && chmod +w "$outpath/src/corelib/global/qconfig.h" - mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h" - chmod -w "$outpath/src/corelib/global/qconfig.h" + mv -f "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h" fi # create a forwarding header -- cgit v1.2.3