Messages in this thread Patch in this message | | | Date | Fri, 07 Jan 2000 17:04:11 -0800 | From | Randy Dunlap <> | Subject | Re: [linux-usb] [patch] annoying main makefile bug |
| |
Linus,
This top-level Makefile patch to "make modules_install" replaces ls's sorted output with ls | sort just like the following (Makefile) line does echo | tr | sort | comm This causes file names to be listed in the same sort order for input to the comm command, which would be nice.
~Randy
David Waite wrote: > > I do not know if this is usb-related as much as l-k related, but this is > a patch to fix 'make modules_install'. The order that 'sort' spits out > files > is not the same as the order of the files when you do a normal 'ls' > (sorting by name). > > As result, the lists get desynced, and you get duplicate modules in misc > and other groups (in this example, usb.. usbcore.o has been in > $MODLIB/usb > and $MODLIB/misc forever, because of the usb-* entries before it in the > list.) > > This bug has been upsetting me for quite a long time, because I assumed > it has something to do with usb modules getting their own directory after > being in misc originally, not anything as odd as different sort > routines. > > -David Waite--- linux/Makefile.bak Fri Jan 7 01:30:37 2000 +++ linux/Makefile Fri Jan 7 02:03:16 2000 @@ -401,7 +401,7 @@ if [ -f PCMCIA_NET_MODULES ]; then inst_mod PCMCIA_NET_MODULES pcmcia; fi; \ if [ -f PCMCIA_CHAR_MODULES ]; then inst_mod PCMCIA_CHAR_MODULES pcmcia; fi; \ \ - ls *.o > $$MODLIB/.allmods; \ + ls --color=none -1 -U *.o |sort > $$MODLIB/.allmods; \ echo $$MODULES | tr ' ' '\n' | sort | comm -23 $$MODLIB/.allmods - > $$MODLIB/.misc; \ if [ -s $$MODLIB/.misc ]; then inst_mod $$MODLIB/.misc misc; fi; \ rm -f $$MODLIB/.misc $$MODLIB/.allmods; \ | |