"Fossies" - the Fresh Open Source Software Archive

Member "qt-creator-opensource-src-5.0.2/doc/doc_targets.pri" (30 Sep 2021, 3317 Bytes) of package /linux/misc/qt-creator-opensource-src-5.0.2.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Creates targets for building documentation
    2 # (adapted from qt_docs.prf)
    3 #
    4 # Usage: Define variables (details below) and include this pri file afterwards.
    5 #
    6 # QDOC_ENV            - environment variables to set for the qdoc call (see example below)
    7 # DOC_INDEX_PATHS     - list of paths where qdoc should search for index files of dependent
    8 #                       modules (Qt index path is included by default)
    9 # DOC_FILES           - list of qdocconf files
   10 # DOC_OUTDIR_POSTFIX  - html is generated in $$OUT_PWD/<qdocconf_name>$$DOC_OUTDIR_POSTFIX
   11 # DOC_HTML_INSTALLDIR - path were to install the directory of html files
   12 # DOC_QCH_OUTDIR      - path where to generated the qch files
   13 # DOC_QCH_INSTALLDIR  - path where to install the qch files
   14 #
   15 # Example for QDOC_ENV:
   16 # ver.name = VERSION
   17 # ver.value = 1.0.2
   18 # foo.name = FOO
   19 # foo.value = foo
   20 # QDOC_ENV = ver foo
   21 
   22 isEmpty(DOC_FILES): error("Set DOC_FILES before including doc_targets.pri")
   23 isEmpty(DOC_HTML_INSTALLDIR): error("Set DOC_HTML_INSTALLDIR before including doc_targets.pri")
   24 isEmpty(DOC_QCH_OUTDIR): error("Set DOC_QCH_OUTDIR before including doc_targets.pri")
   25 isEmpty(DOC_QCH_INSTALLDIR): error("Set DOC_QCH_INSTALLDIR before including doc_targets.pri")
   26 
   27 QT_TOOL_ENV = $$QDOC_ENV
   28 qtPrepareTool(QDOC, qdoc)
   29 QT_TOOL_ENV =
   30 
   31 !build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
   32 
   33 DOCS_BASE_OUTDIR = $$OUT_PWD/doc/html
   34 DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS])
   35 for (index_path, DOC_INDEX_PATHS): \
   36     DOC_INDEXES += -indexdir $$shell_quote($$index_path)
   37 
   38 for (doc_file, DOC_FILES) {
   39     !exists($$doc_file): error("Cannot find documentation specification file $$doc_file")
   40     DOC_TARGET = $$replace(doc_file, ^(.*/)?(.*)\\.qdocconf$, \\2)
   41     DOC_TARGETDIR = $$DOC_TARGET
   42     DOC_OUTPUTDIR = $${DOCS_BASE_OUTDIR}/$${DOC_TARGETDIR}$${DOC_OUTDIR_POSTFIX}
   43 
   44     html_docs_$${DOC_TARGET}.commands = $$QDOC -outputdir $$shell_quote($$DOC_OUTPUTDIR) $$doc_file $$DOC_INDEXES $$DOC_INCLUDES
   45     QMAKE_EXTRA_TARGETS += html_docs_$${DOC_TARGET}
   46 
   47     !isEmpty(html_docs.commands): html_docs.commands += &&
   48     html_docs.commands += $$eval(html_docs_$${DOC_TARGET}.commands)
   49 
   50     inst_html_docs.files += $$DOC_OUTPUTDIR
   51 
   52     !build_online_docs {
   53         qch_docs_$${DOC_TARGET}.commands = $$QHELPGENERATOR $$shell_quote($$DOC_OUTPUTDIR/$${DOC_TARGET}.qhp) -o $$shell_quote($$DOC_QCH_OUTDIR/$${DOC_TARGET}.qch)
   54         qch_docs_$${DOC_TARGET}.depends = html_docs_$${DOC_TARGET}
   55         QMAKE_EXTRA_TARGETS += qch_docs_$${DOC_TARGET}
   56 
   57         !isEmpty(qch_docs.commands): qch_docs.commands += &&
   58         qch_docs.commands += $$eval(qch_docs_$${DOC_TARGET}.commands)
   59 
   60         inst_qch_docs.files += $$DOC_QCH_OUTDIR/$${DOC_TARGET}.qch
   61     }
   62 }
   63 
   64 !build_online_docs {
   65     qch_docs.depends = html_docs
   66     inst_qch_docs.path = $$DOC_QCH_INSTALLDIR
   67     inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
   68     install_docs.depends = install_inst_qch_docs
   69     docs.depends = qch_docs
   70     INSTALLS += inst_qch_docs
   71     QMAKE_EXTRA_TARGETS += qch_docs install_docs
   72 } else {
   73     docs.depends = html_docs
   74 }
   75 
   76 inst_html_docs.path = $$DOC_HTML_INSTALLDIR
   77 inst_html_docs.CONFIG += no_check_exist no_default_install directory
   78 INSTALLS += inst_html_docs
   79 install_docs.depends += install_inst_html_docs
   80 
   81 QMAKE_EXTRA_TARGETS += html_docs docs