From: Lucas De Marchi Date: Fri, 11 May 2012 03:04:59 +0000 (-0300) Subject: build-sys: copy rootfs to another directory X-Git-Tag: v9~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=452c1dde2f60c585a015478604f2b2d9b8d8f8d3;p=thirdparty%2Fkmod.git 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' --- diff --git a/Makefile.am b/Makefile.am index c6116048..ab3dd4c5 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 431b9b7e..ef7bb2b9 100644 --- a/testsuite/.gitignore +++ b/testsuite/.gitignore @@ -9,3 +9,4 @@ /test-new-module /test-testsuite /test-modprobe +/rootfs-dirty