1 include(../../python.pri)
4 # This qmake code generates AuthorsModel.qml using CREDITS.txt.
6 # This is a bit tricky since the script should be run always and before
7 # the other dependencies evaluation.
10 # Since debug_and_release option is set, we need this
11 !debug_and_release|build_pass {
13 # Define other variables
14 AUTHORS_SCRIPT = $$GCS_SOURCE_TREE/src/plugins/coreplugin/authorsdialog.py
15 AUTHORS_COMMAND = $$PYTHON \"$$AUTHORS_SCRIPT\"
16 AUTHORS_SOURCE = $$ROOT_DIR/CREDITS.txt
17 AUTHORS_TEMPLATE = $$GCS_SOURCE_TREE/src/plugins/coreplugin/qml/AuthorsModel.qml.template
18 AUTHORS_DIR = $$GCS_BUILD_TREE/../gcs-synthetics
19 AUTHORS_FILE = $$AUTHORS_DIR/AuthorsModel.qml
21 # Create custom authors target which generates a real file
22 authors.target = $$AUTHORS_FILE
23 authors.commands = -$(MKDIR) $$AUTHORS_DIR $$addNewline()
24 authors.commands += $$AUTHORS_COMMAND \
25 --infile=\"$$AUTHORS_SOURCE\" \
26 --template=\"$$AUTHORS_TEMPLATE\" \
27 --outfile=\"$$AUTHORS_FILE\"
28 authors.depends = $$AUTHORS_SOURCE
29 QMAKE_EXTRA_TARGETS += authors
31 # Hook authors target in between qmake's Makefile update and
32 # the actual project target
33 authors_hook.depends = authors
35 CONFIG(debug,debug|release):authors_hook.target = Makefile.Debug
36 CONFIG(release,debug|release):authors_hook.target = Makefile.Release
38 authors_hook.target = Makefile
40 QMAKE_EXTRA_TARGETS += authors_hook