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 |
9ffc0257 | 72 | babeltraceincludedir = "$(includedir)/babeltrace" |
0ec662bd JD |
73 | babeltraceinclude_HEADERS = \ |
74 | babeltrace/babeltrace.h \ | |
7a6224c4 | 75 | babeltrace/logging.h \ |
65300d60 | 76 | babeltrace/object.h \ |
d94d92ac PP |
77 | babeltrace/property.h \ |
78 | babeltrace/types.h \ | |
05e21286 | 79 | babeltrace/values-const.h \ |
c057dea0 PP |
80 | babeltrace/values.h \ |
81 | babeltrace/version.h | |
0ec662bd | 82 | |
6941b8e8 | 83 | # Legacy API (for CTF writer) |
9ffc0257 | 84 | babeltracectfincludedir = "$(includedir)/babeltrace/ctf" |
64a35d1b | 85 | babeltracectfinclude_HEADERS = \ |
dc3fffef | 86 | babeltrace/ctf/events.h |
273b65be | 87 | |
6941b8e8 | 88 | # CTF writer API |
9ffc0257 | 89 | babeltracectfwriterincludedir = "$(includedir)/babeltrace/ctf-writer" |
273b65be | 90 | babeltracectfwriterinclude_HEADERS = \ |
46bd0f2b | 91 | babeltrace/ctf-writer/clock.h \ |
46bd0f2b | 92 | babeltrace/ctf-writer/event-fields.h \ |
46bd0f2b | 93 | babeltrace/ctf-writer/event.h \ |
3dca2276 PP |
94 | babeltrace/ctf-writer/event-types.h \ |
95 | babeltrace/ctf-writer/fields.h \ | |
96 | babeltrace/ctf-writer/field-types.h \ | |
c057dea0 | 97 | babeltrace/ctf-writer/stream-class.h \ |
adc315b8 | 98 | babeltrace/ctf-writer/stream.h \ |
3dca2276 | 99 | babeltrace/ctf-writer/trace.h \ |
16ca5ff0 PP |
100 | babeltrace/ctf-writer/utils.h \ |
101 | babeltrace/ctf-writer/visitor.h \ | |
c057dea0 | 102 | babeltrace/ctf-writer/writer.h |
adc315b8 | 103 | |
56e18c4c | 104 | # Legacy API (for CTF writer) |
9ffc0257 | 105 | babeltracectfirincludedir = "$(includedir)/babeltrace/ctf-ir" |
adc315b8 | 106 | babeltracectfirinclude_HEADERS = \ |
1ddd69e6 | 107 | babeltrace/ctf-ir/clock.h \ |
56e18c4c PP |
108 | babeltrace/ctf-ir/event-fields.h \ |
109 | babeltrace/ctf-ir/event-types.h \ | |
c057dea0 | 110 | babeltrace/ctf-ir/event.h \ |
c057dea0 PP |
111 | babeltrace/ctf-ir/field-types.h \ |
112 | babeltrace/ctf-ir/fields.h \ | |
bc37ae52 | 113 | babeltrace/ctf-ir/stream-class.h \ |
c057dea0 | 114 | babeltrace/ctf-ir/stream.h \ |
56e18c4c PP |
115 | babeltrace/ctf-ir/trace.h \ |
116 | babeltrace/ctf-ir/utils.h | |
117 | ||
56e18c4c PP |
118 | # Trace IR API |
119 | babeltracetraceirincludedir = "$(includedir)/babeltrace/trace-ir" | |
120 | babeltracetraceirinclude_HEADERS = \ | |
121 | babeltrace/trace-ir/clock-class.h \ | |
122 | babeltrace/trace-ir/clock-value.h \ | |
123 | babeltrace/trace-ir/event-class.h \ | |
124 | babeltrace/trace-ir/event.h \ | |
5cd6d0e5 | 125 | babeltrace/trace-ir/field-classes.h \ |
e5be10ef | 126 | babeltrace/trace-ir/field-path.h \ |
56e18c4c PP |
127 | babeltrace/trace-ir/fields.h \ |
128 | babeltrace/trace-ir/packet.h \ | |
e5be10ef PP |
129 | babeltrace/trace-ir/private-clock-class.h \ |
130 | babeltrace/trace-ir/private-event-class.h \ | |
e5be10ef | 131 | babeltrace/trace-ir/private-event.h \ |
d94d92ac | 132 | babeltrace/trace-ir/private-event-header-field.h \ |
e5be10ef PP |
133 | babeltrace/trace-ir/private-field-classes.h \ |
134 | babeltrace/trace-ir/private-fields.h \ | |
135 | babeltrace/trace-ir/private-packet-context-field.h \ | |
e5be10ef | 136 | babeltrace/trace-ir/private-packet.h \ |
d94d92ac | 137 | babeltrace/trace-ir/private-packet-header-field.h \ |
e5be10ef PP |
138 | babeltrace/trace-ir/private-stream-class.h \ |
139 | babeltrace/trace-ir/private-stream.h \ | |
140 | babeltrace/trace-ir/private-trace.h \ | |
56e18c4c PP |
141 | babeltrace/trace-ir/stream-class.h \ |
142 | babeltrace/trace-ir/stream.h \ | |
143 | babeltrace/trace-ir/trace.h | |
70bd0a12 | 144 | |
6941b8e8 | 145 | # Plugin and plugin development API |
9ffc0257 | 146 | babeltracepluginincludedir = "$(includedir)/babeltrace/plugin" |
6ee873c6 | 147 | babeltraceplugininclude_HEADERS = \ |
c057dea0 | 148 | babeltrace/plugin/plugin-dev.h \ |
50d2011c PP |
149 | babeltrace/plugin/plugin.h \ |
150 | babeltrace/plugin/plugin-set.h | |
33b34c43 | 151 | |
6941b8e8 | 152 | # Graph, component, and notification API |
9ffc0257 | 153 | babeltracegraphincludedir = "$(includedir)/babeltrace/graph" |
b2e0c907 PP |
154 | babeltracegraphinclude_HEADERS = \ |
155 | babeltrace/graph/component-class-filter.h \ | |
d94d92ac | 156 | babeltrace/graph/component-class.h \ |
b2e0c907 PP |
157 | babeltrace/graph/component-class-sink.h \ |
158 | babeltrace/graph/component-class-source.h \ | |
b2e0c907 | 159 | babeltrace/graph/component-filter.h \ |
d94d92ac | 160 | babeltrace/graph/component.h \ |
b2e0c907 PP |
161 | babeltrace/graph/component-sink.h \ |
162 | babeltrace/graph/component-source.h \ | |
b2e0c907 PP |
163 | babeltrace/graph/connection.h \ |
164 | babeltrace/graph/graph.h \ | |
b2e0c907 | 165 | babeltrace/graph/notification-event.h \ |
ece3fb0f | 166 | babeltrace/graph/notification-inactivity.h \ |
b2e0c907 | 167 | babeltrace/graph/notification-iterator.h \ |
b2e0c907 | 168 | babeltrace/graph/notification-packet.h \ |
b2e0c907 | 169 | babeltrace/graph/notification-stream.h \ |
c057dea0 | 170 | babeltrace/graph/notification.h \ |
d94d92ac PP |
171 | babeltrace/graph/port-input.h \ |
172 | babeltrace/graph/port-output-notification-iterator.h \ | |
173 | babeltrace/graph/port-output.h \ | |
b2e0c907 | 174 | babeltrace/graph/port.h \ |
d94d92ac PP |
175 | babeltrace/graph/private-component-class-filter.h \ |
176 | babeltrace/graph/private-component-class-sink.h \ | |
177 | babeltrace/graph/private-component-class-source.h \ | |
178 | babeltrace/graph/private-component-class.h \ | |
a2d06fd5 | 179 | babeltrace/graph/private-graph.h \ |
e5be10ef PP |
180 | babeltrace/graph/private-notification-event.h \ |
181 | babeltrace/graph/private-notification-inactivity.h \ | |
182 | babeltrace/graph/private-notification-packet.h \ | |
183 | babeltrace/graph/private-notification-stream.h \ | |
184 | babeltrace/graph/private-notification.h \ | |
d94d92ac PP |
185 | babeltrace/graph/private-query-executor.h \ |
186 | babeltrace/graph/query-executor.h \ | |
187 | babeltrace/graph/self-component-class-filter.h \ | |
188 | babeltrace/graph/self-component-class-sink.h \ | |
189 | babeltrace/graph/self-component-class-source.h \ | |
190 | babeltrace/graph/self-component-filter.h \ | |
191 | babeltrace/graph/self-component-port-input-notification-iterator.h \ | |
192 | babeltrace/graph/self-component-port-input.h \ | |
193 | babeltrace/graph/self-component-port-output.h \ | |
194 | babeltrace/graph/self-component-port.h \ | |
195 | babeltrace/graph/self-component-sink.h \ | |
196 | babeltrace/graph/self-component-source.h \ | |
197 | babeltrace/graph/self-component.h \ | |
198 | babeltrace/graph/self-notification-iterator.h | |
6ee873c6 | 199 | |
e92927d1 | 200 | noinst_HEADERS = \ |
3dca2276 | 201 | babeltrace/compat/stdlib-internal.h \ |
beb0fb75 PP |
202 | babeltrace/compat/fcntl-internal.h \ |
203 | babeltrace/compat/glib-internal.h \ | |
3dca2276 PP |
204 | babeltrace/compat/uuid-internal.h \ |
205 | babeltrace/compat/unistd-internal.h \ | |
beb0fb75 | 206 | babeltrace/compat/stdio-internal.h \ |
58a2480d | 207 | babeltrace/compat/time-internal.h \ |
beb0fb75 | 208 | babeltrace/compat/utc-internal.h \ |
3dca2276 PP |
209 | babeltrace/compat/memstream-internal.h \ |
210 | babeltrace/compat/string-internal.h \ | |
211 | babeltrace/compat/limits-internal.h \ | |
212 | babeltrace/compat/mman-internal.h \ | |
213 | babeltrace/compat/socket-internal.h \ | |
214 | babeltrace/common-internal.h \ | |
215 | babeltrace/bitfield-internal.h \ | |
216 | babeltrace/object-internal.h \ | |
312c056a | 217 | babeltrace/object-pool-internal.h \ |
3dca2276 PP |
218 | babeltrace/plugin/plugin-internal.h \ |
219 | babeltrace/plugin/plugin-so-internal.h \ | |
220 | babeltrace/plugin/python-plugin-provider-internal.h \ | |
221 | babeltrace/assert-internal.h \ | |
222 | babeltrace/values-internal.h \ | |
16ca5ff0 PP |
223 | babeltrace/ctf-writer/attributes-internal.h \ |
224 | babeltrace/ctf-writer/clock-class-internal.h \ | |
225 | babeltrace/ctf-writer/clock-internal.h \ | |
226 | babeltrace/ctf-writer/event-class-internal.h \ | |
3dca2276 | 227 | babeltrace/ctf-writer/event-internal.h \ |
16ca5ff0 PP |
228 | babeltrace/ctf-writer/field-path-internal.h \ |
229 | babeltrace/ctf-writer/fields-internal.h \ | |
3dca2276 | 230 | babeltrace/ctf-writer/field-types-internal.h \ |
16ca5ff0 PP |
231 | babeltrace/ctf-writer/field-wrapper-internal.h \ |
232 | babeltrace/ctf-writer/functor-internal.h \ | |
233 | babeltrace/ctf-writer/resolve-internal.h \ | |
3dca2276 | 234 | babeltrace/ctf-writer/serialize-internal.h \ |
16ca5ff0 | 235 | babeltrace/ctf-writer/stream-class-internal.h \ |
3dca2276 | 236 | babeltrace/ctf-writer/stream-internal.h \ |
16ca5ff0 PP |
237 | babeltrace/ctf-writer/trace-internal.h \ |
238 | babeltrace/ctf-writer/utils-internal.h \ | |
239 | babeltrace/ctf-writer/validation-internal.h \ | |
240 | babeltrace/ctf-writer/visitor-internal.h \ | |
241 | babeltrace/ctf-writer/writer-internal.h \ | |
3dca2276 PP |
242 | babeltrace/mmap-align-internal.h \ |
243 | babeltrace/align-internal.h \ | |
244 | babeltrace/logging-internal.h \ | |
245 | babeltrace/endian-internal.h \ | |
d94d92ac PP |
246 | babeltrace/trace-ir/attributes-internal.h \ |
247 | babeltrace/trace-ir/clock-class-internal.h \ | |
248 | babeltrace/trace-ir/clock-value-internal.h \ | |
249 | babeltrace/trace-ir/clock-value-set-internal.h \ | |
56e18c4c | 250 | babeltrace/trace-ir/event-class-internal.h \ |
56e18c4c | 251 | babeltrace/trace-ir/event-internal.h \ |
d94d92ac | 252 | babeltrace/trace-ir/field-classes-internal.h \ |
56e18c4c | 253 | babeltrace/trace-ir/field-path-internal.h \ |
d94d92ac | 254 | babeltrace/trace-ir/fields-internal.h \ |
56e18c4c | 255 | babeltrace/trace-ir/field-wrapper-internal.h \ |
d94d92ac | 256 | babeltrace/trace-ir/packet-internal.h \ |
56e18c4c | 257 | babeltrace/trace-ir/resolve-field-path-internal.h \ |
d94d92ac PP |
258 | babeltrace/trace-ir/stream-class-internal.h \ |
259 | babeltrace/trace-ir/stream-internal.h \ | |
260 | babeltrace/trace-ir/trace-internal.h \ | |
261 | babeltrace/trace-ir/utils-internal.h \ | |
3dca2276 PP |
262 | babeltrace/prio-heap-internal.h \ |
263 | babeltrace/lib-logging-internal.h \ | |
264 | babeltrace/compiler-internal.h \ | |
265 | babeltrace/babeltrace-internal.h \ | |
266 | babeltrace/assert-pre-internal.h \ | |
d94d92ac PP |
267 | babeltrace/graph/component-class-internal.h \ |
268 | babeltrace/graph/component-class-sink-colander-internal.h \ | |
269 | babeltrace/graph/component-filter-internal.h \ | |
beb0fb75 | 270 | babeltrace/graph/component-internal.h \ |
d94d92ac PP |
271 | babeltrace/graph/component-sink-internal.h \ |
272 | babeltrace/graph/component-source-internal.h \ | |
beb0fb75 | 273 | babeltrace/graph/connection-internal.h \ |
3dca2276 | 274 | babeltrace/graph/graph-internal.h \ |
d94d92ac | 275 | babeltrace/graph/notification-event-internal.h \ |
ece3fb0f | 276 | babeltrace/graph/notification-inactivity-internal.h \ |
3dca2276 | 277 | babeltrace/graph/notification-internal.h \ |
d94d92ac PP |
278 | babeltrace/graph/notification-iterator-internal.h \ |
279 | babeltrace/graph/notification-packet-internal.h \ | |
280 | babeltrace/graph/notification-stream-internal.h \ | |
beb0fb75 | 281 | babeltrace/graph/port-internal.h \ |
d94d92ac | 282 | babeltrace/graph/query-executor-internal.h \ |
45ff8fe4 | 283 | babeltrace/list-internal.h \ |
7845e95f MJ |
284 | version.h \ |
285 | version.i |