From e4b0a9391be1d21ca15d9610b977f989ccee833a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 20 Aug 2017 15:52:51 -0400 Subject: prepare for autothing --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3-2-g168b