Next: Timestamp Resolution and Make, Previous: VPATH
and Make, Up: Portable Make Programming [Contents][Index]
A Single Suffix Rule is basically a usual suffix (inference) rule (‘.from.to:’), but which destination suffix is empty (‘.from:’).
Separated dependencies simply refers to listing the prerequisite of a target, without defining a rule. Usually one can list on the one hand side, the rules, and on the other hand side, the dependencies.
Solaris make
does not support separated dependencies for
targets defined by single suffix rules:
$ cat Makefile .SUFFIXES: .in foo: foo.in .in: cp $< $@ $ touch foo.in $ make $ ls Makefile foo.in
while GNU Make does:
$ gmake cp foo.in foo $ ls Makefile foo foo.in
Note it works without the ‘foo: foo.in’ dependency.
$ cat Makefile .SUFFIXES: .in .in: cp $< $@ $ make foo cp foo.in foo
and it works with double suffix inference rules:
$ cat Makefile foo.out: foo.in .SUFFIXES: .in .out .in.out: cp $< $@ $ make cp foo.in foo.out
As a result, in such a case, you have to write target rules.