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 <[EMAIL PROTECTED]> 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 _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
