Rotate timer
[lttng-tools.git] / include / Makefile.am
CommitLineData
4c6ac053
MD
1if LTTNG_TOOLS_BUILD_GIT_SOURCE
2GIT_DESCRIBE_CMD = (cd $(top_srcdir); git describe)
3else
4GIT_DESCRIBE_CMD = /bin/true
5endif
6
88564da0
RB
7##
8## The version.h file must be verified and generated or updated if the
9## git commit id (called git version here) changed since the last build
10## of lttng-tools.
11##
12version.h:
13 ##
14 ## We first create variables for the current git version and
4c6ac053 15 ## the locations of the version.h and version.h.tmpl files.
88564da0 16 ##
351e3031 17 @echo $(ECHO_N) "Generating version.h... $(ECHO_C)"
aa3acc4e 18 @(version_h_tmpl="$(top_srcdir)/include/version.h.tmpl"; \
88564da0
RB
19 if [ -f "$${version_h_tmpl}" ]; then \
20 version_h="$(top_builddir)/include/version.h"; \
21 ##
4c6ac053 22 ## Check whether we are in a git repo.
88564da0 23 ##
e822af72 24 git_describe="`$(GIT_DESCRIBE_CMD) 2>/dev/null`"; \
4c6ac053
MD
25 if [ $$? -eq 0 ]; then \
26 git_version="$${git_describe}"; \
88564da0 27 else \
4c6ac053 28 git_version=""; \
88564da0
RB
29 fi; \
30 ##
31 ## If the version.h file doesn't exist or is not up to date,
4c6ac053 32 ## We replace it by the version.h.tmpl file.
88564da0
RB
33 ##
34 if [ ! -e "$${version_h}" ] || \
35 [ "$${version_h_tmpl}" -nt "$${version_h}" ]; then \
36 cp "$${version_h_tmpl}" "$${version_h}"; \
37 fi; \
351e3031 38 echo $(ECHO_N) "git version: \"$${git_version}\"$(ECHO_C)"; \
4c6ac053
MD
39 ##
40 ## We verify that git_version isn't the same as the one
41 ## currently in the file (if there is one), as we don't
42 ## want to update the file if it is already up to date.
43 ##
44 version_match='^#define GIT_VERSION.*'; \
18ecc6ae 45 old_version=$$($(GREP) "$${version_match}" "$${version_h}"); \
4c6ac053
MD
46 new_version="#define GIT_VERSION \"$${git_version}\""; \
47 if [ x"$${old_version}" != x"$${new_version}" ]; then \
95ecfc12 48 $(SED) -i -e "s'$${version_match}'$${new_version}'" "$${version_h}"; \
4c6ac053 49 else \
351e3031 50 echo $(ECHO_N) " (cached)$(ECHO_C)"; \
88564da0 51 fi; \
351e3031 52 echo $(ECHO_N) "... $(ECHO_C)"; \
88564da0 53 fi)
351e3031 54 @echo "$(ECHO_T)ok"
88564da0
RB
55
56##
57## version.h is defined as a .PHONY file even if it's a real file as
25bb01f3 58## we want our routine to be ran for each build.
88564da0
RB
59##
60.PHONY: version.h
61
ec148ec6
MD
62CLEANFILES = version.h
63
4c6ac053
MD
64nodist_noinst_HEADERS = \
65 version.h
66
55d09795 67lttnginclude_HEADERS = \
d74df422 68 lttng/health.h \
55d09795 69 lttng/lttng.h \
1239a312
DG
70 lttng/constant.h \
71 lttng/channel.h \
72 lttng/domain.h \
73 lttng/event.h \
74 lttng/handle.h \
75 lttng/session.h \
55d09795 76 lttng/lttng-error.h \
00c76cea 77 lttng/snapshot.h \
88564da0 78 lttng/save.h \
9245bd0e 79 lttng/load.h \
a58c490f 80 lttng/endpoint.h \
db66e574 81 lttng/rotation.h \
4c6ac053 82 version.h.tmpl
da3c9ec1 83
a58c490f
JG
84lttngactioninclude_HEADERS= \
85 lttng/action/action.h \
86 lttng/action/notify.h
87
88lttngconditioninclude_HEADERS= \
89 lttng/condition/condition.h \
90 lttng/condition/buffer-usage.h \
91 lttng/condition/evaluation.h
92
93lttngnotificationinclude_HEADERS= \
94 lttng/notification/channel.h \
95 lttng/notification/notification.h
96
97lttngtriggerinclude_HEADERS= \
98 lttng/trigger/trigger.h
99
55d09795
MD
100noinst_HEADERS = \
101 lttng/snapshot-internal.h \
00c76cea 102 lttng/health-internal.h \
9245bd0e 103 lttng/save-internal.h \
a58c490f
JG
104 lttng/load-internal.h \
105 lttng/action/action-internal.h \
106 lttng/action/notify-internal.h \
107 lttng/condition/condition-internal.h \
108 lttng/condition/buffer-usage-internal.h \
109 lttng/condition/evaluation-internal.h \
110 lttng/notification/notification-internal.h \
111 lttng/trigger/trigger-internal.h \
112 lttng/endpoint-internal.h \
932a07e0 113 lttng/notification/channel-internal.h \
159e8e73
JG
114 lttng/channel-internal.h \
115 lttng/rotate-internal.h
This page took 0.036156 seconds and 4 git commands to generate.