Using the make command with source code control system files
The source code control system (SCCS) commands and file system is primarily used to control access to a file, track who altered the file, why it was altered, and what was altered.
An SCCS file is any text file controlled with SCCS commands. Using non-SCCS commands to edit SCCS files can damage the SCCS files.
All SCCS files use the prefix s. to indicate that the files are SCCS files and not regular text files. The make command does not recognize references to prefixes of file names. Therefore, do not refer to SCCS files directly within the make command description file. The make command uses a different suffix, the ~ (tilde), to represent SCCS files. Therefore, .c~.o refers to the rule that transforms an SCCS C language source file into an object file. The internal rule is:
.c~.o:
$(GET) $(GFLAGS) -p $< >$*.c
$(CC) $(CFLAGS) -c $*.c
-rm -f $*.c
The ~ (tilde) added to any suffix changes the file search into an SCCS file-name search, with the actual suffix named by the . (period) and all characters up to (but not including) the ~ (tilde). The GFLAGS macro passes flags to the SCCS to determine which SCCS file version to use.
The make command recognizes the following SCCS suffixes:
Suffix | Description |
---|---|
.C\~ | C++ source |
.c~ | c source |
.y~ | yacc source grammar |
.s~ | Assembler source |
.sh~ | Shell |
.h~ | Header |
.f~ | FORTRAN |
.l~ | lex source |
The make command has internal rules for changing the following SCCS files:
- .C\~.a:
- .C\~.c:
- .C\~.o:
- .c~:
- .c~.a:
- .c~.c:
- .c~.o:
- .f~:
- .f~.a:
- .f~.o:
- .f~.f:
- .h~.h:
- .l~.o:
- .s~.a:
- .sh~:
- .s~.o:
- .y~.c:
- .y~.o: