summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-28 19:53:42 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-02-28 20:05:12 -0500
commit37d3ab1b7e114f0fb6dfb2e7273569b42794b76a (patch)
treeb69f73466e4719b6f02d4b30fcaa42ec43f1c40d /Makefile.am
parent54c31a79f72ff57ac8eba089acacc4ab482b745d (diff)
parent7f41820b07ccb8a6da5552c466818fcce3d085bf (diff)
Merge branch 'python-systemd-reader'
* python-systemd-reader: python-systemd: rename Journal to Reader build-sys: upload python documentation to freedesktop.org systemd-python: add Journal class for reading journal python: build html docs using sphinx journalct: also print Python code in --new-id python: utilize uuid.UUID in logging python: add systemd.id128 module ... and 34 other commits In short: python module systemd.id128 is added, and existing systemd.journal gains a new class systemd.journal.Reader, which can be used to iterate over journal entries. Documentation is provided, and accessible under e.g. pydoc3 systemd.journal.Reader or firefox http://www.freedesktop.org/software/systemd/man/python-systemd/
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am80
1 files changed, 74 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index d00ca113e0..790e5014be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3398,7 +3398,9 @@ EXTRA_DIST += \
# ------------------------------------------------------------------------------
if HAVE_PYTHON_DEVEL
pkgpyexec_LTLIBRARIES = \
- _journal.la
+ _journal.la \
+ id128.la \
+ _reader.la
_journal_la_SOURCES = \
src/python-systemd/_journal.c
@@ -3418,11 +3420,75 @@ _journal_la_LIBADD = \
$(PYTHON_LIBS) \
libsystemd-journal.la
+id128_la_SOURCES = \
+ src/python-systemd/id128.c \
+ src/python-systemd/id128-constants.h \
+ src/python-systemd/pyutil.c \
+ src/python-systemd/pyutil.h
+
+id128_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ -fvisibility=default \
+ $(PYTHON_CFLAGS) \
+ -I$(top_builddir)/src/python-systemd
+
+id128_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -shared \
+ -module \
+ -avoid-version
+
+id128_la_LIBADD = \
+ $(PYTHON_LIBS) \
+ libsystemd-id128.la
+
+_reader_la_SOURCES = \
+ src/python-systemd/_reader.c \
+ src/python-systemd/pyutil.c \
+ src/python-systemd/pyutil.h
+
+_reader_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ -fvisibility=default \
+ $(PYTHON_CFLAGS)
+
+_reader_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -shared \
+ -module \
+ -avoid-version
+
+_reader_la_LIBADD = \
+ $(PYTHON_LIBS) \
+ libsystemd-journal.la \
+ libsystemd-id128.la \
+ libsystemd-shared.la
+
dist_pkgpyexec_PYTHON = \
src/python-systemd/journal.py \
src/python-systemd/__init__.py
+
+src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
+
+BUILT_SOURCES += \
+ src/python-systemd/id128-constants.h
endif
+PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
+SPHINXOPTS = -D latex_paper_size=$(PAPER)
+sphinx-%:
+ $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
+ $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/man/python-systemd/
+ $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/man/python-systemd/
+
+destdir-sphinx: all
+ dir="`mktemp -d /tmp/systemd-install.XXXXXX`" && \
+ $(MAKE) DESTDIR="$$dir" install && \
+ $(MAKE) DESTDIR="$$dir" sphinx-html && \
+ rm -rf "$$dir"
+
# ------------------------------------------------------------------------------
SED_PROCESS = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3743,17 +3809,19 @@ upload: all distcheck
scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
scp man/*.html tango:public/systemd-man/
-doc-sync: all
+www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+doc-sync: all destdir-sphinx
gtkdoc-rebase --html-dir=docs/libudev/html --online
- rsync -av --delete docs/libudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/libudev/
+ rsync -av --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
gtkdoc-rebase --html-dir=docs/gudev/html --online
- rsync -av --delete docs/gudev/html/ --omit-dir-times www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/gudev/
- rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd/man/
+ rsync -av --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
+ rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
+ rsync -av --delete --omit-dir-times man/python-systemd/ $(www_target)/man/python-systemd/
git-tag:
git tag "v$(VERSION)" -m "systemd $(VERSION)"
install-tree: all
rm -rf $(abs_srcdir)/install-tree
- make install DESTDIR=$(abs_srcdir)/install-tree
+ $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
tree $(abs_srcdir)/install-tree