|
From: | Dan Kegel |
Subject: | Re: Why is 'make -e' "not recommended practice"? |
Date: | Fri, 08 Jul 2005 06:26:17 -0700 |
User-agent: | Mozilla/4.0 (compatible;MSIE 5.5; Windows 98) |
Greg Chicares wrote:
I'm working with someone who wants to do this: $export CFLAGS="set_in_environment" $make -f make_0 CFLAGS = -g I understand why that example works that way, but my friend wants his environment setting to prevail, without requiring 'make -e': he thinks any other behavior is astonishing. ... Am I missing some obvious solution?
Yup. Have him specify the flags on the commandline: $ make -f make_0 CFLAGS="-g" By the way, it's standard practice in some circles to have the Makefile's CFLAGS include $EXTRA_CFLAGS or something like that, where EXTRA_CFLAGS is empty. That way the user can *add* flags easily by overriding EXTRA_CFLAGS. - Dan -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html
[Prev in Thread] | Current Thread | [Next in Thread] |