diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2012-05-11 00:04:59 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.de.marchi@gmail.com> | 2012-05-11 02:23:34 -0300 |
commit | 452c1dde2f60c585a015478604f2b2d9b8d8f8d3 (patch) | |
tree | 1af4f9b0d3ab1817d24b56e236b6a3c8dd473412 | |
parent | 9c41596ecc636adb6d05f4da6865452fd549fcec (diff) | |
download | kmod-452c1dde2f60c585a015478604f2b2d9b8d8f8d3.tar.gz |
build-sys: copy rootfs to another directory
We can't use the rootfs directory because it breaks out-of-tree build
and in future we want to make modifications to the fake filesystem such
as adding and removing files.
We need to call "chmod -R +w" in the resulting directory because when we
distribute the source with make dist all files will be readonly.
Fix 'make distcheck'
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | testsuite/.gitignore | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index c611604..ab3dd4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -127,6 +127,9 @@ endif # TESTSUITE # ------------------------------------------------------------------------------ +testsuite/rootfs-dirty: $(top_srcdir)/testsuite/rootfs + $(AM_V_GEN) cp -r $< $@ + TESTSUITE_OVERRIDE_LIBS = testsuite/uname.la testsuite/path.la \ testsuite/init_module.la \ testsuite/delete_module.la @@ -145,14 +148,14 @@ testsuite_init_module_la_SOURCES = testsuite/init_module.c \ testsuite_init_module_la_LIBADD = libkmod/libkmod-private.la TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \ - -DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/testsuite/rootfs/\" \ + -DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/testsuite/rootfs-dirty/\" \ -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" TESTSUITE_LDADD = testsuite/libtestsuite.la libkmod/libkmod-private.la check_LTLIBRARIES += testsuite/libtestsuite.la testsuite_libtestsuite_la_SOURCES = testsuite/testsuite.c \ testsuite/testsuite.h -testsuite_libtestsuite_la_DEPENDENCIES = testsuite/rootfs \ +testsuite_libtestsuite_la_DEPENDENCIES = testsuite/rootfs-dirty \ $(TESTSUITE_OVERRIDE_LIBS) testsuite_libtestsuite_la_CPPFLAGS = $(TESTSUITE_CPPFLAGS) @@ -177,6 +180,11 @@ testsuite_test_new_module_CPPFLAGS = $(TESTSUITE_CPPFLAGS) testsuite_test_modprobe_LDADD = $(TESTSUITE_LDADD) testsuite_test_modprobe_CPPFLAGS = $(TESTSUITE_CPPFLAGS) +testsuite-distclean: + -find testsuite/rootfs-dirty -type d -exec chmod +w {} \; + -$(RM) -rf testsuite/rootfs-dirty + +DISTCLEAN_LOCAL_HOOKS += testsuite-distclean EXTRA_DIST += testsuite/rootfs DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc diff --git a/testsuite/.gitignore b/testsuite/.gitignore index 431b9b7..ef7bb2b 100644 --- a/testsuite/.gitignore +++ b/testsuite/.gitignore @@ -9,3 +9,4 @@ /test-new-module /test-testsuite /test-modprobe +/rootfs-dirty |