]> git.neil.brown.name Git - history.git/commitdiff
Rules.make: Remove special rule for $(export-objs)
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sun, 12 May 2002 10:54:21 +0000 (05:54 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sun, 12 May 2002 10:54:21 +0000 (05:54 -0500)
We can now remove the extra rule for $(export-objs) and instead
just use

$(export-objs): export_flags := -DEXPORT_SYMTAB

to set a variable $(export_flags) for targets listed in $(export-objs)

Rules.make

index d812f892f2c19588265212e2d3c0b13f1fcb54b9..b75053e41139f159ded25c5e504f4485af17bf3a 100644 (file)
@@ -53,7 +53,9 @@ ALL_SUB_DIRS  := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
 # Common rules
 #
 
-c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F)))
+# export_flags will be set to -DEXPORT_SYMBOL for objects in $(export-objs)
+
+c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(export_flags)
 
 cmd_cc_s_c = $(CC) $(c_flags) -S $< -o $@
 
@@ -311,11 +313,8 @@ endif # CONFIG_MODVERSIONS
 
 ifneq "$(strip $(export-objs))" ""
 
-cmd_cc_o_c_export = $(CC) $(c_flags) -DEXPORT_SYMTAB -c -o $@ $<
-
 $(export-objs): $(TOPDIR)/include/linux/modversions.h
-$(export-objs): %.o: %.c dummy
-       $(call if_changed,cmd_cc_o_c_export)
+$(export-objs): export_flags := -DEXPORT_SYMTAB
 
 endif