Liste des Groupes | Revenir à ca embedded |
David Brown <david.brown@hesbynett.no> wrote:That's true.On 18/03/2025 19:28, Michael Schwingen wrote:In project with about 550 normal source files, 80 headers, 200 testOn 2025-03-18, David Brown <david.brown@hesbynett.no> wrote:>>A good makefile picks up the new files automatically and handles all the>
dependencies, so often all you need is a new "make -j".
I don't do that anymore - wildcards in makefiles can lead to all kinds of
strange behaviour due to files that are left/placed somewhere but are not
really needed.
I'm sure you can guess the correct way to handle that - don't leave
files in the wrong places :-)
>I prefer to list the files I want compiled - it is not that>
much work.
>
In a project of over 500 files in 70 directories, it's a lot more work
than using wildcards and not keeping old unneeded files mixed in with
source files.
files, about 1200 generated files spread over 12 directories I use
explicit file lists. Lists of files increase volume of Makefile-s,
but in my experience extra work to maintain file list is very small.
Compared to effort needed to create a file, adding entry to file list
is negligible.
Explicit lists are useful if groups of files should get somewhatI do sometimes have explicit lists for /directories/ - but not for files. I often have one branch in the source directory for my own code, and one branch for things like vendor SDKs and third-party code. I can then use stricter static warnings for my own code, without triggering lots of warnings in external code.
different treatment (I have less need for this now, but it was
important in the past).
IMO being explicit helps with readablity and make code moreA simple rule of "all files are in the project" is more amenable to audit.
amenable to audit.
Les messages affichés proviennent d'usenet.