help-make
[Top][All Lists]
Advanced

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

Re: auto-dep cannot possibly work?


From: Paul Smith
Subject: Re: auto-dep cannot possibly work?
Date: Mon, 16 Nov 2009 21:50:46 -0500

On Mon, 2009-11-16 at 19:55 -0500, Mike Shal wrote:
> d! How the heck should you or I know what files need to be modified
> just because a new header was added?

Are you kidding me?  You BETTER darn well know.  Otherwise, your code
will not compile, or even worse it may compile but give you completely
incorrect results.  You can't just go around adding headers without
knowing what impact that will have on the code!  For heaven's sake it's
hard enough to maintain large projects WITHOUT having to examine the
preprocessor output of every source file to figure out if you're
including the headers you thought you were, or completely different ones
that just happened to be on the include path somewhere.

You guys are talking about an environment that FACILITATES bad coding
practices and ENABLES difficult, time-wasting bugs.

If you're into that, go for it.  If it were me, I'd be trying to
encourage people to not do stupid things in my code base, and if that
means forcing them to do extra work to get correct results when they do
stupid things I'd call that a win, not a bug in the tool.


But, you seem to have discovered a way to do what you want and this
discussion has moved away from technical solutions into the murky realm
of process and "best practices", so it seems a good place to stop.


PS. I have actually used duplicate header names in one situation:
portability.  Having the same header file appear in different
directories based on the target platform, and choosing which you want
via -I options through make rather than a horde of #ifdefs in the code
can indeed be a powerful capability.  But in this case, again, these
files can only be changed with the utmost care and consideration for all
the places they might break things.  Extra effort does not bother me at
all, especially if it forces people to be more careful.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist





reply via email to

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