Make Mnl

From Biowiki
Jump to: navigation, search

Make options:

  • -k = continue after errors
  • -n = print commands but don't execute

Command line parameters

You can pass them in like so:

	make target PARAM1=foo PARAM2=foo2

Then in the Makefile you can access them as for example, ${PARAM1}. Note that if you invoke a target recursively, these values will still be available.


	target: prerequisite
		 command1; \ # insert tab before each command

Use '@' before the command to prevent it from echoing.


  • $@ = rule target filename
  • $< = name of first rule prerequisite
  • $* = matches the stem '%' portion of the rule target


  • FOOFILES = $(wildcard ./*/foo.afa) // create list of matching files
  • DIRS = $(dir $(FILES)) // create list of directories containing FOOFILES
  • TMPFILES = $(addsuffix tmp.afa, $(DIRS)) // create list of TMPFILES
  • NEWPATH = $(subst align, scan, $(OLDPATH)) // substitute 'scan' for 'align' in OLDPATH


@echo `date` // Use '@' to be silent

-- Yuri Bendana - 31 May 2006