DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
make

Creating new suffix rules

Both significant suffix rules and the rules used in transforming files of one suffix-type into another can be modified. Including the following line in the makefile adds .q, .w, .t to the list of available suffixes:

   .SUFFIXES : .q .w .t
To delete all currently recognized suffixes, add this line:
   .SUFFIXES :
Therefore, the combination of the two lines replaces the current suffixes with .q, .w, and .t:
   .SUFFIXES :
   .SUFFIXES : .q .w .t


NOTE: Be sure to include spaces or tabs between each suffix on the .SUFFIXES line.

To define new suffix rules, simply add the rules to the makefile. This appears as a normal entry. For example, make is required to help maintain a set of text files requiring formatting and printing. Add the suffixes and define suffix rules as follows:

   .SUFFIXES :
   .SUFFIXES : .s .t .l
   TBL = tbl
   EQN = eqn
   NEQN= neqn
   ROFFARGS =
   

.s.l : #format troff -ms source file for line printer $(TBL) $<|$(NEQN)| troff -ms -e -Tlp -u5 $(ROFFARGS)>$*.l .s.t : #format troff -ms source file for terminal $(TBL) $<|$(NEQN)| troff -ms -e -Tlp -u5 $(ROFFARGS)| ul -i>$*.t .s.a : #format troff -ms source file for apple laser printer $(TBL) $<|$(EQN)| troff -ms -e -Tspc $(ROFFARGS)>$*.a

The first line of the makefile nullifies the default suffix rule of make. The second line establishes three suffixes as significant. These suffixes are interpreted as .s suffixes, indicating their use of the -ms formatting macros. The first entry declares how to make a .l file out of an .s file. That provides the rule for converting a source file containing -ms macros into a formatted output file for a line printer. Similarly, the third entry describes how to create a .a file (for output to a laser printer). These rules work in the same manner as regular entries: the second suffix belongs to the `target' and the first suffix belongs to the `component'.
Next topic: include files
Previous topic: The null suffix

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003