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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

11.14 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 $< [email protected]
     $ 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 $< [email protected]
     $ 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 $< [email protected]
     $ make
     cp foo.in 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