summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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