aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-11-16 01:01:09 +0100
committerHarald Welte <laforge@gnumonks.org>2017-11-17 14:27:40 +0000
commit38f08770a3a40cc90caf2879c9ff545a3e58f714 (patch)
tree22fa04879ea28c6bfa88d09f40b8bb1e1920c2e0 /doc
parentaee7be901bbc91ef63449595727a5096bb65c09b (diff)
doc: install example .cfg files to $(docdir)/examples/
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..e0e5380
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,22 @@
+CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
+
+dist-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(distdir)/$$f" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$$f $$j; \
+ done
+
+install-data-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/$$f" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$$f $$j; \
+ done
+
+uninstall-hook:
+ @$(PRE_UNINSTALL)
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/$$f" && \
+ $(RM) $$j; \
+ done