From 438ddb69a32da882c93203bb66a24ce6867ae6a2 Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 12 Oct 2003 19:23:19 +0000 Subject: [PATCH] Prevent pre-building binary modules for regular .tar.gz archive. Compatibility with 2.6 Linux kernel. --- debian/rules | 3 ++- kernel/Linux/modbin/Makefile.am | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/debian/rules b/debian/rules index 6f9a3e3..30b6a6d 100755 --- a/debian/rules +++ b/debian/rules @@ -50,6 +50,7 @@ build-arch: config.status build-arch-stamp build-arch-stamp: dh_testdir $(MAKE) + $(MAKE) -C kernel/Linux/modbin/ modbin touch build-arch-stamp build: build-arch @@ -89,7 +90,7 @@ binary-arch: build install dh_makeshlibs -a dh_installdeb -a # '-X' as it fails on kernel modules: - dh_shlibdeps -a -X.o + dh_shlibdeps -a -X.o -X.ko dh_gencontrol -a dh_md5sums -a dh_builddeb -a diff --git a/kernel/Linux/modbin/Makefile.am b/kernel/Linux/modbin/Makefile.am index 94e9c48..24a3378 100644 --- a/kernel/Linux/modbin/Makefile.am +++ b/kernel/Linux/modbin/Makefile.am @@ -1,20 +1,24 @@ -all-local: *.o - -*.o: +modbin: $(srcdir)/../prepmod --modbindir=. --basedir=$(srcdir)/.. \ - --kernel-gcc-args="-I$(top_srcdir)/include/lufs" \ + --kernel-gcc-args="-I$$PWD/$(top_srcdir)/include/lufs" \ --prebuild \ $(wildcard /usr/src/kernel-headers-*) \ $(wildcard $(top_srcdir)/../kernel-source-*.rpm) -# FIXME: We need double make invocation to properly build files and resolve the wildcard during 'install'! # Keep the basename as 'lufs.o'. # Do not use '$(INSTALL_PROGRAM)' as it would strip the modules. -install-exec-hook: $(wildcard lufs-*.o) - for i in $^;do \ +install-exec-hook: + for i in lufs-*.o;do \ + if test "$$i" = "lufs-*.o";then continue;fi; \ destdir="$(DESTDIR)$(datadir)/lufs/modbin/`basename $$i .o`"; \ $(mkinstalldirs) $$destdir; \ $(INSTALL_DATA) $$i $$destdir/lufs.o; \ done + for i in lufs-*.ko;do \ + if test "$$i" = "lufs-*.ko";then continue;fi; \ + destdir="$(DESTDIR)$(datadir)/lufs/modbin/`basename $$i .ko`"; \ + $(mkinstalldirs) $$destdir; \ + $(INSTALL_DATA) $$i $$destdir/lufs.ko; \ + done -CLEANFILES=$(wildcard lufs-*.o) +CLEANFILES=$(wildcard lufs-*) -- 1.8.3.1