At 06:32 PM 11/6/2002 -0500, Paul D. Smith wrote:
I'm using 'ls' simply to get a pretty list in my 'SOURCE.mk' makefile: one file per line, instead of the single line output that $(wildcard ...) generates. More readable.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).
Can you say any more about why $(wildcard ...) is preferred?
Since my rules execute in a shell anyway I don't see much overhead to using 'ls'; it's also a bit easier for developers who know shell programming to maintain makefiles that don't rely too heavily on the Gnu make language.
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.
Good point about temporary files. But that might not always be such a bad tradeoff for the simplicity and ease of use in auto-detection of sources. I think I'll make AUTO_DETECT_SOURCES a configurable option. I prefer to let the user decide this.
My system is not for developers per se. I am using make as a 'black box' in which source files are automatically created in response to high-level user actions. (It's the same problem I have with CVS: I hate to take the time for the admin of adding new files, removing files from the repository so I tend not to check in sources frequently. I would prefer a more flexible system.)
Yes. I was thinking of that but since I need to auto-detect sources I cannot think of a better way.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.
Thanks for the ideas,
Greg Keraunen
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make
