On Mon, 2009-09-28 at 13:50 -0700, Michael Morrell wrote:
> I was wide open to ideas on ways people deal with not wanting to
> hardcode a list of source filenames in the Makefiles.  I thought this
> was common enough that perhaps there was a builtin make function to
> help out (I did look through the manual and didn't see anything, but I
> could have easily missed it).

Actually, this behavior is discouraged (at least by me).  In reality
there's NO completely reliable way to automatically determine what
source files you want to build: there could always be backup files or
test files or other temporary files that happen to match whatever
pattern you come up with.

In my book, a build system that is not completely reliable is very, very
bad.

Whenever I'm asked about this I _always_ say, just list the files you
want to build explicitly in your makefile, or somewhere.  It's not
onerous to keep this list up to date (how often are brand new files
added, anyway?) and it saves a lot of headache and hassle.


However, obviously YMMV.

Cheers!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email protected]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to