[PATCH] mkdep patch in 2.4.21-pre4-ac7 breaks pci/drivers

From: Pavel Roskin (proski@gnu.org)
Date: Mon Mar 03 2003 - 04:00:54 EST


Hello!

This patch works for me and doesn't require any changes in mkdep. I
believe it's the right thing to do. The rule for names.o already exists
in the Makefile. The only problem with it is that it's misplaced - it
should precede the generated dependencies.

GNU make just concatenates the lists of dependencies and tries to create
the dependencies in the order is which they appear in the makefile. If
devlist.h without path is first, then make will create it because there is
a rule for that. Thn make will see that devlist.h with path is already
up-to-date.

On the other hand, if devlist.h with path is first, then make won't know
how to create it and will abort rather than go to the next target.

This patch has been tested and works for me. How to test:

make oldconfig
make clean
make depend
make bzImage
make depend
make clean
make bzImage

It works fine now. Patch:

==============================
--- linux.orig/drivers/pci/Makefile
+++ linux/drivers/pci/Makefile
@@ -35,10 +35,10 @@
 obj-y += syscall.o
 endif

-include $(TOPDIR)/Rules.make
-
 names.o: names.c devlist.h classlist.h

+include $(TOPDIR)/Rules.make
+
 devlist.h classlist.h: pci.ids gen-devlist
         ./gen-devlist <pci.ids

==============================

The patch fixes the problem in Alan's 2.4 series, but it can be safely
applied to the Marcelo's 2.4 branch as well.

-- 
Regards,
Pavel Roskin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:20 EST