Fixed pre-built modules to be recognized with proper name 'lufs'.
authorshort <>
Thu, 21 Aug 2003 11:34:05 +0000 (11:34 +0000)
committershort <>
Thu, 21 Aug 2003 11:34:05 +0000 (11:34 +0000)
kernel/Linux/modbin/Makefile.am

index d808e45..4b2c5e0 100644 (file)
@@ -1,9 +1,3 @@
-modbindir=$(datadir)/lufs/modbin
-
-# FIXME: We need double make invocation to properly build files and resolve the wildcard during 'install'!
-modbin_DATA=$(wildcard lufs-*.o)
-CLEANFILES=$(modbin_DATA)
-
 all-local: *.o
 
 *.o:
@@ -13,3 +7,14 @@ all-local: *.o
                        $(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 \
+               destdir="$(DESTDIR)$(datadir)/lufs/modbin/`basename $$i .o`"; \
+               $(mkinstalldirs) $$destdir; \
+               $(INSTALL_DATA) $$i $$destdir/lufs.o; \
+               done
+
+CLEANFILES=$(wildcard lufs-*.o)