Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.5.11 /Rules.make

Filename:/Rules.make
Lines Added:12
Lines Deleted:7
Also changed in: (Previous) 2.5.9  2.5.8  2.5.8-pre3  2.5.8-pre2  2.5.8-pre1  2.5.7 
(Following) 2.5.13  2.5.17  2.5.18  2.5.19  2.5.20  2.5.21 

Location
[  2.5.11
   o  Rules.make

Patch

diff -Nru a/Rules.make b/Rules.make
--- a/Rules.make   Sun Apr 28 20:10:35 2002
+++ b/Rules.make   Sun Apr 28 20:10:35 2002
@@ -19,7 +19,6 @@
 unexport ALL_SUB_DIRS
 unexport MOD_SUB_DIRS
 unexport O_TARGET
-unexport ALL_MOBJS
 
 unexport obj-y
 unexport obj-m
@@ -34,6 +33,12 @@
 comma   := ,
 
 #
+# When an object is listed to be built compiled-in and modular,
+# only build the compiled-in version
+#
+obj-m := $(filter-out $(obj-y),$(obj-m))
+
+#
 # Get things started.
 #
 first_rule: sub_dirs
@@ -182,8 +187,7 @@
 #
 # A rule to make modules
 #
-ALL_MOBJS = $(filter-out $(obj-y), $(obj-m))
-ifneq "$(strip $(ALL_MOBJS))" ""
+ifneq "$(strip $(obj-m))" ""
 MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
 endif
 
@@ -200,14 +204,14 @@
 endif
 
 .PHONY: modules
-modules: $(ALL_MOBJS) dummy \
+modules: $(obj-m) dummy \
     $(patsubst %,_modsubdir_%,$(MOD_DIRS))
 
 .PHONY: _modinst__
 _modinst__: dummy
-ifneq "$(strip $(ALL_MOBJS))" ""
+ifneq "$(strip $(obj-m))" ""
    mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR)
-   cp $(ALL_MOBJS) $(MODLIB)/kernel/$(MOD_DESTDIR)$(MOD_TARGET)
+   cp $(obj-m) $(MODLIB)/kernel/$(MOD_DESTDIR)
 endif
 
 .PHONY: modules_install
@@ -304,7 +308,8 @@
 endif # CONFIG_MODVERSIONS
 
 ifneq "$(strip $(export-objs))" ""
-$(export-objs): $(export-objs:.o=.c) $(TOPDIR)/include/linux/modversions.h
+$(export-objs): $(TOPDIR)/include/linux/modversions.h
+$(export-objs): %.o: %.c
    $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=+
.c)
    @ ( \
        echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB)),$$(strip $$(subst $$(comma),+
:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@) -DEXPORT_SYMTAB)))' ; \


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.