~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Tools/qmake/mkspecs/features/use_all_in_one_files.prf

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -------------------------------------------------------------------
 
2
# This feature enables the use of AllInOne.cpp files by adding them
 
3
# to SOURCES and removing the sources the corresponding files include
 
4
# from SOURCES, to avoid duplicated compilation units.
 
5
#
 
6
# See 'Tools/qmake/README' for an overview of the build system
 
7
# -------------------------------------------------------------------
 
8
 
 
9
# Globbing all does not work yet, not all AllInOne files build reliably yet.
 
10
# So instead we select them manually.
 
11
#collection = $$files($$_PRO_FILE_PWD_/*AllInOne.cpp, true)
 
12
collection = $$ALL_IN_ONE_SOURCES
 
13
 
 
14
for(collectionFile, collection) {
 
15
    lines = $$cat($$_PRO_FILE_PWD_/$$collectionFile, lines)
 
16
    for(line, lines) {
 
17
        line = $$find(line, "^.+include \"(.*)\"")
 
18
        isEmpty(line): next()
 
19
        line ~= s/^.+include \"(.*)\"/\\1/
 
20
        source = $$dirname(collectionFile)/$$line
 
21
        contains(SOURCES, $$source) {
 
22
            SOURCES -= $$source
 
23
            tookFromSources = true
 
24
        }
 
25
    }
 
26
    !isEmpty(tookFromSources): SOURCES *= $$collectionFile
 
27
}
 
28