From: Rocky B. <ro...@gn...> - 2011-04-17 14:22:42
|
Have you ever wanted "rake tasks" for GNU Make? That is you have some strange Makefile and you want to see the interesting targets, that you can run "make *target-name*" on? Well I have. So I added it. remake --targets shows a list of explicit target names. Implicit patterns such as those that have % in them are not in this list. As a nod to *rake*, *remake --tasks* does the same thing. Still in the list are file names which are likely to be boring and those extension-matching patterns. So if you want to exclude these from the list, try: remake --tasks | grep -v '/' | grep -v '\.' The longer story is this. Inside the debugger, it is useful to see a list of locations you can stop at or set a breakpoint. This is called "info targets". Run "help info targets" for information on how to run that. After putting this in, I realized it might be interesting just to list the target names. So that was next added. And then I found myself running: echo "info targets name" | remake --debugger This shows also the debugger prompts and has is a little cumbersome, so I added it as an option. Down the line, I will probably split off --targets from --tasks. The later will exclude targets without commands to remake the targets. For example with file names that are supposed to exist and are not derived from some other file would be excluded. Also I should exclude targets that match extensions like *.c.o* |