This document is carried over from when the server library makefiles were implemented in PolyMake and is informative only. In fact, the file reference macros are common to all make grammars.
As a aide to macros that, despite the richness of the Continuus environment, are desirable enhancements to ObjectMake, the following list is annotated with “*** ObjectMake ***”—the other macros being irrelevant to the Continuus environment. These other macros mostly deal with file system access and are not needed because Continuus has full, useful knowledge and understanding of directory relationships, plus, every last file or object can be understood by it.
$@ the name (of the target file) $* the name less its extension (but keeps its path) $< the name (of the source file) from which the target file is built $? the list of all names modified more recently that the target file $** the list of all names regardless of timestamp $() the null string
$[f,<path>,<rootlist>,<ext>] *** ObjectMake ***
—constructs a complete filename including path and extension from the list of file name radicals in rootlist. Thus, where PATHS and OBJS are defined as:
PATH = C:\BIN OBJS = x.obj y.obj z.obj
then...
target: $[f,$(PATH),$(OBJS),.c]
becomes...
target: C:\BIN\x.c C:\BIN\y.c C:\BIN\z.c
$[m,<pattern>,<string-list>] *** ObjectMake ***
—searches string-list for filenames matching pattern and replaces the macro with the list of names which match that pattern. Thus, where FILES is defined as:
FILES = x.c y.h z.h a.c b.h
then...
target: $[m,*.c,$(FILES)]
becomes...
target: x.c a.c
$[r,<string>] *** ObjectMake ***
—extracts the filename radical from string. Thus, where FILE is defined as:
FILE = C:\BIN\poop.c
then...
target: $[r,$(FILE)]
becomes...
target: poop
$[w,<file-specification>]
—creates a list of all the files in the current working directory that match file-specification. Thus, if the current directory is
Volume in drive K is SYS Directory of k:\clib\pin\ansic\intel\src\*.* DOC <DIR> 10-13-93 14:08 MAK <DIR> 10-22-93 9:40 ansic.c 2110 9-29-93 16:23 ansicrpc.def 84 10-04-93 18:25 assert.c 1488 9-29-93 16:21 assert.def 407 9-13-93 14:56 bits.h 1494 9-28-93 15:24 buf.c 2237 9-30-93 14:57 changes 2679 10-04-93 15:38 cleanobj.bat 42 8-17-93 15:22 clib.imp 852 10-04-93 18:28 ctype.c 2895 9-29-93 16:21 libhooks.h 2359 9-30-93 17:11 makefile 2743 9-13-93 16:27 prelude.c 1635 9-29-93 16:21 rules.mak 2033 10-22-93 10:13 setbuf.c 1254 10-04-93 18:27 strcpy.c 1119 9-29-93 16:22 string.def 1924 9-21-93 8:13 27,355 bytes in 18 file(s) 1,171,324,928 bytes free
then...
target: $[w,*.c]
becomes...
target: ansic.c assert.c bug.c ctype.c prelude.c setbuf.c strcpy.c
$[@,<file-specification>] *** ObjectMake ***
—is replaced by a space-delimited list consisting of the contents of the file named by file-specification. Thus, if file ‘sources’ in the local directory contains the following:
ansic.c assert.c bits.h bug.c ctype.c libhooks.h prelude.c setbuf.c strcpy.c
then...
INCLUDES = $[m,*.h,$[@,sources]]
becomes...
INCLUDES = bits.h libhooks.h