diff options
-rw-r--r-- | Makefile.am | 3 | ||||
-rwxr-xr-x | move.sh | 33 | ||||
-rw-r--r-- | src/journal/Makefile | 1 | ||||
-rw-r--r-- | src/libsystemd/libsystemd-journal-internal/Makefile | 22 |
4 files changed, 46 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am index 23b4146fc9..b1515e05f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1400,7 +1400,7 @@ src/basic/cap-from-name.h: src/basic/cap-from-name.gperf $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@ -#@src/journal/Makefile +#@src/libsystemd/libsystemd-journal-internal/Makefile audit_list_includes = -include linux/audit.h -include missing.h if HAVE_AUDIT audit_list_includes += -include libaudit.h @@ -1414,6 +1414,7 @@ src/journal/audit_type-to-name.h: src/journal/audit_type-list.txt $(AM_V_at)$(MKDIR_P) $(dir $@) $(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" }' <$< >$@ +#@src/journal/Makefile src/resolve/dns_type-list.txt: src/resolve/dns-type.h $(AM_V_at)$(MKDIR_P) $(dir $@) @@ -106,6 +106,36 @@ move_files() ( touch build-aux/Makefile.{once,each}.{head,tail}/.gitignore mkdir src/libsystemd/libsystemd-journal-internal + + libsystemd_journal_files=( + audit-type.c + audit-type.h + catalog.c + catalog.h + compress.c + compress.h + fsprg.c + fsprg.h + journal-authenticate.c + journal-authenticate.h + journal-def.h + journal-file.c + journal-file.h + journal-internal.h + journal-send.c + journal-vacuum.c + journal-vacuum.h + journal-verify.c + journal-verify.h + lookup3.c + lookup3.h + mmap-cache.c + mmap-cache.h + sd-journal.c + ) + for file in "${libsystemd_journal_files[@]}"; do + mv -T src/{journal,libsystemd/libsystemd-journal-internal}/$file + done ) breakup_makefile() ( @@ -154,7 +184,8 @@ fixup_makefiles() ( -e 's/ \$\(CPPFLAGS\) / /g' \ -e 's/ \$\(AM_CPPFLAGS\) / $(ALL_CPPFLAGS) /g' \ -e '/^[^# ]*:/ { s|\S+/|$(outdir)/|g }' \ - src/libbasic/Makefile + src/libbasic/Makefile \ + src/libsystemd/libsystemd-journal-internal/Makefile ) move() ( diff --git a/src/journal/Makefile b/src/journal/Makefile index e5223d72bc..43e8810680 100644 --- a/src/journal/Makefile +++ b/src/journal/Makefile @@ -23,6 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk + $(outdir)/dns_type-list.txt: src/resolve/dns-type.h $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ diff --git a/src/libsystemd/libsystemd-journal-internal/Makefile b/src/libsystemd/libsystemd-journal-internal/Makefile index 784e38732b..ae5ab76ea9 100644 --- a/src/libsystemd/libsystemd-journal-internal/Makefile +++ b/src/libsystemd/libsystemd-journal-internal/Makefile @@ -23,6 +23,17 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +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" }' <$< >$@ + pkginclude_HEADERS += \ src/systemd/sd-journal.h \ src/systemd/sd-messages.h \ @@ -95,17 +106,6 @@ 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\" |