2.1.x Makefile bug

Keith Owens (kaos@ocs.com.au)
Sun, 13 Apr 1997 22:31:39 +1000

Some changes to .c files which are defined as OX_OBJS are not detected
by make. This does not affect most people because make dep or make
clean trigger recompilation of OX_OBJS files anyway. The bug only
affects people manually editting the .c files that make up OX_OBJS, the
corresponding .o file is not automatically recompiled. Demonstrate by
"make zImage" then "touch kernel/ksyms.c" and "make zImage" without
make dep clean. ksyms.o is not remade.

Caused by an explicit rule in Rules.make overriding the default rule
%.o: %.c. The default dependency must be added to the explicit rule.

diff -u linux-2.1.32/Rules.make linux/Rules.make
--- linux-2.1.32/Rules.make Sun Apr 6 12:52:06 1997
+++ linux/Rules.make Sun Apr 13 21:51:10 1997
@@ -194,7 +194,7 @@

ifneq "$(strip $(SYMTAB_OBJS))" ""
-$(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h
+$(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h $(SYMTAB_OBJS:.o=.c)
$(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c)