summaryrefslogtreecommitdiff
path: root/src/libsystemd/libsystemd-journal-internal/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-02 02:39:00 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-02 02:39:00 -0400
commitd2556f9977122552e1b6ba4a233a500ce86b1343 (patch)
treebbf022e36d34013eb4a9c58a247db9d7445f7497 /src/libsystemd/libsystemd-journal-internal/Makefile
parenta422a6a26da229bd168815958d55a582188f40bb (diff)
get libsystemd-journal-internal building
Diffstat (limited to 'src/libsystemd/libsystemd-journal-internal/Makefile')
-rw-r--r--src/libsystemd/libsystemd-journal-internal/Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libsystemd/libsystemd-journal-internal/Makefile b/src/libsystemd/libsystemd-journal-internal/Makefile
index 09677d6e5e..784e38732b 100644
--- a/src/libsystemd/libsystemd-journal-internal/Makefile
+++ b/src/libsystemd/libsystemd-journal-internal/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
pkginclude_HEADERS += \
@@ -94,5 +94,21 @@ endif
noinst_LTLIBRARIES += \
libsystemd-journal-internal.la
+
+audit_list_includes = -include linux/audit.h -include $(call at.path,$(topsrcdir)/src/libbasic/missing.h)
+ifneq ($(HAVE_AUDIT),)
+audit_list_includes += -include libaudit.h
+endif
+
+$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/missing.h)
+ $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
+
+$(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+
$(eval $(value automake2autothing))
+AM_CPPFLAGS += $(libbasic.CPPFLAGS)
+AM_CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\"
+$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h
+
include $(topsrcdir)/build-aux/Makefile.tail.mk