On Fri, Oct 01, 1999 at 10:01:24AM -0400, Jonathan Lupa wrote:

> I agree that makefiles are the way to go, but I often like to
> prototype unfamilliar language features before I use them in
> production code.  I guess I'm still screwed if I need to specify
> unweildly include paths or such since all of the responses I have
> gotten are along the lines of "you should do this instead" which is
> leading me to the conclusion that the gnu compiler doesn't support the
> environment variable schlotz that I want to do.

AFAIK it doesn't, and a quick look at the documentation reveals nothing
so you're probably right.  This has always been done by a higher level
tool than the compiler - there's no real need for the compiler to know
about it, and it would probably lead to counterintuitive results if you
forgot you had the environment variables set.

You could still use environment variables if you used make - it has a
number of default rules which will be filled in using them if they're
not in the makefile (and IIRC override the Makefile), so if you say
something like

   export CC=echo
   make foo

and there's a foo.c it will try to build foo from foo.c using a command
like

    $(CC) $(CFLAGS) foo.c -o foo

Take a look at the manual for make - it can probably do what you want
even if you don't write a makefile.  If it doesn't, a shell script wrapper 
around cc probably will.

-- 
Mark Brown  mailto:[EMAIL PROTECTED]   (Trying to avoid grumpiness)
            http://www.tardis.ed.ac.uk/~broonie/
EUFS        http://www.eusa.ed.ac.uk/societies/filmsoc/

Attachment: pgpY9BUxUmgMJ.pgp
Description: PGP signature

Reply via email to