blob: 512e2c9bd79eb70428998c3fb61b1de37fa0177e (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
if ( ! $(toolset) )
{
if ( $(OS) = SOLARIS )
{
toolset = suncc ;
}
else if ( $(UNIX) )
{
local GCCVERSION = [ Subst [ Shell "gcc -dumpversion" ] : $(NEWLINE) ] ;
toolset = "gcc"$(GCCVERSION) ;
}
else
{
toolset = msvc ;
}
}
if ( ! $(configuration) )
{
configuration = "debug" ;
}
if ( ! $(defines) )
{
defines = "PUGIXML_STANDARD" ;
}
if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) )
{
CCFLAGS = -fprofile-arcs -ftest-coverage ;
LDFLAGS = -fprofile-arcs ;
if $(fullcoverage)
{
GCOVFLAGS = --branch-probabilities --function-summaries ;
}
else
{
GCOVFLAGS = --no-output ;
}
}
BUILD = build ;
DEPCACHE.standard = $(BUILD)/.depcache ;
include "Jamrules.jam" ;
local DEFINESETS = [ Split $(defines) : ':' ] ;
local CONFIGURATIONS = [ Split $(configuration) : ',' ] ;
for CONFIG in $(CONFIGURATIONS)
{
for DEFINESET in $(DEFINESETS)
{
local DEFINES = [ Split $(DEFINESET) : ',' ] ;
local CFGBUILD = $(BUILD)/$(toolset)/$(DEFINES:J=_)/$(CONFIG) ;
local CFGFLAGS = $(CCFLAGS) [ GetCFlags $(CONFIG) : $(DEFINES) ] ;
local PUGIXML = $(CFGBUILD)/pugixml.lib ;
Library $(PUGIXML) : src/pugixml.cpp : $(CFGFLAGS) ;
Alias pugixml : $(PUGIXML) ;
local TESTS = $(CFGBUILD)/tests.exe ;
Application $(TESTS) : [ Glob tests : *.cpp ] : $(CFGFLAGS) : $(PUGIXML) ;
Alias tests : $(TESTS) ;
Test $(TESTS)_run : $(TESTS) ;
Alias run_tests : $(TESTS)_run ;
Coverage $(TESTS)_coverage : $(PUGIXML) ;
Alias coverage : $(TESTS)_coverage ;
GCOVFLAGS on $(TESTS)_coverage = $(GCOVFLAGS) -o $(CFGBUILD)/src ;
if $(autotest)
{
COVPREFIX on $(TESTS)_coverage = "... autotest $(CONFIG) [$(DEFINESET)]" ;
}
Depends $(TESTS)_coverage : $(TESTS)_run ;
}
}
Documentation docs/manual.html : docs/manual.qbk : docs/manual.xsl ;
Documentation docs/quickstart.html : docs/quickstart.qbk : docs/quickstart.xsl ;
Alias docs : docs/manual.html docs/quickstart.html ;
for SAMPLE in [ Glob docs/samples : *.cpp ]
{
local CONFIG = "debug" ;
local DEFINES = "PUGIXML_STANDARD" ;
local CFGBUILD = $(BUILD)/$(toolset)/$(DEFINES:J=_)/$(CONFIG) ;
local CFGFLAGS = $(CCFLAGS) [ GetCFlags $(CONFIG) : $(DEFINES) ] ;
CFGFLAGS += -I src ;
local EXECUTABLE = $(CFGBUILD)/samples/$(SAMPLE:B).exe ;
local PUGIXML = $(CFGBUILD)/pugixml.lib ;
Application $(EXECUTABLE) : $(SAMPLE) : $(CFGFLAGS) : $(PUGIXML) ;
RunSampleAction $(EXECUTABLE)_run : $(EXECUTABLE) ;
Depends $(EXECUTABLE)_run : $(EXECUTABLE) ;
Depends samples : $(EXECUTABLE)_run ;
}
VERSION = 1.5 ;
RELEASE_FILES =
[ Glob contrib : *.cpp *.hpp ]
[ Glob src : *.cpp *.hpp ]
[ Glob docs : *.html *.css ]
[ Glob docs/samples : *.cpp *.hpp *.xml ]
[ Glob docs/images : *.png ]
[ Glob docs/manual : *.html ]
@("scripts/**":W=:X=svn)
readme.txt
;
actions ArchiveAction
{
perl tests/archive.pl $(<) $(>)
}
ArchiveAction pugixml-$(VERSION).zip : $(RELEASE_FILES) ;
ArchiveAction pugixml-$(VERSION).tar.gz : $(RELEASE_FILES) ;
Depends release : pugixml-$(VERSION).zip pugixml-$(VERSION).tar.gz : $(RELEASE_FILES) ;
NotFile release ;
|