| 1 | # SPDX-License-Identifier: MIT |
| 2 | |
| 3 | AM_CPPFLAGS += -DBABELTRACE_PLUGINS_DIR=\"$(BABELTRACE_PLUGINS_DIR)\" |
| 4 | |
| 5 | noinst_LTLIBRARIES = libbabeltrace2-common.la |
| 6 | |
| 7 | libbabeltrace2_common_la_SOURCES = \ |
| 8 | assert.c \ |
| 9 | assert.h \ |
| 10 | common.c \ |
| 11 | common.h \ |
| 12 | uuid.c \ |
| 13 | uuid.h |
| 14 | |
| 15 | noinst_HEADERS = \ |
| 16 | align.h \ |
| 17 | list.h \ |
| 18 | macros.h \ |
| 19 | mmap-align.h \ |
| 20 | safe.h |
| 21 | |
| 22 | ## This target generates an include file that contains the git version |
| 23 | ## string of the current branch, it must be continuously updated when |
| 24 | ## we build in the git repo and shipped in dist tarballs to reflect the |
| 25 | ## status of the tree when it was generated. If the tree is clean and |
| 26 | ## the current commit is tag a starting with "v", consider this a |
| 27 | ## release version and set an empty git version. |
| 28 | |
| 29 | version_verbose = $(version_verbose_@AM_V@) |
| 30 | version_verbose_ = $(version_verbose_@AM_DEFAULT_V@) |
| 31 | version_verbose_0 = @echo " GEN " $@; |
| 32 | |
| 33 | version.i: |
| 34 | $(version_verbose)GREP=$(GREP) SED=$(SED) TOP_SRCDIR="$(top_srcdir)" $(SHELL) $(srcdir)/gen-version-i.sh |
| 35 | |
| 36 | dist_noinst_SCRIPTS = gen-version-i.sh |
| 37 | |
| 38 | ## |
| 39 | ## version.i is defined as a .PHONY target even if it's a real file, |
| 40 | ## we want the target to be re-run on every make. |
| 41 | ## |
| 42 | .PHONY: version.i |
| 43 | |
| 44 | CLEANFILES = version.i.tmp |
| 45 | |
| 46 | ## |
| 47 | ## Only clean "version.i" on dist-clean, we need to keep it on regular |
| 48 | ## clean when it's part of a dist tarball. |
| 49 | ## |
| 50 | DISTCLEANFILES = version.i |
| 51 | |
| 52 | noinst_HEADERS += version.h version.i |