DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Managing file interactions with make

Source code control system file names

The syntax of make does not directly permit referencing of prefixes. For most types of files on UNIX operating system machines, this is acceptable since nearly everyone uses a suffix to distinguish different types of files. SCCS files are the exception. Here, s. precedes the file name part of the complete path name.

To allow make easy access to the prefix s. the symbol ``~'' is used as an identifier of SCCS files. Hence, .c~.o refers to the rule which transforms an SCCS C language source file into an object file. Specifically, the internal rule is

   .c~.o:
           $(GET) $(GFLAGS) $<
           $(CC) $(CFLAGS) -c $*.c
           rm -f $*.c

Thus, ~ appended to any suffix transforms the file search into an SCCS file name search with the actual suffix named by the dot and all characters up to (but not including) ~.

The following SCCS suffixes are internally defined:


.c~
.y~
.l~
.s~

.sh~
.h~
.f~

.C~
.Y~
.L~

The following rules involving SCCS transformations are internally defined:


.c~:
.c~.c:
.c~.a:
.c~.o:
.y~.c:
.y~.o:
.y~.y:
.l~.c:
.l~.o:
.l~.l:
.s~:

.s~.s:
.s~.a:
.s~.o:
.sh~:
.sh~.sh:
.h~.h:
.f~:
.f~.f:
.f~.a:
.f~.o:

.C~:
.C~.C:
.C~.a:
.C~.o:
.Y~.C:
.Y~.o:
.Y~.Y:
.L~.C:
.L~.o:
.L~.L:

Obviously, the user can define other rules and suffixes that may prove useful. The ~ provides a handle on the SCCS file name format so that this is possible.


Next topic: The null suffix
Previous topic: Archive libraries

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004