Prevent pre-building binary modules for regular .tar.gz archive.
authorshort <>
Sun, 12 Oct 2003 19:23:19 +0000 (19:23 +0000)
committershort <>
Sun, 12 Oct 2003 19:23:19 +0000 (19:23 +0000)
Compatibility with 2.6 Linux kernel.

debian/rules
kernel/Linux/modbin/Makefile.am

index 6f9a3e3..30b6a6d 100755 (executable)
@@ -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
index 94e9c48..24a3378 100644 (file)
@@ -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-*)