From eb113137c8cb2092e41fdda728832f0d1ddeee83 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 11 May 2011 22:11:28 +0200 Subject: [PATCH] examples: automatically copy all examples in dist and install it to docdir --- openbsc/Makefile.am | 2 +- openbsc/configure.in | 2 ++ openbsc/doc/Makefile.am | 1 + openbsc/doc/examples/Makefile.am | 16 ++++++++++++++++ .../doc/examples/{ => osmo-bsc_mgcp}/mgcp.cfg | 0 .../bs11/openbsc-1bts-2trx-hopping.cfg} | 0 .../bs11/openbsc-1bts-2trx.cfg} | 0 .../bs11/openbsc-2bts-2trx.cfg} | 0 .../bs11/openbsc.cfg} | 0 .../nanobts/openbsc-multitrx.cfg} | 0 .../nanobts/openbsc.cfg} | 0 .../rbs2308/openbsc.cfg} | 0 12 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 openbsc/doc/Makefile.am create mode 100644 openbsc/doc/examples/Makefile.am rename openbsc/doc/examples/{ => osmo-bsc_mgcp}/mgcp.cfg (100%) rename openbsc/doc/examples/{openbsc.cfg.1-2-hopping => osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.1-2 => osmo-nitb/bs11/openbsc-1bts-2trx.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.2-2 => osmo-nitb/bs11/openbsc-2bts-2trx.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.1-1 => osmo-nitb/bs11/openbsc.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.nanobts.multitrx => osmo-nitb/nanobts/openbsc-multitrx.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.nanobts => osmo-nitb/nanobts/openbsc.cfg} (100%) rename openbsc/doc/examples/{openbsc.cfg.rbs2308-4trx => osmo-nitb/rbs2308/openbsc.cfg} (100%) diff --git a/openbsc/Makefile.am b/openbsc/Makefile.am index b2522caa6..b966e69e3 100644 --- a/openbsc/Makefile.am +++ b/openbsc/Makefile.am @@ -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 diff --git a/openbsc/configure.in b/openbsc/configure.in index a2d987f7b..e9bc079b4 100644 --- a/openbsc/configure.in +++ b/openbsc/configure.in @@ -110,4 +110,6 @@ AC_OUTPUT( tests/channel/Makefile tests/bsc-nat/Makefile tests/mgcp/Makefile + doc/Makefile + doc/examples/Makefile Makefile) diff --git a/openbsc/doc/Makefile.am b/openbsc/doc/Makefile.am new file mode 100644 index 000000000..aee2d7baa --- /dev/null +++ b/openbsc/doc/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = examples diff --git a/openbsc/doc/examples/Makefile.am b/openbsc/doc/examples/Makefile.am new file mode 100644 index 000000000..b7eda49d6 --- /dev/null +++ b/openbsc/doc/examples/Makefile.am @@ -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 diff --git a/openbsc/doc/examples/mgcp.cfg b/openbsc/doc/examples/osmo-bsc_mgcp/mgcp.cfg similarity index 100% rename from openbsc/doc/examples/mgcp.cfg rename to openbsc/doc/examples/osmo-bsc_mgcp/mgcp.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.1-2-hopping b/openbsc/doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.1-2-hopping rename to openbsc/doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.1-2 b/openbsc/doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.1-2 rename to openbsc/doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.2-2 b/openbsc/doc/examples/osmo-nitb/bs11/openbsc-2bts-2trx.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.2-2 rename to openbsc/doc/examples/osmo-nitb/bs11/openbsc-2bts-2trx.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.1-1 b/openbsc/doc/examples/osmo-nitb/bs11/openbsc.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.1-1 rename to openbsc/doc/examples/osmo-nitb/bs11/openbsc.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.nanobts.multitrx b/openbsc/doc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.nanobts.multitrx rename to openbsc/doc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.nanobts b/openbsc/doc/examples/osmo-nitb/nanobts/openbsc.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.nanobts rename to openbsc/doc/examples/osmo-nitb/nanobts/openbsc.cfg diff --git a/openbsc/doc/examples/openbsc.cfg.rbs2308-4trx b/openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg similarity index 100% rename from openbsc/doc/examples/openbsc.cfg.rbs2308-4trx rename to openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg