Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, mine often just defers back to some shell scripts. But it's useful to enumerate them in the Makefile.


If you have a telltale prefix for any internal phony targets (I use "_"), then you can have the Makefile list all the interesting targets itself. Cat the Makefile, print every line matching "^\.PHONY:[[:space:]]*[^_]", then strip out the prefix. Leave any suffix, as you can put a trailing comment in, e.g.,

    .PHONY:build_windows # build for Windows. Supply DEBUG=1 for a debug build
I find this super useful. Even if you remember exactly what the target was called, it still gives you a nice list of words you can double click on to pull into the command line.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: