summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am61
-rw-r--r--bin/Makefile.am33
-rw-r--r--bin/csbuild/Makefile.am30
-rw-r--r--bin/dchroot-dsa/Makefile.am30
-rw-r--r--bin/dchroot/Makefile.am50
-rw-r--r--bin/schroot-base/Makefile.am28
-rw-r--r--bin/schroot-listmounts/Makefile.am23
-rw-r--r--bin/schroot-mount/Makefile.am22
-rw-r--r--bin/schroot-releaselock/Makefile.am22
-rw-r--r--bin/schroot-sbuild/Makefile.am26
-rw-r--r--bin/schroot/Makefile.am58
-rw-r--r--configure.ac23
-rw-r--r--contrib/Makefile.am24
-rw-r--r--contrib/setup.d/Makefile.am12
-rw-r--r--doc/Makefile.am36
-rw-r--r--doc/historical/Makefile.am6
-rw-r--r--doc/sbuild.dox.in2
-rw-r--r--doc/schroot.dox.in2
-rw-r--r--etc/Makefile.am34
-rw-r--r--etc/bash_completion/Makefile.am6
-rw-r--r--etc/pam/Makefile.am6
-rw-r--r--etc/setup.d/Makefile.am40
-rw-r--r--man/Makefile.am88
-rw-r--r--man/po4a.cfg22
-rw-r--r--sbuild/Makefile.am228
-rw-r--r--test/Makefile.am340
-rwxr-xr-xtest/cleanup-test-data4
-rwxr-xr-xtest/setup-test-data10
28 files changed, 568 insertions, 698 deletions
diff --git a/Makefile.am b/Makefile.am
index cfd3ed01..3fb86bc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,37 +21,64 @@
ACLOCAL_AMFLAGS=-I m4
+MAKEFLAGS = -rR --no-print-directory
+
include $(top_srcdir)/scripts/global.mk
include $(top_srcdir)/scripts/git-dist.mk
-SUBDIRS = sbuild bin test etc contrib man doc po
+localedir = $(datadir)/locale
+
+LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"test/testdata"' -I$(top_srcdir)/bin
+
+LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DDCHROOT_CONF=\"$(DCHROOT_CONF)\" -DCSBUILD_CONF=\"$(CSBUILD_CONF)\"
+
+bin_PROGRAMS =
+pkglibexec_PROGRAMS =
+noinst_LTLIBRARIES =
+noinst_PROGRAMS =
+noinst_SCRIPTS =
+schroot_sysconf_DATA =
+man_MANS =
+CLEANFILES =
+EXTRA_DIST =
+
+include etc/Makefile.am
+include etc/pam/Makefile.am
+include etc/setup.d/Makefile.am
+include etc/bash_completion/Makefile.am
+include contrib/setup.d/Makefile.am
+include doc/Makefile.am
+include doc/historical/Makefile.am
+include man/Makefile.am
+include sbuild/Makefile.am
+include bin/schroot-listmounts/Makefile.am
+include bin/dchroot-dsa/Makefile.am
+include bin/csbuild/Makefile.am
+include bin/dchroot/Makefile.am
+include bin/schroot-sbuild/Makefile.am
+include bin/schroot-releaselock/Makefile.am
+include bin/schroot-base/Makefile.am
+include bin/schroot-mount/Makefile.am
+include bin/schroot/Makefile.am
+include test/Makefile.am
-dist-hook:
+SUBDIRS = po
+
+dist-hook::
# Remove junk from the generated tarball.
- $(FIND) $(distdir) -name '.*' -print | $(XARGS) xargs $(RM) -rf
- $(FIND) $(distdir) -name '#*' -print | $(XARGS) $(RM) -rf
- $(FIND) $(distdir) -name '*~' -print | $(XARGS) $(RM) -rf
+ $(FIND) $(distdir) -name '.*' -print | $(XARGS) xargs rm -rf
+ $(FIND) $(distdir) -name '#*' -print | $(XARGS) rm -rf
+ $(FIND) $(distdir) -name '*~' -print | $(XARGS) rm -rf
# Generate ChangeLog
if [ -d .git ]; then \
git log > $(distdir)/ChangeLog; \
fi
-EXTRA_DIST = \
+EXTRA_DIST += \
bootstrap \
debian \
scripts/schroot_release.m4.in \
m4 \
HACKING \
VERSION
-
-doc:
- $(MAKE) -C doc doc
-
-ps:
- $(MAKE) -C man ps
-
-pdf:
- $(MAKE) -C man pdf
-
-.PHONY: doc ps pdf
diff --git a/bin/Makefile.am b/bin/Makefile.am
deleted file mode 100644
index 45bf3b59..00000000
--- a/bin/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-# schroot Makefile template
-#
-#
-# Copyright © 2004-2007 Roger Leigh <rleigh@debian.org>
-#
-# schroot is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# schroot is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#####################################################################
-
-include $(top_srcdir)/scripts/global.mk
-
-SUBDIRS = \
- schroot-base \
- schroot \
- schroot-listmounts \
- schroot-mount \
- schroot-releaselock \
- schroot-sbuild \
- dchroot \
- dchroot-dsa \
- csbuild
diff --git a/bin/csbuild/Makefile.am b/bin/csbuild/Makefile.am
index cc0517bb..85628341 100644
--- a/bin/csbuild/Makefile.am
+++ b/bin/csbuild/Makefile.am
@@ -19,29 +19,23 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DCSBUILD_CONF=\"$(CSBUILD_CONF)\"
-
if BUILD_CSBUILD
-csbuild = csbuild
+csbuild = bin/csbuild/csbuild
endif
-bin_PROGRAMS = $(csbuild)
+bin_PROGRAMS += $(csbuild)
-csbuild_SOURCES = \
- csbuild-debian-changes.h \
- csbuild-debian-changes.cc \
- csbuild-options.h \
- csbuild-options.cc \
- csbuild-main.h \
- csbuild-main.cc \
- csbuild.cc
-csbuild_LDADD = $(top_builddir)/bin/schroot/libschroot.la
+bin_csbuild_csbuild_SOURCES = \
+ bin/csbuild/csbuild-debian-changes.h \
+ bin/csbuild/csbuild-debian-changes.cc \
+ bin/csbuild/csbuild-options.h \
+ bin/csbuild/csbuild-options.cc \
+ bin/csbuild/csbuild-main.h \
+ bin/csbuild/csbuild-main.cc \
+ bin/csbuild/csbuild.cc
+bin_csbuild_csbuild_LDADD = $(top_builddir)/bin/schroot/libschroot.la
-install-exec-hook:
+install-exec-hook::
# Install setuid root.
if [ -f "$(DESTDIR)$(bindir)/csbuild" ]; then \
chmod 4755 "$(DESTDIR)$(bindir)/csbuild"; \
diff --git a/bin/dchroot-dsa/Makefile.am b/bin/dchroot-dsa/Makefile.am
index e64bbdce..02a31a97 100644
--- a/bin/dchroot-dsa/Makefile.am
+++ b/bin/dchroot-dsa/Makefile.am
@@ -19,29 +19,23 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DDCHROOT_CONF=\"$(DCHROOT_CONF)\"
-
if BUILD_DCHROOT_DSA
-dchroot_dsa = dchroot-dsa
+dchroot_dsa = bin/dchroot-dsa/dchroot-dsa
endif
-bin_PROGRAMS = $(dchroot_dsa)
+bin_PROGRAMS += $(dchroot_dsa)
-dchroot_dsa_SOURCES = \
- dchroot-dsa-session.h \
- dchroot-dsa-session.cc \
- dchroot-dsa-options.h \
- dchroot-dsa-options.cc \
- dchroot-dsa-main.h \
- dchroot-dsa-main.cc \
- dchroot-dsa.cc
-dchroot_dsa_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la
+bin_dchroot_dsa_dchroot_dsa_SOURCES = \
+ bin/dchroot-dsa/dchroot-dsa-session.h \
+ bin/dchroot-dsa/dchroot-dsa-session.cc \
+ bin/dchroot-dsa/dchroot-dsa-options.h \
+ bin/dchroot-dsa/dchroot-dsa-options.cc \
+ bin/dchroot-dsa/dchroot-dsa-main.h \
+ bin/dchroot-dsa/dchroot-dsa-main.cc \
+ bin/dchroot-dsa/dchroot-dsa.cc
+bin_dchroot_dsa_dchroot_dsa_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la
-install-exec-hook:
+install-exec-hook::
# Install setuid root.
if [ -f "$(DESTDIR)$(bindir)/dchroot-dsa" ]; then \
chmod 4755 "$(DESTDIR)$(bindir)/dchroot-dsa"; \
diff --git a/bin/dchroot/Makefile.am b/bin/dchroot/Makefile.am
index 3a0d4aed..22f41e4d 100644
--- a/bin/dchroot/Makefile.am
+++ b/bin/dchroot/Makefile.am
@@ -19,40 +19,34 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\" -DDCHROOT_CONF=\"$(DCHROOT_CONF)\"
-
if BUILD_LIBDCHROOT
-noinst_LTLIBRARIES = libdchroot.la
+noinst_LTLIBRARIES += bin/dchroot/libdchroot.la
endif
if BUILD_DCHROOT
-dchroot = dchroot
+dchroot = bin/dchroot/dchroot
endif
-bin_PROGRAMS = $(dchroot)
-
-libdchroot_la_SOURCES = \
- dchroot-main-base.h \
- dchroot-main-base.cc \
- dchroot-session-base.h \
- dchroot-session-base.cc
-libdchroot_la_LIBADD = $(top_builddir)/bin/schroot/libschroot.la
-
-dchroot_SOURCES = \
- dchroot-session.h \
- dchroot-session.cc \
- dchroot-options.h \
- dchroot-options.cc \
- dchroot-main.h \
- dchroot-main.cc \
- dchroot.cc
-dchroot_LDADD = libdchroot.la
-
-install-exec-hook:
+bin_PROGRAMS += $(dchroot)
+
+bin_dchroot_libdchroot_la_SOURCES = \
+ bin/dchroot/dchroot-main-base.h \
+ bin/dchroot/dchroot-main-base.cc \
+ bin/dchroot/dchroot-session-base.h \
+ bin/dchroot/dchroot-session-base.cc
+bin_dchroot_libdchroot_la_LIBADD = $(top_builddir)/bin/schroot/libschroot.la
+
+bin_dchroot_dchroot_SOURCES = \
+ bin/dchroot/dchroot-session.h \
+ bin/dchroot/dchroot-session.cc \
+ bin/dchroot/dchroot-options.h \
+ bin/dchroot/dchroot-options.cc \
+ bin/dchroot/dchroot-main.h \
+ bin/dchroot/dchroot-main.cc \
+ bin/dchroot/dchroot.cc
+bin_dchroot_dchroot_LDADD = $(top_builddir)/bin/dchroot/libdchroot.la
+
+install-exec-hook::
# Install setuid root.
if [ -f "$(DESTDIR)$(bindir)/dchroot" ]; then \
chmod 4755 "$(DESTDIR)$(bindir)/dchroot"; \
diff --git a/bin/schroot-base/Makefile.am b/bin/schroot-base/Makefile.am
index f4037206..39d098ed 100644
--- a/bin/schroot-base/Makefile.am
+++ b/bin/schroot-base/Makefile.am
@@ -19,22 +19,14 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+noinst_LTLIBRARIES += bin/schroot-base/libschroot-base.la
-localedir = $(datadir)/locale
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
-
-noinst_LTLIBRARIES = libschroot-base.la
-
-libschroot_base_la_SOURCES = \
- schroot-base-main.h \
- schroot-base-main.cc \
- schroot-base-option-action.h \
- schroot-base-option-action.cc \
- schroot-base-options.h \
- schroot-base-options.cc \
- schroot-base-run.h
-libschroot_base_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la
+bin_schroot_base_libschroot_base_la_SOURCES = \
+ bin/schroot-base/schroot-base-main.h \
+ bin/schroot-base/schroot-base-main.cc \
+ bin/schroot-base/schroot-base-option-action.h \
+ bin/schroot-base/schroot-base-option-action.cc \
+ bin/schroot-base/schroot-base-options.h \
+ bin/schroot-base/schroot-base-options.cc \
+ bin/schroot-base/schroot-base-run.h
+bin_schroot_base_libschroot_base_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la
diff --git a/bin/schroot-listmounts/Makefile.am b/bin/schroot-listmounts/Makefile.am
index 63a461f8..28ee7e60 100644
--- a/bin/schroot-listmounts/Makefile.am
+++ b/bin/schroot-listmounts/Makefile.am
@@ -19,18 +19,13 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+pkglibexec_PROGRAMS += bin/schroot-listmounts/schroot-listmounts
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
-
-pkglibexec_PROGRAMS = schroot-listmounts
-
-schroot_listmounts_SOURCES = \
- schroot-listmounts-main.h \
- schroot-listmounts-main.cc \
- schroot-listmounts-options.h \
- schroot-listmounts-options.cc \
- schroot-listmounts.cc
-schroot_listmounts_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la
+bin_schroot_listmounts_schroot_listmounts_SOURCES = \
+ bin/schroot-listmounts/schroot-listmounts-main.h \
+ bin/schroot-listmounts/schroot-listmounts-main.cc \
+ bin/schroot-listmounts/schroot-listmounts-options.h \
+ bin/schroot-listmounts/schroot-listmounts-options.cc \
+ bin/schroot-listmounts/schroot-listmounts.cc
+bin_schroot_listmounts_schroot_listmounts_LDADD = \
+ $(top_builddir)/bin/schroot-base/libschroot-base.la
diff --git a/bin/schroot-mount/Makefile.am b/bin/schroot-mount/Makefile.am
index 8d7fab18..b4860987 100644
--- a/bin/schroot-mount/Makefile.am
+++ b/bin/schroot-mount/Makefile.am
@@ -19,21 +19,15 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+pkglibexec_PROGRAMS += bin/schroot-mount/schroot-mount
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
+bin_schroot_mount_schroot_mount_SOURCES = \
+ bin/schroot-mount/schroot-mount-main.h \
+ bin/schroot-mount/schroot-mount-main.cc \
+ bin/schroot-mount/schroot-mount-options.h \
+ bin/schroot-mount/schroot-mount-options.cc \
+ bin/schroot-mount/schroot-mount.cc
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
-
-pkglibexec_PROGRAMS = schroot-mount
-
-schroot_mount_SOURCES = \
- schroot-mount-main.h \
- schroot-mount-main.cc \
- schroot-mount-options.h \
- schroot-mount-options.cc \
- schroot-mount.cc
-
-schroot_mount_LDADD = $(BOOST_FILESYSTEM_LIBS) \
+bin_schroot_mount_schroot_mount_LDADD = $(BOOST_FILESYSTEM_LIBS) \
$(top_builddir)/bin/schroot-base/libschroot-base.la
diff --git a/bin/schroot-releaselock/Makefile.am b/bin/schroot-releaselock/Makefile.am
index 5360dc2c..21e648d3 100644
--- a/bin/schroot-releaselock/Makefile.am
+++ b/bin/schroot-releaselock/Makefile.am
@@ -19,20 +19,14 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
-
if BUILD_BLOCKDEV
-pkglibexec_PROGRAMS = schroot-releaselock
+pkglibexec_PROGRAMS += bin/schroot-releaselock/schroot-releaselock
endif
-schroot_releaselock_SOURCES = \
- schroot-releaselock-main.h \
- schroot-releaselock-main.cc \
- schroot-releaselock-options.h \
- schroot-releaselock-options.cc \
- schroot-releaselock.cc
-schroot_releaselock_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la
+bin_schroot_releaselock_schroot_releaselock_SOURCES = \
+ bin/schroot-releaselock/schroot-releaselock-main.h \
+ bin/schroot-releaselock/schroot-releaselock-main.cc \
+ bin/schroot-releaselock/schroot-releaselock-options.h \
+ bin/schroot-releaselock/schroot-releaselock-options.cc \
+ bin/schroot-releaselock/schroot-releaselock.cc
+bin_schroot_releaselock_schroot_releaselock_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la
diff --git a/bin/schroot-sbuild/Makefile.am b/bin/schroot-sbuild/Makefile.am
index d4661241..eb41cddb 100644
--- a/bin/schroot-sbuild/Makefile.am
+++ b/bin/schroot-sbuild/Makefile.am
@@ -19,25 +19,19 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+schroot_sbuild = bin/schroot-sbuild/schroot-sbuild
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
+bin_PROGRAMS += $(schroot_sbuild)
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
+bin_schroot_sbuild_schroot_sbuild_SOURCES = \
+ bin/schroot-sbuild/schroot-sbuild-session.h \
+ bin/schroot-sbuild/schroot-sbuild-session.cc \
+ bin/schroot-sbuild/schroot-sbuild-main.h \
+ bin/schroot-sbuild/schroot-sbuild-main.cc \
+ bin/schroot-sbuild/schroot-sbuild.cc
+bin_schroot_sbuild_schroot_sbuild_LDADD = $(top_builddir)/bin/schroot/libschroot-all.la
-schroot_sbuild = schroot-sbuild
-
-bin_PROGRAMS = $(schroot_sbuild)
-
-schroot_sbuild_SOURCES = \
- schroot-sbuild-session.h \
- schroot-sbuild-session.cc \
- schroot-sbuild-main.h \
- schroot-sbuild-main.cc \
- schroot-sbuild.cc
-schroot_sbuild_LDADD = $(top_builddir)/bin/schroot/libschroot-all.la
-
-install-exec-hook:
+install-exec-hook::
# Install setuid root.
if [ -f "$(DESTDIR)$(bindir)/schroot-sbuild" ]; then \
chmod 4755 "$(DESTDIR)$(bindir)/schroot-sbuild"; \
diff --git a/bin/schroot/Makefile.am b/bin/schroot/Makefile.am
index 463e20ec..7ce59220 100644
--- a/bin/schroot/Makefile.am
+++ b/bin/schroot/Makefile.am
@@ -19,41 +19,35 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-localedir = $(datadir)/locale
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) -I$(top_srcdir)/bin
-
-LOCAL_DEFS = -DLOCALEDIR=\"$(localedir)\"
-
-noinst_LTLIBRARIES = libschroot.la libschroot-all.la
-
-bin_PROGRAMS = schroot
-
-libschroot_la_SOURCES = \
- schroot-options-base.h \
- schroot-options-base.cc \
- schroot-main-base.h \
- schroot-main-base.cc \
- schroot-main.h \
- schroot-main.cc
-libschroot_la_LIBADD = $(top_builddir)/bin/schroot-base/libschroot-base.la
-
-libschroot_all_la_SOURCES = \
- schroot-options.h \
- schroot-options.cc
-libschroot_all_la_LIBADD = libschroot.la
-
-schroot_SOURCES = \
- schroot.cc
-schroot_LDADD = libschroot-all.la
-
-install-exec-hook:
+noinst_LTLIBRARIES += \
+ bin/schroot/libschroot.la \
+ bin/schroot/libschroot-all.la
+
+bin_PROGRAMS += bin/schroot/schroot
+
+bin_schroot_libschroot_la_SOURCES = \
+ bin/schroot/schroot-options-base.h \
+ bin/schroot/schroot-options-base.cc \
+ bin/schroot/schroot-main-base.h \
+ bin/schroot/schroot-main-base.cc \
+ bin/schroot/schroot-main.h \
+ bin/schroot/schroot-main.cc
+bin_schroot_libschroot_la_LIBADD = $(top_builddir)/bin/schroot-base/libschroot-base.la
+
+bin_schroot_libschroot_all_la_SOURCES = \
+ bin/schroot/schroot-options.h \
+ bin/schroot/schroot-options.cc
+bin_schroot_libschroot_all_la_LIBADD = bin/schroot/libschroot.la
+
+bin_schroot_schroot_SOURCES = \
+ bin/schroot/schroot.cc
+bin_schroot_schroot_LDADD = bin/schroot/libschroot-all.la
+
+install-exec-hook::
# Install setuid root.
chmod 4755 "$(DESTDIR)$(bindir)/schroot"
-install-data-hook:
+install-data-hook::
$(MKDIR_P) $(DESTDIR)$(schroot_sysconf_chrootdir)
$(MKDIR_P) $(DESTDIR)$(schroot_mountdir)
$(MKDIR_P) $(DESTDIR)$(schroot_sessiondir)
diff --git a/configure.ac b/configure.ac
index 268f7016..6e1e447c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,7 +92,7 @@ AC_SUBST([SBUILD_INTERFACE_AGE])
AC_SUBST([SBUILD_BINARY_AGE])
dnl Initialise automake stuff.
-AM_INIT_AUTOMAKE([1.10 gnu -Wno-portability check-news dist-xz no-dist-gzip tar-pax])
+AM_INIT_AUTOMAKE([1.10 gnu -Wno-portability subdir-objects check-news dist-xz no-dist-gzip tar-pax])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
RELEASE_DATE='sbuild_m4_esyscmd_s(date --date='sbuild_m4_esyscmd_s([sed -ne '/^Release-Date:/{s/Release-Date:[[:space:]][[:space:]]*//p;q}' VERSION])' '+%s')'
RELEASE_DATE_S='sbuild_m4_esyscmd_s([sed -ne '/^Release-Date:/{s/Release-Date:[[:space:]][[:space:]]*//p;q}' VERSION])'
@@ -780,32 +780,11 @@ AC_SUBST([BOOST_LIBS])
AC_SUBST([BOOST_FILESYSTEM_LIBS])
dnl Configure which files to generate.
-AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([doc/sbuild.dox])
AC_CONFIG_FILES([doc/schroot.dox])
-AC_CONFIG_FILES([doc/historical/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
-AC_CONFIG_FILES([sbuild/Makefile])
AC_CONFIG_FILES([sbuild/sbuild.pc])
-AC_CONFIG_FILES([bin/Makefile])
-AC_CONFIG_FILES([bin/schroot-base/Makefile])
-AC_CONFIG_FILES([bin/schroot/Makefile])
-AC_CONFIG_FILES([bin/schroot-listmounts/Makefile])
-AC_CONFIG_FILES([bin/schroot-mount/Makefile])
-AC_CONFIG_FILES([bin/schroot-releaselock/Makefile])
-AC_CONFIG_FILES([bin/schroot-sbuild/Makefile])
-AC_CONFIG_FILES([bin/dchroot/Makefile])
-AC_CONFIG_FILES([bin/dchroot-dsa/Makefile])
-AC_CONFIG_FILES([bin/csbuild/Makefile])
-AC_CONFIG_FILES([contrib/Makefile])
-AC_CONFIG_FILES([contrib/setup.d/Makefile])
-AC_CONFIG_FILES([etc/Makefile])
-AC_CONFIG_FILES([etc/pam/Makefile])
-AC_CONFIG_FILES([etc/setup.d/Makefile])
-AC_CONFIG_FILES([etc/bash_completion/Makefile])
-AC_CONFIG_FILES([man/Makefile])
AC_CONFIG_FILES([scripts/po-notify])
-AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([Makefile])
dnl Output the generated config.status script.
AC_OUTPUT
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index cf0fd17c..00000000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-# schroot Makefile template
-#
-#
-# Copyright © 2004-2009 Roger Leigh <rleigh@debian.org>
-#
-# schroot is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# schroot is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#####################################################################
-
-include $(top_srcdir)/scripts/global.mk
-
-SUBDIRS = setup.d
diff --git a/contrib/setup.d/Makefile.am b/contrib/setup.d/Makefile.am
index b0f46e4f..6ee338c5 100644
--- a/contrib/setup.d/Makefile.am
+++ b/contrib/setup.d/Makefile.am
@@ -19,13 +19,11 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+noinst_SCRIPTS += \
+ contrib/setup.d/05customdir \
+ contrib/setup.d/09fsck \
+ contrib/setup.d/10mount-ssh
-noinst_SCRIPTS = \
- 05customdir \
- 09fsck \
- 10mount-ssh
-
-EXTRA_DIST = \
+EXTRA_DIST += \
$(noinst_SCRIPTS)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 38027c93..66e47fe1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,22 +19,18 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-SUBDIRS = historical
-
if BUILD_DOXYGEN
-doc: sbuild schroot
+doc: doc/sbuild doc/schroot
else
doc:
endif
-schroot: schroot.log
-sbuild: sbuild.log
+doc/schroot: doc/schroot.log
+doc/sbuild: doc/sbuild.log
-sbuild.log: sbuild.dox $(top_srcdir)/configure
- $(RM) -rf sbuild/html
- $(DOXYGEN) sbuild.dox
+doc/sbuild.log: doc/sbuild.dox $(top_srcdir)/configure
+ rm -rf doc/sbuild/html
+ $(DOXYGEN) doc/sbuild.dox
touch $@
@UNDOCUMENTED=$$(cat $@); \
if [ -n "$$UNDOCUMENTED" ]; then \
@@ -42,9 +38,9 @@ sbuild.log: sbuild.dox $(top_srcdir)/configure
echo "$$UNDOCUMENTED"; \
fi
-schroot.log: sbuild.log schroot.dox $(top_srcdir)/configure
- $(RM) -rf schroot/html
- $(DOXYGEN) schroot.dox
+doc/schroot.log: doc/sbuild.log doc/schroot.dox $(top_srcdir)/configure
+ rm -rf doc/schroot/html
+ $(DOXYGEN) doc/schroot.dox
touch $@
@UNDOCUMENTED=$$(cat $@); \
if [ -n "$$UNDOCUMENTED" ]; then \
@@ -53,12 +49,12 @@ schroot.log: sbuild.log schroot.dox $(top_srcdir)/configure
fi
-CLEANFILES = \
- sbuild.log \
- schroot.log
+CLEANFILES += \
+ doc/sbuild.log \
+ doc/schroot.log
-clean-local:
- $(RM) -r sbuild
- $(RM) -r schroot
+clean-local::
+ rm -rf doc/sbuild
+ rm -rf doc/schroot
-.PHONY: doc sbuild schroot
+.PHONY: doc doc/sbuild doc/schroot
diff --git a/doc/historical/Makefile.am b/doc/historical/Makefile.am
index 7d32cdf3..95d75663 100644
--- a/doc/historical/Makefile.am
+++ b/doc/historical/Makefile.am
@@ -19,7 +19,5 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-EXTRA_DIST = \
- sbuild-chroot-helper.c
+EXTRA_DIST += \
+ doc/historical/sbuild-chroot-helper.c
diff --git a/doc/sbuild.dox.in b/doc/sbuild.dox.in
index 9f7624da..cf4abbc3 100644
--- a/doc/sbuild.dox.in
+++ b/doc/sbuild.dox.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER = @VERSION@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = sbuild
+OUTPUT_DIRECTORY = doc/sbuild
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
diff --git a/doc/schroot.dox.in b/doc/schroot.dox.in
index 6f11e16f..ab47bea7 100644
--- a/doc/schroot.dox.in
+++ b/doc/schroot.dox.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER = @VERSION@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = schroot
+OUTPUT_DIRECTORY = doc/schroot
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
diff --git a/etc/Makefile.am b/etc/Makefile.am
index 7681be0c..2db452ee 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -19,12 +19,8 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-SUBDIRS = pam setup.d bash_completion
-
-schroot_sysconf_DATA = \
- schroot.conf
+schroot_sysconf_DATA += \
+ etc/schroot.conf
PROFILES = \
buildd \
@@ -33,31 +29,31 @@ PROFILES = \
minimal \
sbuild
-profiles: profiles-stamp
-profiles-stamp: genprofile
- $(MKDIR_P) profiles
+profiles: etc/profiles-stamp
+etc/profiles-stamp: etc/genprofile
+ $(MKDIR_P) etc/profiles
for profile in $(PROFILES); do \
- $(srcdir)/genprofile "$$profile" "$(PLATFORM)" "$(srcdir)/profile-templates" "profiles/$$profile"; \
+ $(srcdir)/etc/genprofile "$$profile" "$(PLATFORM)" "$(srcdir)/etc/profile-templates" "etc/profiles/$$profile"; \
done
touch $@
-all-local: profiles
+all-local:: profiles
-install-data-hook:
+install-data-hook::
for profile in $(PROFILES); do \
$(MKDIR_P) "$(DESTDIR)$(schroot_sysconfdir)/$$profile"; \
- for file in "profiles/$$profile"/*; do \
+ for file in "etc/profiles/$$profile"/*; do \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(schroot_sysconfdir)/$$profile"; \
done; \
done
-clean-local:
- $(RM) -rf profiles
- $(RM) -f profiles-stamp
+clean-local::
+ rm -rf etc/profiles
+ rm -f etc/profiles-stamp
-EXTRA_DIST = \
+EXTRA_DIST += \
$(schroot_sysconf_DATA) \
- genprofile \
- profile-templates
+ etc/genprofile \
+ etc/profile-templates
.PHONY: profiles
diff --git a/etc/bash_completion/Makefile.am b/etc/bash_completion/Makefile.am
index 644560e2..f9969e3a 100644
--- a/etc/bash_completion/Makefile.am
+++ b/etc/bash_completion/Makefile.am
@@ -19,10 +19,8 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
bashcompletion_DATA = \
- schroot
+ etc/bash_completion/schroot
-EXTRA_DIST = \
+EXTRA_DIST += \
$(bashcompletion_DATA)
diff --git a/etc/pam/Makefile.am b/etc/pam/Makefile.am
index 8498b58b..ad272860 100644
--- a/etc/pam/Makefile.am
+++ b/etc/pam/Makefile.am
@@ -19,11 +19,9 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
pamdir = /etc/pam.d
-pam_DATA = schroot
+pam_DATA = etc/pam/schroot
-EXTRA_DIST = $(pam_DATA)
+EXTRA_DIST += $(pam_DATA)
diff --git a/etc/setup.d/Makefile.am b/etc/setup.d/Makefile.am
index be76e61d..521c2dfa 100644
--- a/etc/setup.d/Makefile.am
+++ b/etc/setup.d/Makefile.am
@@ -19,32 +19,30 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
+schroot_setupdata_DATA = \
+ etc/setup.d/common-config \
+ etc/setup.d/common-data \
+ etc/setup.d/common-functions
-schroot_setupdata_DATA = \
- common-config \
- common-data \
- common-functions
+schroot_sysconf_setup_SCRIPTS = \
+ etc/setup.d/00check \
+ etc/setup.d/05file \
+ etc/setup.d/05btrfs \
+ etc/setup.d/05lvm \
+ etc/setup.d/05union \
+ etc/setup.d/10mount \
+ etc/setup.d/15binfmt \
+ etc/setup.d/15killprocs \
+ etc/setup.d/20copyfiles \
+ etc/setup.d/20nssdatabases \
+ etc/setup.d/50chrootname \
+ etc/setup.d/70services
-schroot_sysconf_setup_SCRIPTS = \
- 00check \
- 05file \
- 05btrfs \
- 05lvm \
- 05union \
- 10mount \
- 15binfmt \
- 15killprocs \
- 20copyfiles \
- 20nssdatabases \
- 50chrootname \
- 70services
-
-install-exec-hook:
+install-exec-hook::
$(MKDIR_P) "$(DESTDIR)$(schroot_sysconf_setupdir)"
ln -sf "00check" "$(DESTDIR)$(schroot_sysconf_setupdir)/99check"
-EXTRA_DIST = \
+EXTRA_DIST += \
$(schroot_setupdata_DATA) \
$(schroot_sysconf_setup_SCRIPTS)
diff --git a/man/Makefile.am b/man/Makefile.am
index 481e560c..62b25112 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,19 +19,17 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
# Available translations
LINGUAS=$(shell if [ -n "$(PO4A)" ]; then cat $(srcdir)/po/LINGUAS; fi)
# Actual translatable manual pages (missing pages are not be translated yet)
TRANSMAN = $(shell for MAN in $(foreach LANG,$(LINGUAS),$(addprefix translated/$(LANG)/,$(man_MANS))); do if [ -e "$$MAN.man" ]; then echo $$MAN; fi; done)
-translated/%.man: update-po
+man/translated/%.man: man-update-po
-schroot.ps: $(man_MANS)
+man/schroot.ps: $(man_MANS)
tbl $(man_MANS) | groff -K UTF8 -T ps -man > $@
-%.ps: PSMAN=$(addprefix translated/$(patsubst .%,%,$(suffix $(basename %)))/,$(man_MANS))
+%.ps: PSMAN=$(addprefix man/translated/$(patsubst .%,%,$(suffix $(basename %)))/,$(man_MANS))
%.ps: $(TRANSMAN)
tbl $^ | groff -K UTF8 -T ps -man > $@
@@ -39,57 +37,57 @@ schroot.ps: $(man_MANS)
ps2pdf $< $@
if BUILD_DCHROOT
-dchroot_mans = dchroot.1
+dchroot_mans = man/dchroot.1
endif
if BUILD_DCHROOT_DSA
-dchroot_dsa_mans = dchroot-dsa.1
+dchroot_dsa_mans = man/dchroot-dsa.1
endif
if BUILD_CSBUILD
-csbuild_mans = csbuild.1
+csbuild_mans = man/csbuild.1
endif
MAN_FILES = \
- csbuild.1.man \
- dchroot.1.man \
- dchroot-dsa.1.man \
- schroot.1.man \
- schroot.conf.5.man \
- schroot-faq.7.man \
- schroot-script-config.5.man \
- schroot-setup.5.man
+ man/csbuild.1.man \
+ man/dchroot.1.man \
+ man/dchroot-dsa.1.man \
+ man/schroot.1.man \
+ man/schroot.conf.5.man \
+ man/schroot-faq.7.man \
+ man/schroot-script-config.5.man \
+ man/schroot-setup.5.man
EXPAND = \
- config.man \
- $(srcdir)/authors.man \
- $(srcdir)/copyright.man
-
-man_MANS = \
- schroot.1 \
- schroot-setup.5 \
- schroot.conf.5 \
- schroot-script-config.5 \
- schroot-faq.7 \
+ man/config.man \
+ $(srcdir)/man/authors.man \
+ $(srcdir)/man/copyright.man
+
+man_MANS += \
+ man/schroot.1 \
+ man/schroot-setup.5 \
+ man/schroot.conf.5 \
+ man/schroot-script-config.5 \
+ man/schroot-faq.7 \
$(dchroot_mans) \
$(dchroot_dsa_mans) \
$(csbuild_mans)
-EXTRA_DIST = \
+EXTRA_DIST += \
$(MAN_FILES) \
- authors.man \
- copyright.man \
- po \
- po4a.cfg
+ man/authors.man \
+ man/copyright.man \
+ man/po \
+ man/po4a.cfg
-clean-local:
- rm -rf translated *.ps *.pdf
+clean-local::
+ rm -rf man/translated man/*.ps man/*.pdf
-CLEANFILES = \
- config.man \
+CLEANFILES += \
+ man/config.man \
$(basename $(MAN_FILES)) \
- schroot.ps \
- schroot.pdf
+ man/schroot.ps \
+ man/schroot.pdf
%.1: %.1.man $(EXPAND)
$(SOELIM) -I $(dir $<) -I "$(srcdir)" $< >$@
@@ -109,11 +107,11 @@ CLEANFILES = \
%.7.ps: %.7
groffer -Tps -man <$< >$@
-all-local: update-po $(TRANSMAN)
+all-local:: man-update-po $(TRANSMAN)
-ps: schroot.ps $(addprefix translated/,$(addsuffix /schroot.ps,$(LINGUAS)))
+ps: man/schroot.ps $(addprefix translated/,$(addsuffix /schroot.ps,$(LINGUAS)))
-pdf: schroot.pdf $(addprefix translated/,$(addsuffix /schroot.pdf,$(LINGUAS)))
+pdf: man/schroot.pdf $(addprefix translated/,$(addsuffix /schroot.pdf,$(LINGUAS)))
CONFIG =\
.ds RELEASE_DATE $(RELEASE_DATE_S)\n\
@@ -135,12 +133,12 @@ CONFIG =\
.ds CSBUILD_CONF $(CSBUILD_CONF)\n\
.ds PROGRAM schroot
-config.man: Makefile
+man/config.man: Makefile
echo -e "$(CONFIG)" | sed -e 's/^[ ]//' > $@
-update-po:
- if [ -n "$(PO4A)" ]; then $(PO4A) --package-name $(PACKAGE) --package-version $(VERSION) --copyright-holder "Roger Leigh <rleigh@debian.org>" "--srcdir=$(srcdir)" "--destdir=$(builddir)" "$(srcdir)/po4a.cfg"; fi
+man-update-po:
+ if [ -n "$(PO4A)" ]; then $(PO4A) --package-name $(PACKAGE) --package-version $(VERSION) --copyright-holder "Roger Leigh <rleigh@debian.org>" "--srcdir=$(srcdir)" "--destdir=$(builddir)" "$(srcdir)/man/po4a.cfg"; fi
-dist-hook: update-po
+dist-hook:: man-update-po
-.PHONY: update-po ps pdf
+.PHONY: man-update-po ps pdf
diff --git a/man/po4a.cfg b/man/po4a.cfg
index 2abf921c..07d627b6 100644
--- a/man/po4a.cfg
+++ b/man/po4a.cfg
@@ -1,26 +1,26 @@
-[po_directory] po/
+[po_directory] man/po/
[po4a_alias:man] man opt:"-M UTF-8 -L UTF-8"
-[type: man] authors.man $lang:translated/$lang/authors.man
-[type: man] copyright.man $lang:translated/$lang/copyright.man
-[type: man] schroot.1.man $lang:translated/$lang/schroot.1.man \
+[type: man] man/authors.man $lang:man/translated/$lang/authors.man
+[type: man] man/copyright.man $lang:man/translated/$lang/copyright.man
+[type: man] man/schroot.1.man $lang:man/translated/$lang/schroot.1.man \
add_$lang:?add/$lang.add
-[type: man] schroot-setup.5.man $lang:translated/$lang/schroot-setup.5.man \
+[type: man] man/schroot-setup.5.man $lang:man/translated/$lang/schroot-setup.5.man \
add_$lang:?add/$lang.add
-[type: man] schroot.conf.5.man lang:translated/$lang/schroot.conf.5.man \
+[type: man] man/schroot.conf.5.man lang:man/translated/$lang/schroot.conf.5.man \
add_$lang:?add/$lang.add
-[type: man] schroot-script-config.5.man $lang:translated/$lang/schroot-script-config.5.man \
+[type: man] man/schroot-script-config.5.man $lang:man/translated/$lang/schroot-script-config.5.man \
add_$lang:?add/$lang.add
-[type: man] schroot-faq.7.man $lang:translated/$lang/schroot-faq.7.man \
+[type: man] man/schroot-faq.7.man $lang:man/translated/$lang/schroot-faq.7.man \
add_$lang:?add/$lang.add
-[type: man] dchroot.1.man $lang:translated/$lang/dchroot.1.man \
+[type: man] man/dchroot.1.man $lang:man/translated/$lang/dchroot.1.man \
add_$lang:?add/$lang.add
-[type: man] dchroot-dsa.1.man $lang:translated/$lang/dchroot-dsa.1.man \
+[type: man] man/dchroot-dsa.1.man $lang:man/translated/$lang/dchroot-dsa.1.man \
add_$lang:?add/$lang.add
# The following files could also be offered for translation, maybe separately
-#[type: man] csbuild.1.man $lang:translated/$lang/csbuild.1.man \
+#[type: man] csbuild.1.man $lang:man/translated/$lang/csbuild.1.man \
# add_$lang:?add/$lang.add
diff --git a/sbuild/Makefile.am b/sbuild/Makefile.am
index 22e0f676..2046212f 100644
--- a/sbuild/Makefile.am
+++ b/sbuild/Makefile.am
@@ -19,172 +19,168 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS)
-
-lib_LTLIBRARIES = libsbuild.la
-
-sbuild_public_h_sources = \
- sbuild-auth.h \
- sbuild-auth-null.h \
- sbuild-chroot.h \
- sbuild-chroot-custom.h \
- sbuild-chroot-directory.h \
- sbuild-chroot-directory-base.h \
- sbuild-chroot-facet.h \
- sbuild-chroot-facet-mountable.h \
- sbuild-chroot-facet-personality.h \
- sbuild-chroot-facet-session.h \
- sbuild-chroot-facet-session-clonable.h \
- sbuild-chroot-facet-source.h \
- sbuild-chroot-facet-source-clonable.h \
- sbuild-chroot-facet-userdata.h \
- sbuild-chroot-file.h \
- sbuild-chroot-plain.h \
- sbuild-chroot-config.h \
- sbuild-ctty.h \
- sbuild-custom-error.h \
- sbuild-environment.h \
- sbuild-error.h \
- sbuild-error.tcc \
- sbuild-fdstream.h \
- sbuild-feature.h \
- sbuild-format-detail.h \
- sbuild-i18n.h \
- sbuild-keyfile.h \
- sbuild-keyfile-reader.h \
- sbuild-keyfile-writer.h \
- sbuild-lock.h \
- sbuild-log.h \
- sbuild-mntstream.h \
- sbuild-nostream.h \
- sbuild-parse-error.h \
- sbuild-parse-value.h \
- sbuild-personality.h \
- sbuild-regex.h \
- sbuild-run-parts.h \
- sbuild-session.h \
- sbuild-types.h \
- sbuild-util.h
+lib_LTLIBRARIES = sbuild/libsbuild.la
+
+sbuild_public_h_sources = \
+ sbuild/sbuild-auth.h \
+ sbuild/sbuild-auth-null.h \
+ sbuild/sbuild-chroot.h \
+ sbuild/sbuild-chroot-custom.h \
+ sbuild/sbuild-chroot-directory.h \
+ sbuild/sbuild-chroot-directory-base.h \
+ sbuild/sbuild-chroot-facet.h \
+ sbuild/sbuild-chroot-facet-mountable.h \
+ sbuild/sbuild-chroot-facet-personality.h \
+ sbuild/sbuild-chroot-facet-session.h \
+ sbuild/sbuild-chroot-facet-session-clonable.h \
+ sbuild/sbuild-chroot-facet-source.h \
+ sbuild/sbuild-chroot-facet-source-clonable.h \
+ sbuild/sbuild-chroot-facet-userdata.h \
+ sbuild/sbuild-chroot-file.h \
+ sbuild/sbuild-chroot-plain.h \
+ sbuild/sbuild-chroot-config.h \
+ sbuild/sbuild-ctty.h \
+ sbuild/sbuild-custom-error.h \
+ sbuild/sbuild-environment.h \
+ sbuild/sbuild-error.h \
+ sbuild/sbuild-error.tcc \
+ sbuild/sbuild-fdstream.h \
+ sbuild/sbuild-feature.h \
+ sbuild/sbuild-format-detail.h \
+ sbuild/sbuild-i18n.h \
+ sbuild/sbuild-keyfile.h \
+ sbuild/sbuild-keyfile-reader.h \
+ sbuild/sbuild-keyfile-writer.h \
+ sbuild/sbuild-lock.h \
+ sbuild/sbuild-log.h \
+ sbuild/sbuild-mntstream.h \
+ sbuild/sbuild-nostream.h \
+ sbuild/sbuild-parse-error.h \
+ sbuild/sbuild-parse-value.h \
+ sbuild/sbuild-personality.h \
+ sbuild/sbuild-regex.h \
+ sbuild/sbuild-run-parts.h \
+ sbuild/sbuild-session.h \
+ sbuild/sbuild-types.h \
+ sbuild/sbuild-util.h
if BUILD_PAM
-sbuild_public_auth_pam_h_sources = \
- sbuild-auth-pam-conv.h \
- sbuild-auth-pam-conv-tty.h \
- sbuild-auth-pam.h \
- sbuild-auth-pam-message.h
+sbuild_public_auth_pam_h_sources = \
+ sbuild/sbuild-auth-pam-conv.h \
+ sbuild/sbuild-auth-pam-conv-tty.h \
+ sbuild/sbuild-auth-pam.h \
+ sbuild/sbuild-auth-pam-message.h
endif
if BUILD_BLOCKDEV
sbuild_public_blockdev_base_h_sources = \
- sbuild-chroot-block-device-base.h
+ sbuild/sbuild-chroot-block-device-base.h
sbuild_public_blockdev_h_sources = \
- sbuild-chroot-block-device.h
+ sbuild/sbuild-chroot-block-device.h
endif
if BUILD_LVMSNAP
sbuild_public_blockdev_base_h_sources = \
- sbuild-chroot-block-device-base.h
+ sbuild/sbuild-chroot-block-device-base.h
sbuild_public_lvmsnap_h_sources = \
- sbuild-chroot-lvm-snapshot.h
+ sbuild/sbuild-chroot-lvm-snapshot.h
endif
if BUILD_BTRFSSNAP
sbuild_public_btrfssnap_h_sources = \
- sbuild-chroot-btrfs-snapshot.h
+ sbuild/sbuild-chroot-btrfs-snapshot.h
endif
if BUILD_LOOPBACK
sbuild_public_loopback_h_sources = \
- sbuild-chroot-loopback.h
+ sbuild/sbuild-chroot-loopback.h
endif
if BUILD_UNION
sbuild_public_union_h_sources = \
- sbuild-chroot-facet-union.h
+ sbuild/sbuild-chroot-facet-union.h
endif
if BUILD_UNSHARE
sbuild_public_unshare_h_sources = \
- sbuild-chroot-facet-unshare.h
+ sbuild/sbuild-chroot-facet-unshare.h
endif
-sbuild_public_cc_sources = \
- sbuild-auth.cc \
- sbuild-auth-null.cc \
- sbuild-chroot.cc \
- sbuild-chroot-custom.cc \
- sbuild-chroot-directory.cc \
- sbuild-chroot-directory-base.cc \
- sbuild-chroot-facet-mountable.cc \
- sbuild-chroot-facet-personality.cc \
- sbuild-chroot-facet-session.cc \
- sbuild-chroot-facet-session-clonable.cc \
- sbuild-chroot-facet-source.cc \
- sbuild-chroot-facet-source-clonable.cc \
- sbuild-chroot-facet-userdata.cc \
- sbuild-chroot-file.cc \
- sbuild-chroot-plain.cc \
- sbuild-chroot-config.cc \
- sbuild-ctty.cc \
- sbuild-environment.cc \
- sbuild-feature.cc \
- sbuild-format-detail.cc \
- sbuild-keyfile.cc \
- sbuild-keyfile-reader.cc \
- sbuild-keyfile-writer.cc \
- sbuild-lock.cc \
- sbuild-log.cc \
- sbuild-mntstream.cc \
- sbuild-nostream.cc \
- sbuild-parse-value.cc \
- sbuild-personality.cc \
- sbuild-run-parts.cc \
- sbuild-session.cc \
- sbuild-types.cc \
- sbuild-util.cc
+sbuild_public_cc_sources = \
+ sbuild/sbuild-auth.cc \
+ sbuild/sbuild-auth-null.cc \
+ sbuild/sbuild-chroot.cc \
+ sbuild/sbuild-chroot-custom.cc \
+ sbuild/sbuild-chroot-directory.cc \
+ sbuild/sbuild-chroot-directory-base.cc \
+ sbuild/sbuild-chroot-facet-mountable.cc \
+ sbuild/sbuild-chroot-facet-personality.cc \
+ sbuild/sbuild-chroot-facet-session.cc \
+ sbuild/sbuild-chroot-facet-session-clonable.cc \
+ sbuild/sbuild-chroot-facet-source.cc \
+ sbuild/sbuild-chroot-facet-source-clonable.cc \
+ sbuild/sbuild-chroot-facet-userdata.cc \
+ sbuild/sbuild-chroot-file.cc \
+ sbuild/sbuild-chroot-plain.cc \
+ sbuild/sbuild-chroot-config.cc \
+ sbuild/sbuild-ctty.cc \
+ sbuild/sbuild-environment.cc \
+ sbuild/sbuild-feature.cc \
+ sbuild/sbuild-format-detail.cc \
+ sbuild/sbuild-keyfile.cc \
+ sbuild/sbuild-keyfile-reader.cc \
+ sbuild/sbuild-keyfile-writer.cc \
+ sbuild/sbuild-lock.cc \
+ sbuild/sbuild-log.cc \
+ sbuild/sbuild-mntstream.cc \
+ sbuild/sbuild-nostream.cc \
+ sbuild/sbuild-parse-value.cc \
+ sbuild/sbuild-personality.cc \
+ sbuild/sbuild-run-parts.cc \
+ sbuild/sbuild-session.cc \
+ sbuild/sbuild-types.cc \
+ sbuild/sbuild-util.cc
if BUILD_PAM
-sbuild_public_auth_pam_cc_sources = \
- sbuild-auth-pam-conv.cc \
- sbuild-auth-pam-conv-tty.cc \
- sbuild-auth-pam.cc \
- sbuild-auth-pam-message.cc
+sbuild_public_auth_pam_cc_sources = \
+ sbuild/sbuild-auth-pam-conv.cc \
+ sbuild/sbuild-auth-pam-conv-tty.cc \
+ sbuild/sbuild-auth-pam.cc \
+ sbuild/sbuild-auth-pam-message.cc
endif
if BUILD_BLOCKDEV
sbuild_public_blockdev_base_cc_sources = \
- sbuild-chroot-block-device-base.cc
+ sbuild/sbuild-chroot-block-device-base.cc
sbuild_public_blockdev_cc_sources = \
- sbuild-chroot-block-device.cc
+ sbuild/sbuild-chroot-block-device.cc
endif
if BUILD_LVMSNAP
sbuild_public_blockdev_base_cc_sources = \
- sbuild-chroot-block-device-base.cc
+ sbuild/sbuild-chroot-block-device-base.cc
sbuild_public_lvmsnap_cc_sources = \
- sbuild-chroot-lvm-snapshot.cc
+ sbuild/sbuild-chroot-lvm-snapshot.cc
endif
if BUILD_BTRFSSNAP
sbuild_public_btrfssnap_cc_sources = \
- sbuild-chroot-btrfs-snapshot.cc
+ sbuild/sbuild-chroot-btrfs-snapshot.cc
endif
if BUILD_LOOPBACK
sbuild_public_loopback_cc_sources = \
- sbuild-chroot-loopback.cc
+ sbuild/sbuild-chroot-loopback.cc
endif
if BUILD_UNION
sbuild_public_union_cc_sources = \
- sbuild-chroot-facet-union.cc
+ sbuild/sbuild-chroot-facet-union.cc
endif
if BUILD_UNSHARE
sbuild_public_unshare_cc_sources = \
- sbuild-chroot-facet-unshare.cc
+ sbuild/sbuild-chroot-facet-unshare.cc
endif
pkgincludedir = $(includedir)/sbuild
@@ -199,7 +195,7 @@ pkginclude_HEADERS = \
$(sbuild_public_union_h_sources) \
$(sbuild_public_unshare_h_sources)
-libsbuild_la_SOURCES = \
+sbuild_libsbuild_la_SOURCES = \
$(sbuild_public_h_sources) \
$(sbuild_public_cc_sources) \
$(sbuild_public_auth_pam_h_sources) \
@@ -219,18 +215,18 @@ libsbuild_la_SOURCES = \
$(sbuild_public_unshare_h_sources) \
$(sbuild_public_unshare_cc_sources)
-nodist_libsbuild_la_SOURCES = \
- sbuild-config.h
+nodist_sbuild_libsbuild_la_SOURCES = \
+ sbuild/sbuild-config.h
-libsbuild_la_LIBADD = $(UUID_LIBS) $(PAM_LIBS) $(LOCKDEV_LIBS) $(BOOST_LIBS) $(BOOST_FILESYSTEM_LIBS) $(LIBINTL)
+sbuild_libsbuild_la_LIBADD = $(UUID_LIBS) $(PAM_LIBS) $(LOCKDEV_LIBS) $(BOOST_LIBS) $(BOOST_FILESYSTEM_LIBS) $(LIBINTL)
pkgconfigdatadir = $(libdir)/pkgconfig
-pkgconfigdata_DATA = sbuild.pc
+pkgconfigdata_DATA = sbuild/sbuild.pc
# Uncommment to build an unversioned library (version in soname)
-#libsbuild_version = -release $(SBUILD_VERSION)
+#sbuild_libsbuild_version = -release $(SBUILD_VERSION)
# Uncomment to build a versioned library
-libsbuild_version = -version-info $(SBUILD_CURRENT_INTERFACE):$(SBUILD_INTERFACE_AGE):$(SBUILD_BINARY_AGE)
-libsbuild_la_LDFLAGS = $(libsbuild_version) \
+sbuild_libsbuild_version = -version-info $(SBUILD_CURRENT_INTERFACE):$(SBUILD_INTERFACE_AGE):$(SBUILD_BINARY_AGE)
+sbuild_libsbuild_la_LDFLAGS = $(libsbuild_version) \
-rpath $(libdir) -no-undefined
diff --git a/test/Makefile.am b/test/Makefile.am
index 1586a49d..648b8ad7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -19,194 +19,190 @@
#
#####################################################################
-include $(top_srcdir)/scripts/global.mk
-
-LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin
-
if USE_UNIT_TESTS
-noinst_LTLIBRARIES = libtest.la
-
-noinst_PROGRAMS = \
- sbuild-chroot \
- sbuild-chroot-plain \
- sbuild-chroot-custom \
- sbuild-chroot-file \
- sbuild-chroot-directory \
- sbuild-chroot-block-device \
- sbuild-chroot-loopback \
- sbuild-chroot-lvm-snapshot \
- sbuild-chroot-btrfs-snapshot \
- sbuild-chroot-config \
- sbuild-chroot-facet-userdata \
- sbuild-environment \
- sbuild-keyfile \
- sbuild-lock \
- sbuild-log \
- sbuild-nostream \
- sbuild-parse-value \
- sbuild-personality \
- sbuild-regex \
- sbuild-run-parts \
- sbuild-util \
- schroot-base-option-action
+noinst_LTLIBRARIES += test/libtest.la
+
+noinst_PROGRAMS += \
+ test/sbuild-chroot \
+ test/sbuild-chroot-plain \
+ test/sbuild-chroot-custom \
+ test/sbuild-chroot-file \
+ test/sbuild-chroot-directory \
+ test/sbuild-chroot-block-device \
+ test/sbuild-chroot-loopback \
+ test/sbuild-chroot-lvm-snapshot \
+ test/sbuild-chroot-btrfs-snapshot \
+ test/sbuild-chroot-config \
+ test/sbuild-chroot-facet-userdata \
+ test/sbuild-environment \
+ test/sbuild-keyfile \
+ test/sbuild-lock \
+ test/sbuild-log \
+ test/sbuild-nostream \
+ test/sbuild-parse-value \
+ test/sbuild-personality \
+ test/sbuild-regex \
+ test/sbuild-run-parts \
+ test/sbuild-util \
+ test/schroot-base-option-action
# sbuild-lock is excluded, because it is timing dependent and can fail
# randomly on slow or heavily-loaded systems.
-TESTS = setup-test-data \
- sbuild-chroot \
- sbuild-chroot-plain \
- sbuild-chroot-custom \
- sbuild-chroot-file \
- sbuild-chroot-directory \
- sbuild-chroot-block-device \
- sbuild-chroot-loopback \
- sbuild-chroot-lvm-snapshot \
- sbuild-chroot-btrfs-snapshot \
- sbuild-chroot-config \
- sbuild-chroot-facet-userdata \
- sbuild-environment \
- sbuild-keyfile \
- sbuild-log \
- sbuild-nostream \
- sbuild-parse-value \
- sbuild-personality \
- sbuild-run-parts \
- sbuild-regex \
- sbuild-util \
- schroot-base-option-action \
- cleanup-test-data
+TESTS = test/setup-test-data \
+ test/sbuild-chroot \
+ test/sbuild-chroot-plain \
+ test/sbuild-chroot-custom \
+ test/sbuild-chroot-file \
+ test/sbuild-chroot-directory \
+ test/sbuild-chroot-block-device \
+ test/sbuild-chroot-loopback \
+ test/sbuild-chroot-lvm-snapshot \
+ test/sbuild-chroot-btrfs-snapshot \
+ test/sbuild-chroot-config \
+ test/sbuild-chroot-facet-userdata \
+ test/sbuild-environment \
+ test/sbuild-keyfile \
+ test/sbuild-log \
+ test/sbuild-nostream \
+ test/sbuild-parse-value \
+ test/sbuild-personality \
+ test/sbuild-run-parts \
+ test/sbuild-regex \
+ test/sbuild-util \
+ test/schroot-base-option-action \
+ test/cleanup-test-data
endif
-libtest_la_SOURCES = \
- test-helpers.h \
- testmain.cc
-libtest_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la $(CPPUNIT_LIBS)
+test_libtest_la_SOURCES = \
+ test/test-helpers.h \
+ test/testmain.cc
+test_libtest_la_LIBADD = $(top_builddir)/sbuild/libsbuild.la $(CPPUNIT_LIBS)
if BUILD_BLOCKDEV
-sbuild_chroot_blockdev_sources = \
- sbuild-chroot-block-device.cc
+test_sbuild_chroot_blockdev_sources = \
+ test/sbuild-chroot-block-device.cc
endif
if BUILD_LOOPBACK
-sbuild_chroot_loopback_sources = \
- sbuild-chroot-loopback.cc
+test_sbuild_chroot_loopback_sources = \
+ test/sbuild-chroot-loopback.cc
endif
if BUILD_LVMSNAP
-sbuild_chroot_lvmsnap_sources = \
- sbuild-chroot-lvm-snapshot.cc
+test_sbuild_chroot_lvmsnap_sources = \
+ test/sbuild-chroot-lvm-snapshot.cc
endif
if BUILD_BTRFSSNAP
-sbuild_chroot_btrfssnap_sources = \
- sbuild-chroot-btrfs-snapshot.cc
+test_sbuild_chroot_btrfssnap_sources = \
+ test/sbuild-chroot-btrfs-snapshot.cc
endif
-sbuild_chroot_SOURCES = \
- sbuild-chroot.cc \
- test-sbuild-chroot.h
-sbuild_chroot_LDADD = libtest.la
-
-sbuild_chroot_plain_SOURCES = \
- sbuild-chroot-plain.cc \
- test-sbuild-chroot.h
-sbuild_chroot_plain_LDADD = libtest.la
-
-sbuild_chroot_custom_SOURCES = \
- sbuild-chroot-custom.cc \
- test-sbuild-chroot.h
-sbuild_chroot_custom_LDADD = libtest.la
-
-sbuild_chroot_file_SOURCES = \
- sbuild-chroot-file.cc \
- test-sbuild-chroot.h
-sbuild_chroot_file_LDADD = libtest.la
-
-sbuild_chroot_directory_SOURCES = \
- sbuild-chroot-directory.cc \
- test-sbuild-chroot.h
-sbuild_chroot_directory_LDADD = libtest.la
-
-sbuild_chroot_block_device_SOURCES = \
- $(sbuild_chroot_blockdev_sources) \
- test-sbuild-chroot.h
-sbuild_chroot_block_device_LDADD = libtest.la
-
-sbuild_chroot_lvm_snapshot_SOURCES = \
- $(sbuild_chroot_lvmsnap_sources) \
- test-sbuild-chroot.h
-sbuild_chroot_lvm_snapshot_LDADD = libtest.la
-
-sbuild_chroot_btrfs_snapshot_SOURCES = \
- $(sbuild_chroot_btrfssnap_sources) \
- test-sbuild-chroot.h
-sbuild_chroot_btrfs_snapshot_LDADD = libtest.la
-
-sbuild_chroot_loopback_SOURCES = \
- $(sbuild_chroot_loopback_sources) \
- test-sbuild-chroot.h
-sbuild_chroot_loopback_LDADD = libtest.la
-
-sbuild_chroot_facet_userdata_SOURCES = \
- sbuild-chroot-facet-userdata.cc \
- test-sbuild-chroot.h
-sbuild_chroot_facet_userdata_LDADD = libtest.la
-
-sbuild_chroot_config_SOURCES = sbuild-chroot-config.cc
-sbuild_chroot_config_LDADD = libtest.la
-
-sbuild_environment_SOURCES = sbuild-environment.cc
-sbuild_environment_LDADD = libtest.la
-
-sbuild_keyfile_SOURCES = sbuild-keyfile.cc
-sbuild_keyfile_LDADD = libtest.la
-
-sbuild_lock_SOURCES = sbuild-lock.cc
-sbuild_lock_LDADD = libtest.la
-
-sbuild_log_SOURCES = sbuild-log.cc
-sbuild_log_LDADD = libtest.la
-
-sbuild_nostream_SOURCES = sbuild-nostream.cc
-sbuild_nostream_LDADD = libtest.la
-
-sbuild_parse_value_SOURCES = sbuild-parse-value.cc
-sbuild_parse_value_LDADD = libtest.la
-
-sbuild_personality_SOURCES = sbuild-personality.cc
-sbuild_personality_LDADD = libtest.la
-
-sbuild_regex_SOURCES = sbuild-regex.cc
-sbuild_regex_LDADD = libtest.la
-
-sbuild_run_parts_SOURCES = sbuild-run-parts.cc
-sbuild_run_parts_LDADD = libtest.la
-
-sbuild_util_SOURCES = sbuild-util.cc
-sbuild_util_LDADD = libtest.la
-
-schroot_base_option_action_SOURCES = schroot-base-option-action.cc
-schroot_base_option_action_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la libtest.la
-
-EXTRA_DIST = \
- keyfile.ex1 \
- config.ex1 \
- config.ex2/file \
- config.ex2/empty \
- config.ex2/experimental \
- config.ex2/sarge \
- config.ex2/sid \
- config.ex2/woody \
- config-directory-deprecated.ex \
- config-directory-fail.ex \
- config-directory-valid.ex \
- run-parts.ex1/10test1 \
- run-parts.ex1/20test2 \
- run-parts.ex1/30test3 \
- run-parts.ex2 \
- run-parts.ex3/50invalid \
- setup-test-data \
- cleanup-test-data
-
-clean-local:
- $(srcdir)/cleanup-test-data
+test_sbuild_chroot_SOURCES = \
+ test/sbuild-chroot.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_LDADD = test/libtest.la
+
+test_sbuild_chroot_plain_SOURCES = \
+ test/sbuild-chroot-plain.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_plain_LDADD = test/libtest.la
+
+test_sbuild_chroot_custom_SOURCES = \
+ test/sbuild-chroot-custom.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_custom_LDADD = test/libtest.la
+
+test_sbuild_chroot_file_SOURCES = \
+ test/sbuild-chroot-file.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_file_LDADD = test/libtest.la
+
+test_sbuild_chroot_directory_SOURCES = \
+ test/sbuild-chroot-directory.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_directory_LDADD = test/libtest.la
+
+test_sbuild_chroot_block_device_SOURCES = \
+ $(test_sbuild_chroot_blockdev_sources) \
+ test-test/sbuild-chroot.h
+test_sbuild_chroot_block_device_LDADD = test/libtest.la
+
+test_sbuild_chroot_lvm_snapshot_SOURCES = \
+ $(test_sbuild_chroot_lvmsnap_sources) \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_lvm_snapshot_LDADD = test/libtest.la
+
+test_sbuild_chroot_btrfs_snapshot_SOURCES = \
+ $(test_sbuild_chroot_btrfssnap_sources) \
+ test-test/sbuild-chroot.h
+test_sbuild_chroot_btrfs_snapshot_LDADD = test/libtest.la
+
+test_sbuild_chroot_loopback_SOURCES = \
+ $(test_sbuild_chroot_loopback_sources) \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_loopback_LDADD = test/libtest.la
+
+test_sbuild_chroot_facet_userdata_SOURCES = \
+ test/sbuild-chroot-facet-userdata.cc \
+ test/test-sbuild-chroot.h
+test_sbuild_chroot_facet_userdata_LDADD = test/libtest.la
+
+test_sbuild_chroot_config_SOURCES = test/sbuild-chroot-config.cc
+test_sbuild_chroot_config_LDADD = test/libtest.la
+
+test_sbuild_environment_SOURCES = test/sbuild-environment.cc
+test_sbuild_environment_LDADD = test/libtest.la
+
+test_sbuild_keyfile_SOURCES = test/sbuild-keyfile.cc
+test_sbuild_keyfile_LDADD = test/libtest.la
+
+test_sbuild_lock_SOURCES = test/sbuild-lock.cc
+test_sbuild_lock_LDADD = test/libtest.la
+
+test_sbuild_log_SOURCES = test/sbuild-log.cc
+test_sbuild_log_LDADD = test/libtest.la
+
+test_sbuild_nostream_SOURCES = test/sbuild-nostream.cc
+test_sbuild_nostream_LDADD = test/libtest.la
+
+test_sbuild_parse_value_SOURCES = test/sbuild-parse-value.cc
+test_sbuild_parse_value_LDADD = test/libtest.la
+
+test_sbuild_personality_SOURCES = test/sbuild-personality.cc
+test_sbuild_personality_LDADD = test/libtest.la
+
+test_sbuild_regex_SOURCES = test/sbuild-regex.cc
+test_sbuild_regex_LDADD = test/libtest.la
+
+test_sbuild_run_parts_SOURCES = test/sbuild-run-parts.cc
+test_sbuild_run_parts_LDADD = test/libtest.la
+
+test_sbuild_util_SOURCES = test/sbuild-util.cc
+test_sbuild_util_LDADD = test/libtest.la
+
+test_schroot_base_option_action_SOURCES = test/schroot-base-option-action.cc
+test_schroot_base_option_action_LDADD = $(top_builddir)/bin/schroot-base/libschroot-base.la test/libtest.la
+
+EXTRA_DIST += \
+ test/keyfile.ex1 \
+ test/config.ex1 \
+ test/config.ex2/file \
+ test/config.ex2/empty \
+ test/config.ex2/experimental \
+ test/config.ex2/sarge \
+ test/config.ex2/sid \
+ test/config.ex2/woody \
+ test/config-directory-deprecated.ex \
+ test/config-directory-fail.ex \
+ test/config-directory-valid.ex \
+ test/run-parts.ex1/10test1 \
+ test/run-parts.ex1/20test2 \
+ test/run-parts.ex1/30test3 \
+ test/run-parts.ex2 \
+ test/run-parts.ex3/50invalid \
+ test/setup-test-data \
+ test/cleanup-test-data
+
+clean-local::
+ test/cleanup-test-data
diff --git a/test/cleanup-test-data b/test/cleanup-test-data
index 5e99fcd3..7409a004 100755
--- a/test/cleanup-test-data
+++ b/test/cleanup-test-data
@@ -1,3 +1,5 @@
#!/bin/sh
-rm -rf testdata
+set -e
+
+rm -rf test/testdata
diff --git a/test/setup-test-data b/test/setup-test-data
index 17851492..ab2cac73 100755
--- a/test/setup-test-data
+++ b/test/setup-test-data
@@ -1,7 +1,9 @@
#!/bin/sh
# This script ensures that the test data is owned by root.
-rm -rf testdata
-mkdir testdata
-cp -r ${srcdir}/*.ex* testdata
-chown -R root:root testdata
+set -e
+
+rm -rf test/testdata
+mkdir test/testdata
+cp -r ${srcdir}/test/*.ex* test/testdata
+chown -R root:root test/testdata