examples: automatically copy all examples in dist and install it to docdir

This commit is contained in:
Harald Welte 2011-05-11 22:11:28 +02:00
parent 88b6a1fa80
commit eb113137c8
12 changed files with 20 additions and 1 deletions

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
INCLUDES = $(all_includes) -I$(top_srcdir)/include
SUBDIRS = include src tests
SUBDIRS = doc include src tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = openbsc.pc

View File

@ -110,4 +110,6 @@ AC_OUTPUT(
tests/channel/Makefile
tests/bsc-nat/Makefile
tests/mgcp/Makefile
doc/Makefile
doc/examples/Makefile
Makefile)

1
openbsc/doc/Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = examples

View File

@ -0,0 +1,16 @@
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