manpagez: man pages & more
info autoconf
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.19 Single Suffix Rules and Separated Dependencies

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.


This document was generated on April 26, 2012 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.