Commit | Line | Data |
---|---|---|
7845e95f MJ |
1 | ## |
2 | ## This target generates an include file that contains the git version | |
3 | ## string of the current branch, it must be continuously updated when | |
4 | ## we build in the git repo and shipped in dist tarballs to reflect the | |
5 | ## status of the tree when it was generated. If the tree is clean and | |
6 | ## the current commit is tag a starting with "v", consider this a | |
7 | ## release version and set an empty git version. | |
8 | ## | |
9 | ## Here is what the inline script does: | |
10 | ## | |
11 | ## First, delete any stale "version.i.tmp" file. | |
12 | ## | |
13 | ## If "bootstrap" and ".git" exists in the top source directory and the git | |
14 | ## executable is available, get the current git version string in the form: | |
15 | ## | |
16 | ## "latest_tag"(-"number_of_commits_on_top")(-g"latest_commit_hash")(-dirty) | |
17 | ## | |
18 | ## And store it in "version.i.tmp", if the current commit is tagged, the tag | |
19 | ## starts with "v" and the tree is clean, consider this a release version and | |
20 | ## overwrite the git version with an empty string in "version.i.tmp". | |
21 | ## | |
22 | ## If we don't have a "version.i.tmp" nor a "version.i", generate an empty | |
23 | ## string as a failover. | |
24 | ## | |
25 | ## If we don't have a "version.i" or we have both files and they are different, | |
26 | ## copy "version.i.tmp" over "version.i". This way the dependent targets are | |
27 | ## only rebuilt when the version string changes. | |
28 | ## | |
29 | ||
30 | version_verbose = $(version_verbose_@AM_V@) | |
31 | version_verbose_ = $(version_verbose_@AM_DEFAULT_V@) | |
32 | version_verbose_0 = @echo " GEN " $@; | |
33 | ||
34 | version.i: | |
35 | $(version_verbose)rm -f version.i.tmp; \ | |
36 | if (test -r "$(top_srcdir)/bootstrap" && test -r "$(top_srcdir)/.git") && \ | |
37 | test -x "`which git 2>&1;true`"; then \ | |
38 | GIT_VERSION_STR="`cd "$(top_srcdir)" && git describe --tags --dirty`"; \ | |
39 | GIT_CURRENT_TAG="`cd "$(top_srcdir)" && git describe --tags --exact-match --match="v[0-9]*" HEAD 2> /dev/null`"; \ | |
40 | echo "#define GIT_VERSION \"$$GIT_VERSION_STR\"" > version.i.tmp; \ | |
41 | if ! $(GREP) -- "-dirty" version.i.tmp > /dev/null && \ | |
42 | test "x$$GIT_CURRENT_TAG" != "x"; then \ | |
43 | echo "#define GIT_VERSION \"\"" > version.i.tmp; \ | |
44 | fi; \ | |
45 | fi; \ | |
46 | if test ! -f version.i.tmp; then \ | |
47 | if test ! -f version.i; then \ | |
48 | echo '#define GIT_VERSION ""' > version.i; \ | |
49 | fi; \ | |
50 | elif test ! -f version.i || \ | |
51 | test x"`cat version.i.tmp`" != x"`cat version.i`"; then \ | |
52 | mv version.i.tmp version.i; \ | |
53 | fi; \ | |
54 | rm -f version.i.tmp; \ | |
55 | true | |
56 | ||
57 | ## | |
58 | ## version.i is defined as a .PHONY target even if it's a real file, | |
59 | ## we want the target to be re-run on every make. | |
60 | ## | |
61 | .PHONY: version.i | |
62 | ||
63 | CLEANFILES = version.i.tmp | |
64 | ||
65 | ## | |
66 | ## Only clean "version.i" on dist-clean, we need to keep it on regular | |
67 | ## clean when it's part of a dist tarball. | |
68 | ## | |
69 | DISTCLEANFILES = version.i | |
70 | ||
6941b8e8 | 71 | # Core API |
3fadfbc0 MJ |
72 | babeltrace2includedir = "$(includedir)/babeltrace2" |
73 | babeltrace2include_HEADERS = \ | |
74 | babeltrace2/babeltrace.h \ | |
75 | babeltrace2/logging.h \ | |
76 | babeltrace2/property.h \ | |
77 | babeltrace2/types.h \ | |
78 | babeltrace2/util.h \ | |
79 | babeltrace2/value-const.h \ | |
80 | babeltrace2/value.h \ | |
81 | babeltrace2/version.h | |
0ec662bd | 82 | |
6941b8e8 | 83 | # Legacy API (for CTF writer) |
3fadfbc0 MJ |
84 | babeltrace2ctfincludedir = "$(includedir)/babeltrace2/ctf" |
85 | babeltrace2ctfinclude_HEADERS = \ | |
86 | babeltrace2/ctf/events.h | |
273b65be | 87 | |
6941b8e8 | 88 | # CTF writer API |
3fadfbc0 MJ |
89 | babeltrace2ctfwriterincludedir = "$(includedir)/babeltrace2/ctf-writer" |
90 | babeltrace2ctfwriterinclude_HEADERS = \ | |
91 | babeltrace2/ctf-writer/clock-class.h \ | |
92 | babeltrace2/ctf-writer/clock.h \ | |
93 | babeltrace2/ctf-writer/event-fields.h \ | |
94 | babeltrace2/ctf-writer/event-types.h \ | |
95 | babeltrace2/ctf-writer/event.h \ | |
96 | babeltrace2/ctf-writer/field-types.h \ | |
97 | babeltrace2/ctf-writer/fields.h \ | |
98 | babeltrace2/ctf-writer/object.h \ | |
99 | babeltrace2/ctf-writer/stream-class.h \ | |
100 | babeltrace2/ctf-writer/stream.h \ | |
101 | babeltrace2/ctf-writer/trace.h \ | |
102 | babeltrace2/ctf-writer/utils.h \ | |
103 | babeltrace2/ctf-writer/visitor.h \ | |
104 | babeltrace2/ctf-writer/writer.h | |
adc315b8 | 105 | |
56e18c4c | 106 | # Legacy API (for CTF writer) |
3fadfbc0 MJ |
107 | babeltrace2ctfirincludedir = "$(includedir)/babeltrace2/ctf-ir" |
108 | babeltrace2ctfirinclude_HEADERS = \ | |
109 | babeltrace2/ctf-ir/clock.h \ | |
110 | babeltrace2/ctf-ir/event-fields.h \ | |
111 | babeltrace2/ctf-ir/event-types.h \ | |
112 | babeltrace2/ctf-ir/event.h \ | |
113 | babeltrace2/ctf-ir/field-types.h \ | |
114 | babeltrace2/ctf-ir/fields.h \ | |
115 | babeltrace2/ctf-ir/stream-class.h \ | |
116 | babeltrace2/ctf-ir/stream.h \ | |
117 | babeltrace2/ctf-ir/trace.h \ | |
118 | babeltrace2/ctf-ir/utils.h | |
56e18c4c | 119 | |
56e18c4c | 120 | # Trace IR API |
3fadfbc0 MJ |
121 | babeltrace2traceirincludedir = "$(includedir)/babeltrace2/trace-ir" |
122 | babeltrace2traceirinclude_HEADERS = \ | |
123 | babeltrace2/trace-ir/clock-class-const.h \ | |
124 | babeltrace2/trace-ir/clock-class.h \ | |
125 | babeltrace2/trace-ir/clock-snapshot-const.h \ | |
126 | babeltrace2/trace-ir/event-class-const.h \ | |
127 | babeltrace2/trace-ir/event-class.h \ | |
128 | babeltrace2/trace-ir/event-const.h \ | |
129 | babeltrace2/trace-ir/event.h \ | |
130 | babeltrace2/trace-ir/field-class-const.h \ | |
131 | babeltrace2/trace-ir/field-class.h \ | |
132 | babeltrace2/trace-ir/field-path-const.h \ | |
133 | babeltrace2/trace-ir/field-const.h \ | |
134 | babeltrace2/trace-ir/field.h \ | |
135 | babeltrace2/trace-ir/packet-const.h \ | |
136 | babeltrace2/trace-ir/packet-context-field.h \ | |
137 | babeltrace2/trace-ir/packet.h \ | |
138 | babeltrace2/trace-ir/stream-class-const.h \ | |
139 | babeltrace2/trace-ir/stream-class.h \ | |
140 | babeltrace2/trace-ir/stream-const.h \ | |
141 | babeltrace2/trace-ir/stream.h \ | |
142 | babeltrace2/trace-ir/trace-class-const.h \ | |
143 | babeltrace2/trace-ir/trace-class.h \ | |
144 | babeltrace2/trace-ir/trace-const.h \ | |
145 | babeltrace2/trace-ir/trace.h | |
70bd0a12 | 146 | |
6941b8e8 | 147 | # Plugin and plugin development API |
3fadfbc0 MJ |
148 | babeltrace2pluginincludedir = "$(includedir)/babeltrace2/plugin" |
149 | babeltrace2plugininclude_HEADERS = \ | |
150 | babeltrace2/plugin/plugin-dev.h \ | |
151 | babeltrace2/plugin/plugin-const.h \ | |
152 | babeltrace2/plugin/plugin-set-const.h | |
33b34c43 | 153 | |
d6e69534 | 154 | # Graph, component, and message API |
3fadfbc0 MJ |
155 | babeltrace2graphincludedir = "$(includedir)/babeltrace2/graph" |
156 | babeltrace2graphinclude_HEADERS = \ | |
157 | babeltrace2/graph/component-class-const.h \ | |
158 | babeltrace2/graph/component-class-filter-const.h \ | |
159 | babeltrace2/graph/component-class-filter.h \ | |
160 | babeltrace2/graph/component-class-sink-const.h \ | |
161 | babeltrace2/graph/component-class-sink.h \ | |
162 | babeltrace2/graph/component-class-source-const.h \ | |
163 | babeltrace2/graph/component-class-source.h \ | |
164 | babeltrace2/graph/component-class.h \ | |
165 | babeltrace2/graph/component-const.h \ | |
166 | babeltrace2/graph/component-filter-const.h \ | |
167 | babeltrace2/graph/component-sink-const.h \ | |
168 | babeltrace2/graph/component-source-const.h \ | |
169 | babeltrace2/graph/connection-const.h \ | |
170 | babeltrace2/graph/graph-const.h \ | |
171 | babeltrace2/graph/graph.h \ | |
172 | babeltrace2/graph/message-const.h \ | |
173 | babeltrace2/graph/message-discarded-events-const.h \ | |
174 | babeltrace2/graph/message-discarded-events.h \ | |
175 | babeltrace2/graph/message-discarded-packets-const.h \ | |
176 | babeltrace2/graph/message-discarded-packets.h \ | |
177 | babeltrace2/graph/message-event-const.h \ | |
178 | babeltrace2/graph/message-event.h \ | |
179 | babeltrace2/graph/message-message-iterator-inactivity-const.h \ | |
180 | babeltrace2/graph/message-message-iterator-inactivity.h \ | |
181 | babeltrace2/graph/message-iterator-const.h \ | |
182 | babeltrace2/graph/message-packet-beginning-const.h \ | |
183 | babeltrace2/graph/message-packet-beginning.h \ | |
184 | babeltrace2/graph/message-packet-end-const.h \ | |
185 | babeltrace2/graph/message-packet-end.h \ | |
186 | babeltrace2/graph/message-stream-activity-beginning-const.h \ | |
187 | babeltrace2/graph/message-stream-activity-beginning.h \ | |
188 | babeltrace2/graph/message-stream-activity-const.h \ | |
189 | babeltrace2/graph/message-stream-activity-end-const.h \ | |
190 | babeltrace2/graph/message-stream-activity-end.h \ | |
191 | babeltrace2/graph/message-stream-beginning-const.h \ | |
192 | babeltrace2/graph/message-stream-beginning.h \ | |
193 | babeltrace2/graph/message-stream-end-const.h \ | |
194 | babeltrace2/graph/message-stream-end.h \ | |
195 | babeltrace2/graph/port-const.h \ | |
196 | babeltrace2/graph/port-input-const.h \ | |
197 | babeltrace2/graph/port-output-const.h \ | |
198 | babeltrace2/graph/port-output-message-iterator.h \ | |
199 | babeltrace2/graph/query-executor-const.h \ | |
200 | babeltrace2/graph/query-executor.h \ | |
201 | babeltrace2/graph/self-component-class-filter.h \ | |
202 | babeltrace2/graph/self-component-class-sink.h \ | |
203 | babeltrace2/graph/self-component-class-source.h \ | |
204 | babeltrace2/graph/self-component-filter.h \ | |
205 | babeltrace2/graph/self-component-port-input-message-iterator.h \ | |
206 | babeltrace2/graph/self-component-port-input.h \ | |
207 | babeltrace2/graph/self-component-port-output.h \ | |
208 | babeltrace2/graph/self-component-port.h \ | |
209 | babeltrace2/graph/self-component-sink.h \ | |
210 | babeltrace2/graph/self-component-source.h \ | |
211 | babeltrace2/graph/self-component.h \ | |
212 | babeltrace2/graph/self-message-iterator.h | |
6ee873c6 | 213 | |
e92927d1 | 214 | noinst_HEADERS = \ |
3fadfbc0 MJ |
215 | babeltrace2/compat/stdlib-internal.h \ |
216 | babeltrace2/compat/fcntl-internal.h \ | |
217 | babeltrace2/compat/glib-internal.h \ | |
218 | babeltrace2/compat/uuid-internal.h \ | |
219 | babeltrace2/compat/unistd-internal.h \ | |
220 | babeltrace2/compat/stdio-internal.h \ | |
221 | babeltrace2/compat/time-internal.h \ | |
222 | babeltrace2/compat/utc-internal.h \ | |
223 | babeltrace2/compat/memstream-internal.h \ | |
224 | babeltrace2/compat/string-internal.h \ | |
225 | babeltrace2/compat/limits-internal.h \ | |
226 | babeltrace2/compat/mman-internal.h \ | |
227 | babeltrace2/compat/socket-internal.h \ | |
228 | babeltrace2/common-internal.h \ | |
229 | babeltrace2/ctfser-internal.h \ | |
230 | babeltrace2/bitfield-internal.h \ | |
231 | babeltrace2/object-internal.h \ | |
232 | babeltrace2/object-pool-internal.h \ | |
233 | babeltrace2/plugin/plugin-internal.h \ | |
234 | babeltrace2/plugin/plugin-so-internal.h \ | |
235 | babeltrace2/plugin/python-plugin-provider-internal.h \ | |
236 | babeltrace2/assert-internal.h \ | |
237 | babeltrace2/value-internal.h \ | |
238 | babeltrace2/ctf-writer/attributes-internal.h \ | |
239 | babeltrace2/ctf-writer/clock-class-internal.h \ | |
240 | babeltrace2/ctf-writer/clock-internal.h \ | |
241 | babeltrace2/ctf-writer/event-class-internal.h \ | |
242 | babeltrace2/ctf-writer/event-internal.h \ | |
243 | babeltrace2/ctf-writer/field-path-internal.h \ | |
244 | babeltrace2/ctf-writer/fields-internal.h \ | |
245 | babeltrace2/ctf-writer/field-types-internal.h \ | |
246 | babeltrace2/ctf-writer/field-wrapper-internal.h \ | |
247 | babeltrace2/ctf-writer/functor-internal.h \ | |
248 | babeltrace2/ctf-writer/object-internal.h \ | |
249 | babeltrace2/ctf-writer/object-pool-internal.h \ | |
250 | babeltrace2/ctf-writer/resolve-internal.h \ | |
251 | babeltrace2/ctf-writer/stream-class-internal.h \ | |
252 | babeltrace2/ctf-writer/stream-internal.h \ | |
253 | babeltrace2/ctf-writer/trace-internal.h \ | |
254 | babeltrace2/ctf-writer/utils-internal.h \ | |
255 | babeltrace2/ctf-writer/validation-internal.h \ | |
256 | babeltrace2/ctf-writer/values-internal.h \ | |
257 | babeltrace2/ctf-writer/visitor-internal.h \ | |
258 | babeltrace2/ctf-writer/writer-internal.h \ | |
259 | babeltrace2/mmap-align-internal.h \ | |
260 | babeltrace2/align-internal.h \ | |
261 | babeltrace2/logging-internal.h \ | |
262 | babeltrace2/endian-internal.h \ | |
263 | babeltrace2/trace-ir/attributes-internal.h \ | |
264 | babeltrace2/trace-ir/clock-class-internal.h \ | |
265 | babeltrace2/trace-ir/clock-snapshot-internal.h \ | |
266 | babeltrace2/trace-ir/clock-snapshot-set-internal.h \ | |
267 | babeltrace2/trace-ir/event-class-internal.h \ | |
268 | babeltrace2/trace-ir/event-internal.h \ | |
269 | babeltrace2/trace-ir/field-class-internal.h \ | |
270 | babeltrace2/trace-ir/field-path-internal.h \ | |
271 | babeltrace2/trace-ir/field-internal.h \ | |
272 | babeltrace2/trace-ir/field-wrapper-internal.h \ | |
273 | babeltrace2/trace-ir/packet-internal.h \ | |
274 | babeltrace2/trace-ir/resolve-field-path-internal.h \ | |
275 | babeltrace2/trace-ir/stream-class-internal.h \ | |
276 | babeltrace2/trace-ir/stream-internal.h \ | |
277 | babeltrace2/trace-ir/trace-class-internal.h \ | |
278 | babeltrace2/trace-ir/trace-internal.h \ | |
279 | babeltrace2/trace-ir/utils-internal.h \ | |
280 | babeltrace2/prio-heap-internal.h \ | |
281 | babeltrace2/lib-logging-internal.h \ | |
282 | babeltrace2/compiler-internal.h \ | |
283 | babeltrace2/babeltrace-internal.h \ | |
284 | babeltrace2/assert-pre-internal.h \ | |
285 | babeltrace2/graph/component-class-internal.h \ | |
286 | babeltrace2/graph/component-class-sink-colander-internal.h \ | |
287 | babeltrace2/graph/component-filter-internal.h \ | |
288 | babeltrace2/graph/component-internal.h \ | |
289 | babeltrace2/graph/component-sink-internal.h \ | |
290 | babeltrace2/graph/component-source-internal.h \ | |
291 | babeltrace2/graph/connection-internal.h \ | |
292 | babeltrace2/graph/graph-internal.h \ | |
293 | babeltrace2/graph/message-discarded-items-internal.h \ | |
294 | babeltrace2/graph/message-event-internal.h \ | |
295 | babeltrace2/graph/message-message-iterator-inactivity-internal.h \ | |
296 | babeltrace2/graph/message-internal.h \ | |
297 | babeltrace2/graph/message-iterator-internal.h \ | |
298 | babeltrace2/graph/message-packet-internal.h \ | |
299 | babeltrace2/graph/message-stream-activity-internal.h \ | |
300 | babeltrace2/graph/message-stream-internal.h \ | |
301 | babeltrace2/graph/port-internal.h \ | |
302 | babeltrace2/graph/query-executor-internal.h \ | |
303 | babeltrace2/list-internal.h \ | |
304 | babeltrace2/fd-cache-internal.h \ | |
305 | babeltrace2/property-internal.h \ | |
7845e95f MJ |
306 | version.h \ |
307 | version.i |