diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-01-12 09:01:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-01-12 11:07:56 +0100 |
commit | 6b8c0a50585bb637c5cd33ca8ffde0cb9c4e3664 (patch) | |
tree | 12647726671357a571e2b371b0e33199efb08156 /mkspecs | |
parent | 66d94ea30be9c4c8cc81a52134022eb662bedd77 (diff) | |
parent | ca7f1d2197f78ec3332cfd86ab9921730b6d4f23 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/data/unix/findclasslist.pl | 42 | ||||
-rw-r--r-- | mkspecs/features/qt_docs.prf | 23 | ||||
-rw-r--r-- | mkspecs/features/qt_docs_targets.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qt_module.prf | 38 |
4 files changed, 58 insertions, 65 deletions
diff --git a/mkspecs/features/data/unix/findclasslist.pl b/mkspecs/features/data/unix/findclasslist.pl index ac010ae0a7..adec22d58d 100644 --- a/mkspecs/features/data/unix/findclasslist.pl +++ b/mkspecs/features/data/unix/findclasslist.pl @@ -1,7 +1,7 @@ #!/usr/bin/env perl ############################################################################# ## -## Copyright (C) 2015 Intel Corporation +## Copyright (C) 2016 Intel Corporation ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the build configuration tools of the Qt Toolkit. @@ -33,40 +33,26 @@ ############################################################################# use strict; -my $syntax = "findclasslist.pl <file (containing private header list)>\n" . - "Replaces \@CLASSLIST\@ with the classes found in the header files\n"; - -die("Expected exactly one argument") if (@ARGV != 1); - -my @headers = (); - -# Expand contents of the command-line arguments file -open ARGFILE, "<$ARGV[0]" or die("Could not open arguments file $ARGV[0]: $!"); -while (my $line = <ARGFILE>) { - chomp($line); - push @headers, $line; -} -close ARGFILE; +my $syntax = "findclasslist.pl\n" . + "Replaces each \@FILE:filename\@ in stdin with the classes found in that file\n"; $\ = $/; while (<STDIN>) { chomp; - unless (/\@CLASSLIST\@/) { + unless (/\@FILE:(.*)\@/) { print; next; } - # Replace @CLASSLIST@ with the class list - for my $header (@headers) { - open HDR, "<$header" or die("Could not open header $header: $!"); - my $comment = " /* $header */"; - while (my $line = <HDR>) { - # Match a struct or class declaration, but not a forward declaration - $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next; - print $comment if $comment; - printf " *%d%s*;\n", length $1, $1; - $comment = 0; - } - close HDR; + # Replace this line with the class list + open HDR, "<$1" or die("Could not open header $1: $!"); + my $comment = " /* $1 */"; + while (my $line = <HDR>) { + # Match a struct or class declaration, but not a forward declaration + $line =~ /^(?:struct|class) (?:Q_.*_EXPORT)? (\w+)(?!;)/ or next; + print $comment if $comment; + printf " *%d%s*;\n", length $1, $1; + $comment = 0; } + close HDR; } diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index 37b2f06193..183d0c9502 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -11,13 +11,6 @@ !exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS") -load(qt_build_paths) -QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/doc - -QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2) -isEmpty(QMAKE_DOCS_TARGETDIR): QMAKE_DOCS_TARGETDIR = $$QMAKE_DOCS_TARGET -QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR - qtver.name = QT_VERSION qtver.value = $$VERSION isEmpty(qtver.value): qtver.value = $$MODULE_VERSION @@ -31,6 +24,21 @@ qtdocs.value = $$[QT_INSTALL_DOCS/src] QT_TOOL_ENV = qtver qtmver qtvertag qtdocs qtPrepareTool(QDOC, qdoc) QT_TOOL_ENV = + +!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator) + +# qtPrepareTool() must be called outside a build pass, as it protects +# against concurrent wrapper creation by omitting it during build passes. +# However, creating the actual targets is reserved to the build passes. +debug_and_release:!build_pass: return() + +load(qt_build_paths) +QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/doc + +QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2) +isEmpty(QMAKE_DOCS_TARGETDIR): QMAKE_DOCS_TARGETDIR = $$QMAKE_DOCS_TARGET +QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR + QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR) !build_online_docs: \ QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS]) @@ -64,7 +72,6 @@ prepare_docs { } !build_online_docs { - qtPrepareTool(QHELPGENERATOR, qhelpgenerator) qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch) inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR diff --git a/mkspecs/features/qt_docs_targets.prf b/mkspecs/features/qt_docs_targets.prf index 89f080cc5e..1f9e2b0b47 100644 --- a/mkspecs/features/qt_docs_targets.prf +++ b/mkspecs/features/qt_docs_targets.prf @@ -29,17 +29,17 @@ QMAKE_EXTRA_TARGETS += docs contains(TEMPLATE, subdirs) { for(inst, DOC_TARGETS): \ prepareRecursiveTarget($$inst) -} else:debug_and_release:!build_pass { - sub = $$first(BUILDS) - for(inst, DOC_TARGETS) { - $${inst}.CONFIG = recursive - $${inst}.recurse = $$sub - } } else { - # apps and libs only generate docs if QMAKE_DOCS is set - !isEmpty(QMAKE_DOCS) { - # backwards compat hack - load(qt_docs) + debug_and_release:!build_pass { + sub = $$first(BUILDS) + for(inst, DOC_TARGETS) { + $${inst}.CONFIG = recursive + $${inst}.recurse = $$sub + } } + # Apps and libs request docs creation by setting QMAKE_DOCS. + # This is a backwards compat hack - technically, the modules which need it + # are supposed to load(qt_docs) themselves. + !isEmpty(QMAKE_DOCS): load(qt_docs) } QMAKE_EXTRA_TARGETS += $$DOC_TARGETS diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 1dae370630..6ed75a4416 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -132,7 +132,6 @@ lib_bundle { } mac { - CONFIG += explicitlib macx-g++ { QMAKE_CFLAGS += -fconstant-cfstrings QMAKE_CXXFLAGS += -fconstant-cfstrings @@ -200,7 +199,10 @@ android: CONFIG += qt_android_deps no_linker_version_script verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };" } else { verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \ - " qt_private_api_tag*;" "@CLASSLIST@" "};" + " qt_private_api_tag*;" + for(header, SYNCQT.PRIVATE_HEADER_FILES): \ + verscript_content += " @FILE:$${_PRO_FILE_PWD_}/$$header@" + verscript_content += "};" current = Qt_$$QT_MAJOR_VERSION verscript_content += "$$current { *; };" @@ -214,13 +216,12 @@ android: CONFIG += qt_android_deps no_linker_version_script else: verscript_content += "$$current {} $$previous;" } - # Add a post-processing step to replace the @CLASSLIST@ - verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $${verscript}.in $${verscript}.in.args > $@ + # Add a post-processing step to replace the @FILE:filename@ + verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $${verscript}.in > $@ verscriptprocess.target = $$verscript for(header, SYNCQT.PRIVATE_HEADER_FILES): \ verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header - write_file($${verscript}.in.args, verscriptprocess.depends)|error("Aborting.") - verscriptprocess.depends += $${verscript}.in $${verscript}.in.args + verscriptprocess.depends += $${verscript}.in QMAKE_EXTRA_TARGETS += verscriptprocess PRE_TARGETDEPS += $$verscript verscript = $${verscript}.in @@ -258,19 +259,18 @@ load(qt_targets) pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR pclib_replace.CONFIG = path QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace - - unix { - CONFIG += create_libtool explicitlib - host_build: \ - QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS] - else: \ - QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]" - ltlib_replace.match = $$lib_replace.match - !isEmpty(lib_replace.replace): \ - ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR - ltlib_replace.CONFIG = path - QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace - } +} +!lib_bundle:unix { + CONFIG += create_libtool + host_build: \ + QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS] + else: \ + QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]" + ltlib_replace.match = $$lib_replace.match + !isEmpty(lib_replace.replace): \ + ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR + ltlib_replace.CONFIG = path + QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace } contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE |