From: Chris Bagwell <ch...@cnpbagwell.com> This is standard concept for automake based systems but kbuild doesn't support it. Add a work around to force src to point to source directory while everything else still points to buid directory.
This allows the very useful "make distcheck" to work. That target builds input-wacom-*.tar.bz2 and validates that it builds, installs, and uninstalls correctly. Much easier then doing that work manually. Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com> --- Does anyone have an older kernel around that they can test this patch with? I think it should work in any 2.6.x or 3.x series linux kernel but thats based only on code review older kernels and not really testing (works good on linux 3.1). I'd really love to get "make distcheck" working with input-wacom so it can do all the hard work of verifying the tar ball as everything packaged correctly. 2.6.30/Makefile.in | 14 +++++++++++--- 2.6.36/Makefile.in | 14 +++++++++++--- 2.6.38/Makefile.in | 14 +++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/2.6.30/Makefile.in b/2.6.30/Makefile.in index eaf3a90..27a65c2 100644 --- a/2.6.30/Makefile.in +++ b/2.6.30/Makefile.in @@ -1,5 +1,12 @@ ############################ 2.6 kernel compile ############################### ifneq ($(KERNELRELEASE),) + +# Try to outsmart kbuild to support build directory being different +# than source directory. This is needed by automake's distcheck +# target. VPATH doesn't work with kbuild because it is really +# building in kernel root directory and using absolute paths. +src := @abs_srcdir@ + # We were called by kbuild # Do NOT indent stuff in this part! It has to be like this to make the # $(error ... ) stuff work @@ -34,10 +41,11 @@ DISTFILES = wacom.h wacom_sys.c wacom_w8001.c wacom_wac.c wacom_wac.h distdir: for file in $(DISTFILES); do \ - cp -fpR ./$$file "$(distdir)" || exit 1; \ + cp -fpR @srcdir@/$$file "$(distdir)" || exit 1; \ done -EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall install-info -EMPTY_AUTOMAKE_TARGETS += installdirs check dvi pdf ps info html tags ctags mostlyclean maintainer-clean +EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall \ + install-info installdirs installcheck check dvi pdf \ + ps info html tags ctags mostlyclean maintainer-clean .PHONY: $(EMPTY_AUTOMAKE_TARGETS) $(EMPTY_AUTOMAKE_TARGETS): diff --git a/2.6.36/Makefile.in b/2.6.36/Makefile.in index eaf3a90..27a65c2 100644 --- a/2.6.36/Makefile.in +++ b/2.6.36/Makefile.in @@ -1,5 +1,12 @@ ############################ 2.6 kernel compile ############################### ifneq ($(KERNELRELEASE),) + +# Try to outsmart kbuild to support build directory being different +# than source directory. This is needed by automake's distcheck +# target. VPATH doesn't work with kbuild because it is really +# building in kernel root directory and using absolute paths. +src := @abs_srcdir@ + # We were called by kbuild # Do NOT indent stuff in this part! It has to be like this to make the # $(error ... ) stuff work @@ -34,10 +41,11 @@ DISTFILES = wacom.h wacom_sys.c wacom_w8001.c wacom_wac.c wacom_wac.h distdir: for file in $(DISTFILES); do \ - cp -fpR ./$$file "$(distdir)" || exit 1; \ + cp -fpR @srcdir@/$$file "$(distdir)" || exit 1; \ done -EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall install-info -EMPTY_AUTOMAKE_TARGETS += installdirs check dvi pdf ps info html tags ctags mostlyclean maintainer-clean +EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall \ + install-info installdirs installcheck check dvi pdf \ + ps info html tags ctags mostlyclean maintainer-clean .PHONY: $(EMPTY_AUTOMAKE_TARGETS) $(EMPTY_AUTOMAKE_TARGETS): diff --git a/2.6.38/Makefile.in b/2.6.38/Makefile.in index eaf3a90..27a65c2 100644 --- a/2.6.38/Makefile.in +++ b/2.6.38/Makefile.in @@ -1,5 +1,12 @@ ############################ 2.6 kernel compile ############################### ifneq ($(KERNELRELEASE),) + +# Try to outsmart kbuild to support build directory being different +# than source directory. This is needed by automake's distcheck +# target. VPATH doesn't work with kbuild because it is really +# building in kernel root directory and using absolute paths. +src := @abs_srcdir@ + # We were called by kbuild # Do NOT indent stuff in this part! It has to be like this to make the # $(error ... ) stuff work @@ -34,10 +41,11 @@ DISTFILES = wacom.h wacom_sys.c wacom_w8001.c wacom_wac.c wacom_wac.h distdir: for file in $(DISTFILES); do \ - cp -fpR ./$$file "$(distdir)" || exit 1; \ + cp -fpR @srcdir@/$$file "$(distdir)" || exit 1; \ done -EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall install-info -EMPTY_AUTOMAKE_TARGETS += installdirs check dvi pdf ps info html tags ctags mostlyclean maintainer-clean +EMPTY_AUTOMAKE_TARGETS = install install-data install-exec uninstall \ + install-info installdirs installcheck check dvi pdf \ + ps info html tags ctags mostlyclean maintainer-clean .PHONY: $(EMPTY_AUTOMAKE_TARGETS) $(EMPTY_AUTOMAKE_TARGETS): -- 1.7.7.3 ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel