summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-08-20 15:52:51 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-08-20 16:53:50 -0400
commite4b0a9391be1d21ca15d9610b977f989ccee833a (patch)
treea6d697088aa4e4449b6b67cecc8924192923cde9 /Makefile
parent49c77b925af1c205747116a762000d99e192e2c8 (diff)
prepare for autothing
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0aa88a4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+PACKAGE = collectd-systemd
+VERSION = 20170820
+
+include $(dir $(lastword $(MAKEFILE_LIST)))/config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+files.out.all += systemd.conf
+#files.out.all += systemd.types.db
+#files.out.all += systemd.py
+
+files.sys.all += $(collectdconfdir)/systemd.conf
+files.sys.all += $(collectdtypesdir)/systemd.types.db
+files.sys.all += $(collectdpythondir)/systemd.py
+
+$(outdir)/%: $(srcdir)/%.in
+ sed $(foreach v,$(patsubst $(var.)%,%,$(filter $(var.)%,$^)), -e 's|@$(v)@|$($(v))|g' ) < $< > $@
+
+$(outdir)/systemd.conf: $(var.)collectd_typesdir
+$(outdir)/systemd.conf: $(var.)collectd_pythondir
+
+$(DESTDIR)$(collectdconfdir)/systemd.conf: $(outdir)/systemd.conf
+ $(INSTALL_DATA) -DT $< $@
+$(DESTDIR)$(collectdtypesdir)/systemd.types.db: $(srcdir)/systemd.types.db
+ $(INSTALL_DATA) -DT $< $@
+$(DESTDIR)$(collectdpythondir)/systemd.py: $(srcdir)/systemd.py
+ $(INSTALL_PROGRAM) -DT $< $@
+
+.SECONDARY:
+.DELETE_ON_ERROR:
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk