Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




11.14 Single Suffix Rules and Separated Dependencies

A Single Suffix Rule is basically a usual suffix (inference) rule (‘’), 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
             cp $< $@
     $ touch
     $ make
     $ ls

while GNU Make does:

     $ gmake
     cp foo
     $ ls
     Makefile  foo

Note it works without the ‘foo:’ dependency.

     $ cat Makefile
     .SUFFIXES: .in
             cp $< $@
     $ make foo
     cp foo

and it works with double suffix inference rules:

     $ cat Makefile
     .SUFFIXES: .in .out
             cp $< $@
     $ make
     cp foo.out

As a result, in such a case, you have to write target rules.

  Published under the terms of the GNU General Public License Design by Interspire