diff --git a/Makefile.am b/Makefile.am index 3933d2a95..90b771bd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,8 +2,8 @@ ACLOCAL_AMFLAGS = -I config -SUBDIRS = src etc scripts doc -DIST_SUBDIRS = config src etc scripts doc +SUBDIRS = src scripts doc +DIST_SUBDIRS = config src scripts doc EXTRA_DIST = autogen.sh lxc.spec CONTRIBUTING MAINTAINERS ChangeLog pcdatadir = $(datadir)/pkgconfig diff --git a/configure.ac b/configure.ac index 75c8fd0cc..2713053c7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,12 @@ fi AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"]) +AC_ARG_ENABLE([examples], + [AC_HELP_STRING([--disable-examples], [do not install configuration examples])], + [], [enable_examples=yes]) + +AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"]) + AS_AC_EXPAND(PREFIX, $prefix) AS_AC_EXPAND(LIBDIR, $libdir) AS_AC_EXPAND(BINDIR, $bindir) @@ -103,13 +109,13 @@ AC_CONFIG_FILES([ src/lxc/lxc-create src/lxc/lxc-destroy - etc/Makefile - etc/lxc-macvlan.conf - etc/lxc-no-netns.conf - etc/lxc-empty-netns.conf - etc/lxc-phys.conf - etc/lxc-veth.conf - etc/lxc-complex-config + doc/examples/Makefile + doc/examples/lxc-macvlan.conf + doc/examples/lxc-no-netns.conf + doc/examples/lxc-empty-netns.conf + doc/examples/lxc-phys.conf + doc/examples/lxc-veth.conf + doc/examples/lxc-complex-config ]) AC_CONFIG_COMMANDS([default],[[]],[[]]) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am index 9f7bf695e..bd96c9933 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = examples +DIST_SUBDIRS = examples EXTRA_DIST = \ FAQ.txt \ diff --git a/etc/Makefile.am b/doc/examples/Makefile.am similarity index 70% rename from etc/Makefile.am rename to doc/examples/Makefile.am index aa7cc66d5..0490a8b21 100644 --- a/etc/Makefile.am +++ b/doc/examples/Makefile.am @@ -1,11 +1,17 @@ -pkgsysconfdir = $(sysconfdir)/$(PACKAGE) -pkgsysconf_DATA = \ +EXTRA_DIST = $(pkgexamples_DATA) + +if ENABLE_EXAMPLES +pkgexamplesdir=$(docdir)/examples + +pkgexamples_DATA = \ lxc-macvlan.conf \ lxc-no-netns.conf \ lxc-empty-netns.conf \ lxc-phys.conf \ lxc-veth.conf \ lxc-complex-config +endif + noinst_DATA = \ lxc-macvlan.conf.in \ lxc-empty-netns.conf.in \ diff --git a/etc/lxc-complex-config.in b/doc/examples/lxc-complex-config.in similarity index 99% rename from etc/lxc-complex-config.in rename to doc/examples/lxc-complex-config.in index f2e8ea31c..9d761cb2d 100644 --- a/etc/lxc-complex-config.in +++ b/doc/examples/lxc-complex-config.in @@ -1,4 +1,4 @@ -# Container with network a complex network mixing macvlan, veth and +# Container with network a complex network mixing macvlan, veth and # physical network devices lxc.utsname = complex lxc.network.type = veth diff --git a/etc/lxc-empty-netns.conf.in b/doc/examples/lxc-empty-netns.conf.in similarity index 100% rename from etc/lxc-empty-netns.conf.in rename to doc/examples/lxc-empty-netns.conf.in diff --git a/etc/lxc-macvlan.conf.in b/doc/examples/lxc-macvlan.conf.in similarity index 100% rename from etc/lxc-macvlan.conf.in rename to doc/examples/lxc-macvlan.conf.in diff --git a/etc/lxc-no-netns.conf.in b/doc/examples/lxc-no-netns.conf.in similarity index 100% rename from etc/lxc-no-netns.conf.in rename to doc/examples/lxc-no-netns.conf.in diff --git a/etc/lxc-phys.conf.in b/doc/examples/lxc-phys.conf.in similarity index 100% rename from etc/lxc-phys.conf.in rename to doc/examples/lxc-phys.conf.in diff --git a/etc/lxc-veth.conf.in b/doc/examples/lxc-veth.conf.in similarity index 100% rename from etc/lxc-veth.conf.in rename to doc/examples/lxc-veth.conf.in diff --git a/etc/.cvsignore b/etc/.cvsignore deleted file mode 100644 index 72d0ae415..000000000 --- a/etc/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile -Makefile.in -lxc-complex-config -lxc-empty-netns.conf -lxc-macvlan.conf -lxc-no-netns.conf -lxc-phys.conf -lxc-veth.conf -