Commit | Line | Data |
---|---|---|
b6a0d2d9 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 |
de8bce8a | 72 | babeltraceincludedir = "$(includedir)/babeltrace" |
0ec662bd JD |
73 | babeltraceinclude_HEADERS = \ |
74 | babeltrace/babeltrace.h \ | |
7a6224c4 | 75 | babeltrace/logging.h \ |
834e9996 PP |
76 | babeltrace/property.h \ |
77 | babeltrace/types.h \ | |
35fa110e | 78 | babeltrace/util.h \ |
0f15f666 PP |
79 | babeltrace/value-const.h \ |
80 | babeltrace/value.h \ | |
a62f9ba0 | 81 | babeltrace/version.h |
0ec662bd | 82 | |
6941b8e8 | 83 | # Legacy API (for CTF writer) |
de8bce8a | 84 | babeltracectfincludedir = "$(includedir)/babeltrace/ctf" |
64a35d1b | 85 | babeltracectfinclude_HEADERS = \ |
dc3fffef | 86 | babeltrace/ctf/events.h |
273b65be | 87 | |
6941b8e8 | 88 | # CTF writer API |
de8bce8a | 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 \ |
8deee039 PP |
94 | babeltrace/ctf-writer/event-types.h \ |
95 | babeltrace/ctf-writer/fields.h \ | |
96 | babeltrace/ctf-writer/field-types.h \ | |
a62f9ba0 | 97 | babeltrace/ctf-writer/stream-class.h \ |
adc315b8 | 98 | babeltrace/ctf-writer/stream.h \ |
8deee039 | 99 | babeltrace/ctf-writer/trace.h \ |
086dc475 PP |
100 | babeltrace/ctf-writer/utils.h \ |
101 | babeltrace/ctf-writer/visitor.h \ | |
a62f9ba0 | 102 | babeltrace/ctf-writer/writer.h |
adc315b8 | 103 | |
108b91d0 | 104 | # Legacy API (for CTF writer) |
de8bce8a | 105 | babeltracectfirincludedir = "$(includedir)/babeltrace/ctf-ir" |
adc315b8 | 106 | babeltracectfirinclude_HEADERS = \ |
a17857eb | 107 | babeltrace/ctf-ir/clock.h \ |
108b91d0 PP |
108 | babeltrace/ctf-ir/event-fields.h \ |
109 | babeltrace/ctf-ir/event-types.h \ | |
a62f9ba0 | 110 | babeltrace/ctf-ir/event.h \ |
a62f9ba0 PP |
111 | babeltrace/ctf-ir/field-types.h \ |
112 | babeltrace/ctf-ir/fields.h \ | |
bc37ae52 | 113 | babeltrace/ctf-ir/stream-class.h \ |
a62f9ba0 | 114 | babeltrace/ctf-ir/stream.h \ |
108b91d0 PP |
115 | babeltrace/ctf-ir/trace.h \ |
116 | babeltrace/ctf-ir/utils.h | |
117 | ||
108b91d0 PP |
118 | # Trace IR API |
119 | babeltracetraceirincludedir = "$(includedir)/babeltrace/trace-ir" | |
120 | babeltracetraceirinclude_HEADERS = \ | |
78cf9df6 | 121 | babeltrace/trace-ir/clock-class-const.h \ |
108b91d0 | 122 | babeltrace/trace-ir/clock-class.h \ |
ecbb78c0 | 123 | babeltrace/trace-ir/clock-snapshot-const.h \ |
78cf9df6 | 124 | babeltrace/trace-ir/event-class-const.h \ |
108b91d0 | 125 | babeltrace/trace-ir/event-class.h \ |
78cf9df6 | 126 | babeltrace/trace-ir/event-const.h \ |
108b91d0 | 127 | babeltrace/trace-ir/event.h \ |
0f15f666 PP |
128 | babeltrace/trace-ir/field-class-const.h \ |
129 | babeltrace/trace-ir/field-class.h \ | |
78cf9df6 | 130 | babeltrace/trace-ir/field-path-const.h \ |
0f15f666 PP |
131 | babeltrace/trace-ir/field-const.h \ |
132 | babeltrace/trace-ir/field.h \ | |
78cf9df6 PP |
133 | babeltrace/trace-ir/packet-const.h \ |
134 | babeltrace/trace-ir/packet-context-field.h \ | |
108b91d0 | 135 | babeltrace/trace-ir/packet.h \ |
78cf9df6 | 136 | babeltrace/trace-ir/stream-class-const.h \ |
108b91d0 | 137 | babeltrace/trace-ir/stream-class.h \ |
78cf9df6 | 138 | babeltrace/trace-ir/stream-const.h \ |
108b91d0 | 139 | babeltrace/trace-ir/stream.h \ |
10b7a2e4 PP |
140 | babeltrace/trace-ir/trace-class-const.h \ |
141 | babeltrace/trace-ir/trace-class.h \ | |
78cf9df6 | 142 | babeltrace/trace-ir/trace-const.h \ |
108b91d0 | 143 | babeltrace/trace-ir/trace.h |
70bd0a12 | 144 | |
6941b8e8 | 145 | # Plugin and plugin development API |
de8bce8a | 146 | babeltracepluginincludedir = "$(includedir)/babeltrace/plugin" |
6ee873c6 | 147 | babeltraceplugininclude_HEADERS = \ |
a62f9ba0 | 148 | babeltrace/plugin/plugin-dev.h \ |
3a2cb327 PP |
149 | babeltrace/plugin/plugin-const.h \ |
150 | babeltrace/plugin/plugin-set-const.h | |
33b34c43 | 151 | |
b09a5592 | 152 | # Graph, component, and message API |
de8bce8a | 153 | babeltracegraphincludedir = "$(includedir)/babeltrace/graph" |
b2e0c907 | 154 | babeltracegraphinclude_HEADERS = \ |
7b53201c PP |
155 | babeltrace/graph/component-class-const.h \ |
156 | babeltrace/graph/component-class-filter-const.h \ | |
b2e0c907 | 157 | babeltrace/graph/component-class-filter.h \ |
7b53201c | 158 | babeltrace/graph/component-class-sink-const.h \ |
b2e0c907 | 159 | babeltrace/graph/component-class-sink.h \ |
7b53201c | 160 | babeltrace/graph/component-class-source-const.h \ |
b2e0c907 | 161 | babeltrace/graph/component-class-source.h \ |
7b53201c PP |
162 | babeltrace/graph/component-class.h \ |
163 | babeltrace/graph/component-const.h \ | |
164 | babeltrace/graph/component-filter-const.h \ | |
165 | babeltrace/graph/component-sink-const.h \ | |
166 | babeltrace/graph/component-source-const.h \ | |
167 | babeltrace/graph/connection-const.h \ | |
168 | babeltrace/graph/graph-const.h \ | |
b2e0c907 | 169 | babeltrace/graph/graph.h \ |
b09a5592 | 170 | babeltrace/graph/message-const.h \ |
8f1a1bbb PP |
171 | babeltrace/graph/message-discarded-events-const.h \ |
172 | babeltrace/graph/message-discarded-events.h \ | |
2df5d26f PP |
173 | babeltrace/graph/message-discarded-packets-const.h \ |
174 | babeltrace/graph/message-discarded-packets.h \ | |
b09a5592 PP |
175 | babeltrace/graph/message-event-const.h \ |
176 | babeltrace/graph/message-event.h \ | |
40bf6fd0 FD |
177 | babeltrace/graph/message-message-iterator-inactivity-const.h \ |
178 | babeltrace/graph/message-message-iterator-inactivity.h \ | |
15a52f66 | 179 | babeltrace/graph/message-iterator-const.h \ |
a1f053a9 PP |
180 | babeltrace/graph/message-packet-beginning-const.h \ |
181 | babeltrace/graph/message-packet-beginning.h \ | |
182 | babeltrace/graph/message-packet-end-const.h \ | |
183 | babeltrace/graph/message-packet-end.h \ | |
5fc74d18 | 184 | babeltrace/graph/message-stream-activity-beginning-const.h \ |
a1f053a9 PP |
185 | babeltrace/graph/message-stream-activity-beginning.h \ |
186 | babeltrace/graph/message-stream-activity-const.h \ | |
5fc74d18 | 187 | babeltrace/graph/message-stream-activity-end-const.h \ |
a1f053a9 PP |
188 | babeltrace/graph/message-stream-activity-end.h \ |
189 | babeltrace/graph/message-stream-beginning-const.h \ | |
190 | babeltrace/graph/message-stream-beginning.h \ | |
191 | babeltrace/graph/message-stream-end-const.h \ | |
192 | babeltrace/graph/message-stream-end.h \ | |
7b53201c PP |
193 | babeltrace/graph/port-const.h \ |
194 | babeltrace/graph/port-input-const.h \ | |
195 | babeltrace/graph/port-output-const.h \ | |
b09a5592 | 196 | babeltrace/graph/port-output-message-iterator.h \ |
7b53201c | 197 | babeltrace/graph/query-executor-const.h \ |
834e9996 PP |
198 | babeltrace/graph/query-executor.h \ |
199 | babeltrace/graph/self-component-class-filter.h \ | |
200 | babeltrace/graph/self-component-class-sink.h \ | |
201 | babeltrace/graph/self-component-class-source.h \ | |
202 | babeltrace/graph/self-component-filter.h \ | |
b09a5592 | 203 | babeltrace/graph/self-component-port-input-message-iterator.h \ |
834e9996 PP |
204 | babeltrace/graph/self-component-port-input.h \ |
205 | babeltrace/graph/self-component-port-output.h \ | |
206 | babeltrace/graph/self-component-port.h \ | |
207 | babeltrace/graph/self-component-sink.h \ | |
208 | babeltrace/graph/self-component-source.h \ | |
209 | babeltrace/graph/self-component.h \ | |
b09a5592 | 210 | babeltrace/graph/self-message-iterator.h |
6ee873c6 | 211 | |
e92927d1 | 212 | noinst_HEADERS = \ |
8deee039 | 213 | babeltrace/compat/stdlib-internal.h \ |
beb0fb75 PP |
214 | babeltrace/compat/fcntl-internal.h \ |
215 | babeltrace/compat/glib-internal.h \ | |
8deee039 PP |
216 | babeltrace/compat/uuid-internal.h \ |
217 | babeltrace/compat/unistd-internal.h \ | |
beb0fb75 | 218 | babeltrace/compat/stdio-internal.h \ |
58a2480d | 219 | babeltrace/compat/time-internal.h \ |
beb0fb75 | 220 | babeltrace/compat/utc-internal.h \ |
8deee039 PP |
221 | babeltrace/compat/memstream-internal.h \ |
222 | babeltrace/compat/string-internal.h \ | |
223 | babeltrace/compat/limits-internal.h \ | |
224 | babeltrace/compat/mman-internal.h \ | |
225 | babeltrace/compat/socket-internal.h \ | |
226 | babeltrace/common-internal.h \ | |
6f4eefbe | 227 | babeltrace/ctfser-internal.h \ |
8deee039 PP |
228 | babeltrace/bitfield-internal.h \ |
229 | babeltrace/object-internal.h \ | |
a6918753 | 230 | babeltrace/object-pool-internal.h \ |
8deee039 PP |
231 | babeltrace/plugin/plugin-internal.h \ |
232 | babeltrace/plugin/plugin-so-internal.h \ | |
233 | babeltrace/plugin/python-plugin-provider-internal.h \ | |
234 | babeltrace/assert-internal.h \ | |
0f15f666 | 235 | babeltrace/value-internal.h \ |
086dc475 PP |
236 | babeltrace/ctf-writer/attributes-internal.h \ |
237 | babeltrace/ctf-writer/clock-class-internal.h \ | |
238 | babeltrace/ctf-writer/clock-internal.h \ | |
239 | babeltrace/ctf-writer/event-class-internal.h \ | |
8deee039 | 240 | babeltrace/ctf-writer/event-internal.h \ |
086dc475 PP |
241 | babeltrace/ctf-writer/field-path-internal.h \ |
242 | babeltrace/ctf-writer/fields-internal.h \ | |
8deee039 | 243 | babeltrace/ctf-writer/field-types-internal.h \ |
086dc475 PP |
244 | babeltrace/ctf-writer/field-wrapper-internal.h \ |
245 | babeltrace/ctf-writer/functor-internal.h \ | |
246 | babeltrace/ctf-writer/resolve-internal.h \ | |
086dc475 | 247 | babeltrace/ctf-writer/stream-class-internal.h \ |
8deee039 | 248 | babeltrace/ctf-writer/stream-internal.h \ |
086dc475 PP |
249 | babeltrace/ctf-writer/trace-internal.h \ |
250 | babeltrace/ctf-writer/utils-internal.h \ | |
251 | babeltrace/ctf-writer/validation-internal.h \ | |
252 | babeltrace/ctf-writer/visitor-internal.h \ | |
253 | babeltrace/ctf-writer/writer-internal.h \ | |
8deee039 PP |
254 | babeltrace/mmap-align-internal.h \ |
255 | babeltrace/align-internal.h \ | |
256 | babeltrace/logging-internal.h \ | |
257 | babeltrace/endian-internal.h \ | |
834e9996 PP |
258 | babeltrace/trace-ir/attributes-internal.h \ |
259 | babeltrace/trace-ir/clock-class-internal.h \ | |
ecbb78c0 PP |
260 | babeltrace/trace-ir/clock-snapshot-internal.h \ |
261 | babeltrace/trace-ir/clock-snapshot-set-internal.h \ | |
108b91d0 | 262 | babeltrace/trace-ir/event-class-internal.h \ |
108b91d0 | 263 | babeltrace/trace-ir/event-internal.h \ |
0f15f666 | 264 | babeltrace/trace-ir/field-class-internal.h \ |
108b91d0 | 265 | babeltrace/trace-ir/field-path-internal.h \ |
0f15f666 | 266 | babeltrace/trace-ir/field-internal.h \ |
108b91d0 | 267 | babeltrace/trace-ir/field-wrapper-internal.h \ |
834e9996 | 268 | babeltrace/trace-ir/packet-internal.h \ |
108b91d0 | 269 | babeltrace/trace-ir/resolve-field-path-internal.h \ |
834e9996 PP |
270 | babeltrace/trace-ir/stream-class-internal.h \ |
271 | babeltrace/trace-ir/stream-internal.h \ | |
272 | babeltrace/trace-ir/trace-internal.h \ | |
273 | babeltrace/trace-ir/utils-internal.h \ | |
8deee039 PP |
274 | babeltrace/prio-heap-internal.h \ |
275 | babeltrace/lib-logging-internal.h \ | |
276 | babeltrace/compiler-internal.h \ | |
277 | babeltrace/babeltrace-internal.h \ | |
278 | babeltrace/assert-pre-internal.h \ | |
834e9996 PP |
279 | babeltrace/graph/component-class-internal.h \ |
280 | babeltrace/graph/component-class-sink-colander-internal.h \ | |
281 | babeltrace/graph/component-filter-internal.h \ | |
beb0fb75 | 282 | babeltrace/graph/component-internal.h \ |
834e9996 PP |
283 | babeltrace/graph/component-sink-internal.h \ |
284 | babeltrace/graph/component-source-internal.h \ | |
beb0fb75 | 285 | babeltrace/graph/connection-internal.h \ |
8deee039 | 286 | babeltrace/graph/graph-internal.h \ |
8f1a1bbb | 287 | babeltrace/graph/message-discarded-items-internal.h \ |
b09a5592 | 288 | babeltrace/graph/message-event-internal.h \ |
40bf6fd0 | 289 | babeltrace/graph/message-message-iterator-inactivity-internal.h \ |
b09a5592 PP |
290 | babeltrace/graph/message-internal.h \ |
291 | babeltrace/graph/message-iterator-internal.h \ | |
292 | babeltrace/graph/message-packet-internal.h \ | |
293 | babeltrace/graph/message-stream-internal.h \ | |
beb0fb75 | 294 | babeltrace/graph/port-internal.h \ |
834e9996 | 295 | babeltrace/graph/query-executor-internal.h \ |
45ff8fe4 | 296 | babeltrace/list-internal.h \ |
b6a0d2d9 MJ |
297 | version.h \ |
298 | version.i |