X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=distro%2FMakefile.am;h=dac2b73d7c194594e4235279f1a5b228fafd999e;hp=286c7b7624188a86799dd4b4351cee736d832e4a;hb=a563e6dd8c88865351c05ebc72de86dac7a839d5;hpb=96e33d749cd61dd5f103ffef2e5e833f30185787 diff --git a/distro/Makefile.am b/distro/Makefile.am index 286c7b76..dac2b73d 100644 --- a/distro/Makefile.am +++ b/distro/Makefile.am @@ -1,9 +1,18 @@ -EXTRA_DIST = \ - tinc.service \ - tinc@.service - -if HAVE_SYSTEMD -systemdsystemunit_DATA = \ - tinc.service \ - tinc@.service +EXTRA_DIST = tinc.service.in tinc@.service.in + +CLEANFILES = tinc.service tinc@.service + +if WITH_SYSTEMD +systemddir = @systemd_path@ +nodist_systemd_DATA = tinc.service tinc@.service endif + +substitute = sed \ + -e s,'@sbindir\@',"$(sbindir)",g \ + -e s,'@sysconfdir\@',"$(sysconfdir)",g + +tinc.service: $(srcdir)/tinc.service.in + $(AM_V_GEN)$(substitute) $(srcdir)/tinc.service.in > $@ + +tinc@.service: $(srcdir)/tinc@.service.in + $(AM_V_GEN)$(substitute) $(srcdir)/tinc@.service.in > $@