help-make
[Top][All Lists]
Advanced

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

Re: list of current sources in single-makefile project?


From: Paul D. Smith
Subject: Re: list of current sources in single-makefile project?
Date: Wed, 6 Nov 2002 18:32:59 -0500

The most efficient way to get the list of source files for the entire
project is to have the user specify which files they want to build.

I do not agree with any attempt to "auto-detect" the list of sources
using $(wildcard ...) or whatever (BTW, if you _are_ going to do it you
should most definitely use $(wildcard ...) instead of the strange ls
machinations you're using in your example).

It's too often the case that temporary files, test files, whatever get
built into projects when they didn't want to be.  It's not such a huge
burden that a user has to explicitly add a file to a list if they want
it to become part of the normal build process.


As for directories, yes, make treats them like any other file.  The
gotchas are that directory modification times change far more often than
you want to rebuild the file list: every time a file is added, removed,
or renamed the directory timestamp will change.  Consider that things
like editor backup files, temporary files, build logs, etc. will all
cause your list to be recomputed.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]