2.x.x mkdep incorrectly handles serial.c (and probably others)

Keith Owens (kaos@ocs.com.au)
Sat, 12 Jun 1999 11:19:19 +1000


mkdep is confused by some lines in drivers/char/serial.c and does not
pick up CONFIG dependencies correctly. It only lists these config
dependencies for serial.o.

$(wildcard /usr/src/2.2.9/include/config/serial/console.h) \
$(wildcard /usr/src/2.2.9/include/config/hard/pps.h) \
$(wildcard /usr/src/2.2.9/include/config/pci.h) \
$(wildcard /usr/src/2.2.9/include/config/atomwide/serial.h) \
$(wildcard /usr/src/2.2.9/include/config/dualsp/serial.h)

There are six dependencies missing, it should read

$(wildcard /usr/src/2.2.9/include/config/serial/multiport.h) \
$(wildcard /usr/src/2.2.9/include/config/serial/share/irq.h) \
$(wildcard /usr/src/2.2.9/include/config/hub6.h) \
$(wildcard /usr/src/2.2.9/include/config/serial/many/ports.h) \
$(wildcard /usr/src/2.2.9/include/config/serial/console.h) \
$(wildcard /usr/src/2.2.9/include/config/hard/pps.h) \
$(wildcard /usr/src/2.2.9/include/config/pci.h) \
$(wildcard /usr/src/2.2.9/include/config/serial/detect/irq.h) \
$(wildcard /usr/src/2.2.9/include/config/atomwide/serial.h) \
$(wildcard /usr/src/2.2.9/include/config/dualsp/serial.h)

Changing CONFIG_SERIAL_SHARE_IRQ with no other changes does *not*
recompile serial.c but it should. Changing MANY_PORTS will recompile
serial.o, but only because that hits asm/serial.h. This patch fixes
the problem for serial.c but I have no idea how widespread the problem
is.

--- linux-2.2.9/drivers/char/serial.c Wed, 24 Mar 1999 10:22:04 +1100 keith (linux-2.2/h/b/20_serial.c 1.2 644)
+++ linux/drivers/char/serial.c Sat, 12 Jun 1999 11:10:21 +1000 keith (linux-2.2/h/b/20_serial.c 1.2 644)
@@ -66,16 +66,6 @@
#define CONFIG_SERIAL_NOPAUSE_IO
#define SERIAL_DO_RESTART

-#if 0
-/* Normally these defines are controlled by the autoconf.h */
-
-#define CONFIG_SERIAL_MANY_PORTS
-#define CONFIG_SERIAL_SHARE_IRQ
-#define CONFIG_SERIAL_DETECT_IRQ
-#define CONFIG_SERIAL_MULTIPORT
-#define CONFIG_HUB6
-#endif
-
/* Sanity checks */

#ifdef CONFIG_SERIAL_MULTIPORT

-
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/