A full file specification gives the base name of the file, the file-name extension, and the path. The path provides the disk-drive identifier and the sequence of directories needed to locate the file on the disk.
For example, the file specification:
C:\SOURCE\PROG\SORT.OBJ
has the following parts:
Path Name C:\SOURCE\PROG Base File Name SORT File-Name Extension .OBJ
Characters That Modify File
Specification Macros
The following six macros all resolve to a file specification (or
possibly several file specifications for $** and $?):
$* $@ $** $< $? $$@
You can append characters to any of these macros to modify the file name returned by the macro. Depending on which character you use, parts of the full file specification are returned:
Appended Character
| File Part Returned | D | F | B | R |
| File Path | Yes | No | No | Yes |
| Base File Name | No | Yes | Yes | Yes |
| File Name Extension | No | Yes | No | No |
If the macro $@ has the value
C:\SOURCE\PROG\SORT.OBJ
then:
| Macro | Returns: | |
| $(@D) | C:\SOURCE\PROG | |
| $(@F) | SORT.OBJ | |
| $(@B) | SORT | |
| $(@R) | C:\SOURCE\PROG\SORT |
Note: Modified macros are always longer than a single character -- they must be enclosed by parentheses. The only exceptions to this rule are the predefined macros $** and $$@.
![]()
Predefined
Make Utility Macros