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 \ |
c057dea0 PP |
76 | babeltrace/ref.h \ |
77 | babeltrace/types.h \ | |
78 | babeltrace/values.h \ | |
79 | babeltrace/version.h | |
0ec662bd | 80 | |
6941b8e8 | 81 | # Legacy API (for CTF writer) |
9ffc0257 | 82 | babeltracectfincludedir = "$(includedir)/babeltrace/ctf" |
64a35d1b | 83 | babeltracectfinclude_HEADERS = \ |
dc3fffef | 84 | babeltrace/ctf/events.h |
273b65be | 85 | |
6941b8e8 | 86 | # CTF writer API |
9ffc0257 | 87 | babeltracectfwriterincludedir = "$(includedir)/babeltrace/ctf-writer" |
273b65be | 88 | babeltracectfwriterinclude_HEADERS = \ |
46bd0f2b | 89 | babeltrace/ctf-writer/clock.h \ |
46bd0f2b JG |
90 | babeltrace/ctf-writer/event-fields.h \ |
91 | babeltrace/ctf-writer/event-types.h \ | |
92 | babeltrace/ctf-writer/event.h \ | |
c057dea0 | 93 | babeltrace/ctf-writer/stream-class.h \ |
adc315b8 | 94 | babeltrace/ctf-writer/stream.h \ |
c057dea0 | 95 | babeltrace/ctf-writer/writer.h |
adc315b8 | 96 | |
6941b8e8 | 97 | # CTF IR API |
9ffc0257 | 98 | babeltracectfirincludedir = "$(includedir)/babeltrace/ctf-ir" |
adc315b8 | 99 | babeltracectfirinclude_HEADERS = \ |
ac0c6bdd | 100 | babeltrace/ctf-ir/clock-class.h \ |
c057dea0 | 101 | babeltrace/ctf-ir/clock-value.h \ |
1ddd69e6 | 102 | babeltrace/ctf-ir/clock.h \ |
272df73e | 103 | babeltrace/ctf-ir/event-class.h \ |
c057dea0 | 104 | babeltrace/ctf-ir/event.h \ |
b011f6b0 | 105 | babeltrace/ctf-ir/field-path.h \ |
c057dea0 PP |
106 | babeltrace/ctf-ir/field-types.h \ |
107 | babeltrace/ctf-ir/fields.h \ | |
f79cf0f0 | 108 | babeltrace/ctf-ir/packet.h \ |
bc37ae52 | 109 | babeltrace/ctf-ir/stream-class.h \ |
c057dea0 | 110 | babeltrace/ctf-ir/stream.h \ |
654c1444 | 111 | babeltrace/ctf-ir/trace.h \ |
8bf65fbd JG |
112 | babeltrace/ctf-ir/utils.h \ |
113 | babeltrace/ctf-ir/visitor.h | |
70bd0a12 | 114 | |
6941b8e8 | 115 | # Plugin and plugin development API |
9ffc0257 | 116 | babeltracepluginincludedir = "$(includedir)/babeltrace/plugin" |
6ee873c6 | 117 | babeltraceplugininclude_HEADERS = \ |
c057dea0 PP |
118 | babeltrace/plugin/plugin-dev.h \ |
119 | babeltrace/plugin/plugin.h | |
33b34c43 | 120 | |
6941b8e8 | 121 | # Graph, component, and notification API |
9ffc0257 | 122 | babeltracegraphincludedir = "$(includedir)/babeltrace/graph" |
b2e0c907 | 123 | babeltracegraphinclude_HEADERS = \ |
8c0b8894 | 124 | babeltrace/graph/clock-class-priority-map.h \ |
b2e0c907 PP |
125 | babeltrace/graph/component-class-filter.h \ |
126 | babeltrace/graph/component-class-sink.h \ | |
127 | babeltrace/graph/component-class-source.h \ | |
128 | babeltrace/graph/component-class.h \ | |
129 | babeltrace/graph/component-filter.h \ | |
130 | babeltrace/graph/component-sink.h \ | |
131 | babeltrace/graph/component-source.h \ | |
cc469c42 | 132 | babeltrace/graph/component-status.h \ |
b2e0c907 PP |
133 | babeltrace/graph/component.h \ |
134 | babeltrace/graph/connection.h \ | |
135 | babeltrace/graph/graph.h \ | |
2ec84d26 PP |
136 | babeltrace/graph/notification-discarded-events.h \ |
137 | babeltrace/graph/notification-discarded-packets.h \ | |
b2e0c907 PP |
138 | babeltrace/graph/notification-event.h \ |
139 | babeltrace/graph/notification-heap.h \ | |
ece3fb0f | 140 | babeltrace/graph/notification-inactivity.h \ |
b2e0c907 | 141 | babeltrace/graph/notification-iterator.h \ |
b2e0c907 | 142 | babeltrace/graph/notification-packet.h \ |
b2e0c907 | 143 | babeltrace/graph/notification-stream.h \ |
c057dea0 | 144 | babeltrace/graph/notification.h \ |
8ed535b5 | 145 | babeltrace/graph/output-port-notification-iterator.h \ |
b2e0c907 PP |
146 | babeltrace/graph/port.h \ |
147 | babeltrace/graph/private-component-filter.h \ | |
148 | babeltrace/graph/private-component-sink.h \ | |
149 | babeltrace/graph/private-component-source.h \ | |
150 | babeltrace/graph/private-component.h \ | |
90157d89 PP |
151 | babeltrace/graph/private-connection-notification-iterator.h \ |
152 | babeltrace/graph/private-connection-private-notification-iterator.h \ | |
b2e0c907 | 153 | babeltrace/graph/private-connection.h \ |
90157d89 PP |
154 | babeltrace/graph/private-port.h \ |
155 | babeltrace/graph/query-executor.h | |
6ee873c6 | 156 | |
e92927d1 | 157 | noinst_HEADERS = \ |
3d9990ac | 158 | babeltrace/align-internal.h \ |
70bd0a12 | 159 | babeltrace/babeltrace-internal.h \ |
3d9990ac | 160 | babeltrace/bitfield-internal.h \ |
1670bffd | 161 | babeltrace/common-internal.h \ |
beb0fb75 PP |
162 | babeltrace/compat/fcntl-internal.h \ |
163 | babeltrace/compat/glib-internal.h \ | |
164 | babeltrace/compat/limits-internal.h \ | |
165 | babeltrace/compat/memstream-internal.h \ | |
166 | babeltrace/compat/mman-internal.h \ | |
1cb3cdd7 | 167 | babeltrace/compat/socket-internal.h \ |
beb0fb75 PP |
168 | babeltrace/compat/stdio-internal.h \ |
169 | babeltrace/compat/stdlib-internal.h \ | |
170 | babeltrace/compat/string-internal.h \ | |
58a2480d | 171 | babeltrace/compat/time-internal.h \ |
108e5a1e | 172 | babeltrace/compat/unistd-internal.h \ |
beb0fb75 PP |
173 | babeltrace/compat/utc-internal.h \ |
174 | babeltrace/compat/uuid-internal.h \ | |
3d9990ac | 175 | babeltrace/compiler-internal.h \ |
44e0a4f5 | 176 | babeltrace/ctf-ir/attributes-internal.h \ |
beb0fb75 | 177 | babeltrace/ctf-ir/clock-class-internal.h \ |
c057dea0 | 178 | babeltrace/ctf-ir/clock-value-internal.h \ |
272df73e | 179 | babeltrace/ctf-ir/event-class-internal.h \ |
beb0fb75 | 180 | babeltrace/ctf-ir/event-internal.h \ |
b011f6b0 | 181 | babeltrace/ctf-ir/field-path-internal.h \ |
beb0fb75 PP |
182 | babeltrace/ctf-ir/field-types-internal.h \ |
183 | babeltrace/ctf-ir/fields-internal.h \ | |
184 | babeltrace/ctf-ir/packet-internal.h \ | |
09840de5 | 185 | babeltrace/ctf-ir/resolve-internal.h \ |
adc315b8 | 186 | babeltrace/ctf-ir/stream-class-internal.h \ |
3f043b05 | 187 | babeltrace/ctf-ir/stream-internal.h \ |
daf01357 | 188 | babeltrace/ctf-ir/trace-internal.h \ |
09840de5 | 189 | babeltrace/ctf-ir/validation-internal.h \ |
8bf65fbd | 190 | babeltrace/ctf-ir/visitor-internal.h \ |
726106d3 | 191 | babeltrace/ctf-ir/utils-internal.h \ |
ac0c6bdd | 192 | babeltrace/ctf-writer/clock-internal.h \ |
273b65be | 193 | babeltrace/ctf-writer/functor-internal.h \ |
beb0fb75 PP |
194 | babeltrace/ctf-writer/serialize-internal.h \ |
195 | babeltrace/ctf-writer/writer-internal.h \ | |
3d9990ac | 196 | babeltrace/endian-internal.h \ |
beb0fb75 | 197 | babeltrace/graph/clock-class-priority-map-internal.h \ |
b2e0c907 | 198 | babeltrace/graph/component-class-internal.h \ |
8ed535b5 | 199 | babeltrace/graph/component-class-sink-colander-internal.h \ |
b2e0c907 | 200 | babeltrace/graph/component-filter-internal.h \ |
beb0fb75 | 201 | babeltrace/graph/component-internal.h \ |
b2e0c907 PP |
202 | babeltrace/graph/component-sink-internal.h \ |
203 | babeltrace/graph/component-source-internal.h \ | |
beb0fb75 PP |
204 | babeltrace/graph/connection-internal.h \ |
205 | babeltrace/graph/graph-internal.h \ | |
2ec84d26 | 206 | babeltrace/graph/notification-discarded-elements-internal.h \ |
b2e0c907 | 207 | babeltrace/graph/notification-event-internal.h \ |
beb0fb75 | 208 | babeltrace/graph/notification-heap-internal.h \ |
ece3fb0f | 209 | babeltrace/graph/notification-inactivity-internal.h \ |
b2e0c907 | 210 | babeltrace/graph/notification-internal.h \ |
beb0fb75 | 211 | babeltrace/graph/notification-iterator-internal.h \ |
b2e0c907 PP |
212 | babeltrace/graph/notification-packet-internal.h \ |
213 | babeltrace/graph/notification-stream-internal.h \ | |
beb0fb75 | 214 | babeltrace/graph/port-internal.h \ |
c7eee084 | 215 | babeltrace/graph/query-executor-internal.h \ |
beb0fb75 | 216 | babeltrace/lib-logging-internal.h \ |
45ff8fe4 | 217 | babeltrace/list-internal.h \ |
beb0fb75 PP |
218 | babeltrace/logging-internal.h \ |
219 | babeltrace/mmap-align-internal.h \ | |
220 | babeltrace/object-internal.h \ | |
221 | babeltrace/plugin/plugin-internal.h \ | |
222 | babeltrace/plugin/plugin-so-internal.h \ | |
223 | babeltrace/prio-heap-internal.h \ | |
c4628760 | 224 | babeltrace/ref-internal.h \ |
7845e95f MJ |
225 | babeltrace/values-internal.h \ |
226 | version.h \ | |
227 | version.i |