make - maintain program groups page 1 NAME make - maintain program groups SYNTAX make [ options ] ... [ -f makefile ] ... file ... DESCRIPTION Makå  executeó  commandó iî makefilå tï updatå onå  oò  morå      targeô names®  Namå ió typicallù á program® Iæ nï -æ optioî      ió present¬  thå defaulô namå 'makefile§ ió used®  Morå thaî      onå -æ optioî maù appear. Makå  updateó á targeô iæ iô dependó oî dependenô fileó thaô      havå beeî modifieä sincå thå targeô waó lasô modified¬ oò iæ      thå targeô doeó noô exist. Makefilå  containó  á  sequencå  oæ  entrieó  thaô   specifù      dependencies®  Thå  firsô  linå  oæ  aî entrù  ió  á  blank-      separateä  lisô oæ targets¬  theî á colon¬  theî á  lisô  oæ      dependenô files®  Alì followinç lineó thaô begiî witè á tab¬      arå commandó tï bå executeä tï updatå thå target®  Iæ á namå      appearó  oî thå lefô oæ morå thaî onå 'colon§ line¬  theî iô      dependó  oî  alì oæ thå nameó oî thå righô oæ thå  coloî  oî      thoså lines¬  buô onlù onå commanä sequencå maù bå specifieä      foò it. Sharp and newline surround comments. Iæ aî inpuô linå ió toï lonç tï fiô oî á singlå linå iô  maù      bå continueä bù uså oæ á backslasè '\§ aó thå lasô characteò      oî thå line. Makefilå  entrieó oæ thå forí 'string± ½ string2§ arå  macrï      definitions®   Subsequenô  appearanceó  oæ  $(string1©  arå      replaceä bù string2®  Iæ string± ió á singlå character¬  thå      parentheseó arå optional. Certaiî  macroó  changå  valuå aó commandó arå  placeä  intï      'execmake.sub'® Theù are: $* - is the prefix of the target name, $@ - is the full target name, and $? - is the list of dependents newer than the target. Finally, '$$' represent a single '$'. make - maintain program groups page 2 A few examples follow: # comments go here and are ignored. macro = definition [a blank line is also ignored] target-1 [target-2] : [dependent list] [\] [command line-1] [command line-2] . . [command line-N] Thå followinç makefilå sayó thaô 'pgm§ dependó oî twï  fileó      'a.o§ anä 'b.o'¬  anä thaô theù iî turî depenä oî '.c§ fileó      anä á commoî filå 'incl'. pgm : a.o b.o ln a.o b.o -lc -o pgm a.o : incl a.c cc -c a.c b.o : incl b.c cc -c b.c The following is an alternate version of the above file. OBJECTS = a.o b.o pgm : $(OBJECTS) ln $(OBJECTS) -lc -o pgm $(OBJECTS) : incl a.o : a.c cc a.c b.o : b.c cc b.c Thå  finaì examplå ió thå mosô compacô anä ió stilì  anotheò      versioî oæ thå samå makefile. OBJECTS = a.o b.o pgm : $(OBJECTS) ln $(OBJECTS) -lc -o pgm $(OBJECTS) : $*.c incl cc $*.c Á  linå  ió  printeä wheî iô ió placeä  intï  'execmake.sub§      unlesó thå speciaì targeô '.SILENT§ ió iî makefile¬  oò  thå      firsô characteò oæ thå commanä ió '@'. Afteò  alì commandó havå beeî placeä intï 'execmake.sub§ thå      submiô filå ió starteä automaticallù unlesó thå '-n§  optioî      haó beeî selected. make - maintain program groups page 3 Other options: -d Display a detailed description of what was processed in the 'makefile'. -n Trace and print, but do not execute the commands needed to update the targets. -t Touch, i.e. update the modified date of targets, without executing any commands. -s Equivalent to the special entry '.SILENT'. FILES makefile - the default input file execmake.sub - the command file that is built NOTES Make is written in Aztec C version 1.06d. Please send any comments/corrections to Tom Morris 1252 Collier Dr. San Leandro, CA 94577 or Tom Morris at Potpourri (408) 378-7474 or ZeeMachine (408) 245-1420