[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extending gmake to make it less dependant on the shell

From: Matt Lavoie
Subject: Extending gmake to make it less dependant on the shell
Date: Wed, 24 Mar 2004 12:13:42 -0800

Hi there,

I was wondering if the community has considered extending gnu make to make
it less dependent on shells.  I work at NVidia corp and recently moved major
portions of our build over to gnu make.  With a few exceptions, things are
working well.  However, an on going issue is the battle of the shells.

Parts of the code base compile under flavors of unix, windows, macos... It'd
be great if we could share major portions of the makefiles.  The trouble is,
many of the makefiles contain numerous OS and shell specific references.

Even things as simple as 'echo' are different enough to cause problems
across shells.  The usual answer for this is to pair gnumake with a shell
(and a variety of shell tools) to create an entire environment.  (Eg:
Cygwin)  Even in that case though, the spawning of processes (to call those
tools) and the parsing of args often prove OS-dependant.

It occurs to me that there is a core set of simple os-related functions that
makefiles typically use.  The short list below is just an example.  If these
became part of gmake -- the resulting makefiles would be much less reliant
on shells, thus minimizing the conditional code necessary in the makefiles.
[ In addition, the lack of general expression evaluation in gmake also
forces some reliance on the shell's conditional processing. ]

   echo string
   remove file
   remove tree
   make directory (w/ nesting)
   remove directory (w/ recursive + force options)
   copy <file1> <file2>


- Matt Lavoie
  Nvidia, Corp.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]