From: Tobias Brunner Date: Wed, 29 Jan 2014 13:03:16 +0000 (+0100) Subject: conf: Create automatically generated config snippets in build dir X-Git-Tag: 5.1.2rc1~7^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d56a23c515fc1c3cfcda1b1f2bc3adb4248cddcc;p=thirdparty%2Fstrongswan.git conf: Create automatically generated config snippets in build dir --- diff --git a/conf/Makefile.am b/conf/Makefile.am index e802299205..3fe727e16c 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -100,13 +100,14 @@ CLEANFILES=$(man_MANS) # if the rules above did not catch it. this requires an intermediate step that # generates a copy of the generic config template. $(plugins_install_tmp): - @cp $(srcdir)/default.conf $(srcdir)/$@ + @mkdir -p $(builddir)/plugins + @cp $(srcdir)/default.conf $(builddir)/$@ .tmp.conf: $(AM_V_GEN) \ sed \ -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \ - $(srcdir)/$< > $(srcdir)/$@ + $(builddir)/$< > $(builddir)/$@ strongswan.conf.5.main: $(alloptions) $(AM_V_GEN) \ @@ -116,6 +117,9 @@ strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf $(AM_V_GEN) \ cat $^ > $@ +clean-local: + rm -f plugins/*.conf plugins/*.tmp + maintainer-clean-local: cd $(srcdir) && \ rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp @@ -131,5 +135,6 @@ install-data-local: $(plugins_install_src) done for f in $(plugins_install_src); do \ name=`basename $$f`; \ - test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(charonconfdir)" $(srcdir)/$$f || true; \ + if test -f "$$f"; then dir=; else dir="$(srcdir)/"; fi; \ + test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(charonconfdir)" "$$dir$$f" || true; \ done