MakeHelp

How to use GNU Make

If you haven't already, read the documentation HTML file: http://www.gnu.org/software/make/manual/make.html . It's pretty short, and it will teach you about the weird mysteries of Make.

Seriously, read the documentation (it will take about a half hour to get the essential points), unless you already know what every bizarre symbol in this means:
%.o : %.c defs.h hack.h
   cc -c $(CFLAGS) $

Most importantly: Make cares about tabs vs. spaces. So make sure your editor highlights tabs specially. Do you use emacs or vi? Then there is a way to make tabs actually show up on your editor. Josh has it working for vi, and Alex has it working for emacs. A link to the specifics should go here at some point...

quick.mak / recurse.mak: Including these gives a framework for recursively running experiments and procedures.
  • You set the variables targets, CHILDREN, and CHILD_MAKEFILE, and Make handles things for you.
  • recurse.mak is supposed to be a newer version of quick.mak. It should be backwards-compatible, but quick.mak is still around to avoid breaking old Makefiles. recurse.mak has the advantages of being much shorter and of supporting early_targets (these are targets that are generated before we recursively generate the children). quick.mak always works bottom-up, but recurse.mak lets you do it either way.

All of our Make templates are located in /projects/sysbio/map/Templates/Make/.

-- Main.alexgw - 25 Jun 2007