Move examples to doc/examples and include them in DIST

Change-Id: I0846e21ac63774939934ab629c6d7212269be9a6
This commit is contained in:
Harald Welte 2017-09-05 22:24:45 +02:00
parent 59ffc89d42
commit ce316f4962
8 changed files with 28 additions and 4 deletions

View File

@ -141,6 +141,7 @@ PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl)
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/examples/Makefile
ggsn/Makefile
gtp/Makefile
lib/Makefile

View File

@ -1,2 +1,2 @@
examples/osmo-ggsn.conf
examples/sgsnemu.conf
doc/examples/osmo-ggsn.conf
doc/examples/sgsnemu.conf

View File

@ -2,5 +2,6 @@ man_MANS = osmo-ggsn.8 sgsnemu.8
man_aux = $(man_MANS:.1=.x)
EXTRA_DIST = $(man_MANS)
SUBDIRS = \
examples \
$(NULL)

22
doc/examples/Makefile.am Normal file
View File

@ -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)/examples/$$f" && \
mkdir -p "$$(dirname $$j)" && \
$(INSTALL_DATA) $(srcdir)/$$f $$j; \
done
uninstall-hook:
@$(PRE_UNINSTALL)
for f in $$($(CFG_FILES)); do \
j="$(DESTDIR)$(docdir)/examples/$$f" && \
$(RM) $$j; \
done