Messages in this thread | | | Date | Thu, 5 Dec 1996 20:58:45 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: source dependencies cleanup (Perl)? |
| |
On Thu, 5 Dec 1996, Alan Cox wrote:
> > > There is precedent for this. While you weren't looking, this got stuck > > in the kernel source tree (don't know how long ago, but definitely in > > the 1.3 series): > > > > ratboy:/usr/src/linux# head drivers/scsi/script_asm.pl > > I've nothing against perl. I'd prefer bash if possible for critical stuff. > One reason for this is porting perl and getting it working right when > moving to a new architecture is not trivial. > > Alan >
Maybe it's a stupid question, but why not 'C'? Portability is enhanced and, if it compiles and links, you know the 'C' compiler is installed.
Building a list of dependencies for .c and .S files, although not trivial in any language, seems to me to be something that 'C' would be real good at doing. The executable result will run as fast as directory searches will allow. You will certainly be I/O bound rather than CPU bound. The Gnu Compiler was slow because it is a Compiler. The preprocessor doesn't even eat white-space so there is a lot more "string-stuff" being sifted through than is necessary.
I think that a 'C' program designed to do the job would be the way to go. I have a "depend" program that runs on another platform that makes the "Makefile.tmp" that 'make' actually uses. All the dependencies for all the files in a directory are concatenated with a fixed header to make this Makefile.tmp. It runs very quickly although I have not timed it.
Cheers, Dick Johnson -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard B. Johnson Project Engineer Analogic Corporation Voice : (508) 977-3000 ext. 3754 Fax : (508) 532-6097 Modem : (508) 977-6870 Ftp : ftp@boneserver.analogic.com Email : rjohnson@analogic.com, johnson@analogic.com Penguin : Linux version 2.1.13 on an i586 machine. Warning : It's hard to remain at the trailing edge of technology. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| |