conf: Create automatically generated config snippets in build dir
This commit is contained in:
+8
-3
@@ -100,13 +100,14 @@ CLEANFILES=$(man_MANS)
|
|||||||
# if the rules above did not catch it. this requires an intermediate step that
|
# if the rules above did not catch it. this requires an intermediate step that
|
||||||
# generates a copy of the generic config template.
|
# generates a copy of the generic config template.
|
||||||
$(plugins_install_tmp):
|
$(plugins_install_tmp):
|
||||||
@cp $(srcdir)/default.conf $(srcdir)/$@
|
@mkdir -p $(builddir)/plugins
|
||||||
|
@cp $(srcdir)/default.conf $(builddir)/$@
|
||||||
|
|
||||||
.tmp.conf:
|
.tmp.conf:
|
||||||
$(AM_V_GEN) \
|
$(AM_V_GEN) \
|
||||||
sed \
|
sed \
|
||||||
-e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
|
-e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
|
||||||
$(srcdir)/$< > $(srcdir)/$@
|
$(builddir)/$< > $(builddir)/$@
|
||||||
|
|
||||||
strongswan.conf.5.main: $(alloptions)
|
strongswan.conf.5.main: $(alloptions)
|
||||||
$(AM_V_GEN) \
|
$(AM_V_GEN) \
|
||||||
@@ -116,6 +117,9 @@ strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf
|
|||||||
$(AM_V_GEN) \
|
$(AM_V_GEN) \
|
||||||
cat $^ > $@
|
cat $^ > $@
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -f plugins/*.conf plugins/*.tmp
|
||||||
|
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
cd $(srcdir) && \
|
cd $(srcdir) && \
|
||||||
rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
|
rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
|
||||||
@@ -131,5 +135,6 @@ install-data-local: $(plugins_install_src)
|
|||||||
done
|
done
|
||||||
for f in $(plugins_install_src); do \
|
for f in $(plugins_install_src); do \
|
||||||
name=`basename $$f`; \
|
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
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user