Rules.make: SYMTAB objects: unnecessary remake

Russell King (rmk@arm.linux.org.uk)
Sat, 20 Nov 1999 10:55:18 +0000 (GMT)


The following patch fixes a silly bug in the makefiles which causes all
LX_OBJS and OX_OBJS to be remade in a directory if any of them change
(caused by all LX_OBJS and OX_OBJS depending on all of their C equivalents).

GNU make allows:
TARGETS ...: TARGET-PATTERN: DEP-PATTERNS ...
COMMANDS
...

This form is employed here.

Could the kernel makefile hackers check this patch, and if ok, submit it
to Linus please?

--- linux/Rules.make.orig Sat Sep 4 19:00:30 1999
+++ linux/Rules.make Sat Nov 20 10:45:56 1999
@@ -244,7 +244,8 @@
endif # CONFIG_MODVERSIONS

ifneq "$(strip $(SYMTAB_OBJS))" ""
-$(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h $(SYMTAB_OBJS:.o=.c)
+$(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h
+$(SYMTAB_OBJS): %.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(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)))' ; \

_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/