~thomas-moenicke/phablet-extras/maliit-plugins-0.99-server

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
include(config.pri)

!isEmpty(HELP) {
    # Output help
    help_string = \
        Important build options: \
        \\n\\t PREFIX: Install prefix for tools. Default: Maliit framework prefix \
        \\n\\t\\t Note that the plugins themselves are installed under Maliit framework prefix \
        \\n\\t LIBDIR: Library install directory. Default: $$PREFIX/lib \
        \\n\\t MALIIT_DEFAULT_PROFILE: Default keyboard style. Default: nokia-n9 \
        \\n\\t HUNSPELL_DICT_PATH: Path to hunspell dictionaries. Default: $$PREFIX/share/hunspell \
        \\nRecognised CONFIG flags: \
        \\n\\t enable-presage: Use presage to calculate word candidates (maliit-keyboard-plugin only) \
        \\n\\t enable-hunspell: Use hunspell for error correction (maliit-keyboard-plugin only) \
        \\n\\t disable-preedit: Always commit characters and never use preedit (maliit-keyboard-plugin only) \
        \\n\\t enable-qt-mobility: Enable use of QtMobility (enables sound and haptic feedback) \
        \\n\\t notests: Do not attempt to build tests \
        \\n\\t nodoc: Do not build documentation \
        \\n\\t disable-maliit-keyboard: Don't build the C++ reference keyboard (Maliit Keyboard) \
        \\n\\t disable-nemo-keyboard: Don't build the QML reference keyboard (Nemo Keyboard) \
        \\nInfluential environment variables: \
        \\n\\t QMAKEFEATURES A mkspecs/features directory list to look for features. \
        \\n\\t\\t Use it if a dependency is installed to non-default location. \
        \\n\\t\\t Note that it must also be passed to qmake calls in subdirectories. \
        \\nExamples: \
        \\n\\t qmake \
        \\n\\t qmake PREFIX=/usr LIBDIR=/usr/lib64 \

    !build_pass:system(echo -e \"$$help_string\")
} else {
    config_string = Tip: Run qmake HELP=1 for a list of all supported build options

    !build_pass:system(echo -e \"$$config_string\")
}

CONFIG += ordered
TEMPLATE = subdirs

!disable-nemo-keyboard:SUBDIRS += nemo-keyboard
!disable-maliit-keyboard:SUBDIRS += maliit-keyboard
!nodoc:SUBDIRS += doc

DIST_NAME = $$MALIIT_PACKAGENAME-$$MALIIT_VERSION
DIST_PATH = $$OUT_PWD/$$DIST_NAME
TARBALL_SUFFIX = .tar.bz2
TARBALL_PATH = $$DIST_PATH$$TARBALL_SUFFIX

# The 'make dist' target
# Creates a tarball
QMAKE_EXTRA_TARGETS += dist
dist.target = dist
dist.commands += git archive HEAD --prefix=$$DIST_NAME/ | bzip2 > $$TARBALL_PATH;
dist.commands += md5sum $$TARBALL_PATH | cut -d \' \' -f 1 > $$DIST_PATH\\.md5

# The 'make coverage' target
# Builds plugins with coverage libs in separate directory.
COVERAGE_CONFIG_STRING = CONFIG+=debug CONFIG+=nodoc CONFIG+=no-werror

enable-presage {
    COVERAGE_CONFIG_STRING += CONFIG+=enable-presage
}

enable-hunspell {
    COVERAGE_CONFIG_STRING += CONFIG+=enable-hunspell
}

disable-preedit {
    COVERAGE_CONFIG_STRING += CONFIG+=disable-preedit
}

enable-qt-mobility {
    COVERAGE_CONFIG_STRING += CONFIG+=enable-qt-mobility
}

COVERAGE_DIR = coverage-build

QMAKE_EXTRA_TARGETS += coverage
coverage.target = coverage

coverage.commands += $(MKDIR) $$COVERAGE_DIR &&
coverage.commands += cd $$COVERAGE_DIR &&
coverage.commands += $(QMAKE) -r PREFIX=\"$$PREFIX\" LIBDIR=\"$$LIBDIR\" MALIIT_DEFAULT_PROFILE=\"$$MALIIT_DEFAULT_PROFILE\" HUNSPELL_DICT_PATH=\"$$HUNSPELL_DICT_PATH\" $$COVERAGE_CONFIG_STRING LIBS+=\"$$LIBS\" INCLUDEPATH+=\"$$INCLUDEPATH\" LIBS+=-lgcov QMAKE_CXXFLAGS_DEBUG+=\"-fprofile-arcs -ftest-coverage\" QMAKE_LFLAGS_DEBUG+=\"-fprofile-arcs -ftest-coverage\" $$PWD/maliit-plugins.pro.coverage &&
coverage.commands += make $(MAKEFLAGS) coverage

coverage.clean_commands = rm -rf $$COVERAGE_DIR