delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/22/06:11:36

To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: SAM AT argonaut DOT demon DOT co DOT uk
Organization: Argonaut Ltd.
Date: 22 Jun 93 10:36:04 GMT
Subject: Re: looking for objects...

This is a `feature' of the original make - targets of the form '.x.y'
do not say anything about dependencies, they are only referenced when
an existing dependency has no rules. ".SUFFIXES" is used to
imply dependencies - The suffix of the current file is found in
the suffixes list, then, moving right along the suffixes, the
first file, if any, that exists will become a prerequisite.

eg:
------ simple makefile -----
all: foo.y bar.y

foo.y: foo.x
    mangle foo.x -o foo.y

bar.y: bar.x
    mangle bar.x -o bar.y

------ use special rules -----
.x.y:
    mangle $< -o $@

all: foo.y bar.y

# Still need these to create dependencies
foo.y: foo.x
bar.y: bar.x

------- use suffixes to create dependencies -----
.SUFFIXES: .y .x
.x.y:
    mangle $< -o $@

all: foo.y bar.y
         ------------------------------------------
Sam Littlewood                                   sam AT argonaut DOT com
Argonaut Software Ltd.                   saml AT cix DOT compulink DOT co DOT uk
         Tel: +44 81 200 5777  Fax: +44 81 200 9866

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019