www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/05/01:34:12

Date: Sun, 5 Nov 2000 08:32:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jerzy Klejnowski <dziabol AT polbox DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Make, suffix rules and pattern rules.
In-Reply-To: <3A04A8B0.2D334BD9@polbox.com>
Message-ID: <Pine.SUN.3.91.1001105082901.27000D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 5 Nov 2000, Jerzy Klejnowski wrote:

> The difference arises from the fact, that there was no header file in
> current directory

Then what you saw is expected behavior.

> However, I don't understand why `make' chooses another rule for building
> target depending on existence of some prerequisites.

Because that's how pattern rules work: if the prerequisites don't 
exist, the rule is marked invalid, and Make tries to find a different 
rule that succeeds.  In this case, it finds a built-in rule, so it uses
it.

This is so to allow you to have several pattern rules with different 
prerequisites that build the same target(s).

- Raw text -


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