Makefile: Difference between revisions

→‎Extracting TODO Statements: Credits to Caleb1994 for pointing this one out.
[unchecked revision][unchecked revision]
(interwiki)
(→‎Extracting TODO Statements: Credits to Caleb1994 for pointing this one out.)
Line 181:
<pre>
todolist:
-@for file in $(ALLFILES:Makefile=); do fgrep -H -e TODO -e FIXME $$file; done; true
</pre>
ThisTaking all files in your project, with exception of the Makefile itself, this will ''grep'' all those ''TODO'' and ''FIXME'' comments from your files, and display them in the terminal. It is nice to be remembered of what is still missing before you do a release. To add another keyword, just insert another <code>-e keyword</code>.
 
:'''Note:''' ''$(ALLFILES:Makefile=) is a list of everything in $(ALLFILES), except for the string "Makefile" which is replaced with nothing (i.e., removed from the list). This avoids a self-referring match, where the string "TODO" in the grep command would find itself. (Of course, it also avoids finding any *real* TODO's in the Makefile, but there's always a downside. ;-) )''
 
=== Dependencies, pt. 3 ===
448

edits