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

The null suffix

Many programs consist of a single source file. make handles this case with a null suffix rule. The following example specifies how to create a file with a null suffix (visualize the null suffix occurring between the given suffix and the colon), from a file with a .c suffix.

   .c:
   	$(CC) $(CFLAGS) $< -o $@
In fact, this .c: rule is internally defined, so no makefile is necessary at all. The user only needs to type:

make cat dd echo date

All of these are UNIX system single-file programs, and all four C language source files are passed through the above shell command line associated with the .c: rule. The internally defined single-suffix rules are:

.c:
.c~:
.s:
.s~:
.f:
.f~:
.sh:
.sh~:
.C:
.C~:

Others may be added to the makefile by the user.


Next topic: Creating new suffix rules
Previous topic: Tildes in SCCS filenames

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