[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: mixed implicit rules problem

From: Martin Dorey
Subject: RE: mixed implicit rules problem
Date: Wed, 29 Mar 2006 14:30:39 -0800

> make could not figure out full graph of implicit rules

>From the info pages:

  4.12.2 Static Pattern Rules versus Implicit Rules
     An implicit rule _can_ apply to any target that matches its
  but it _does_ apply ... only when the prerequisites can be found.

     By contrast, a static pattern rule applies to the precise list of
  targets that you specify in the rule.  It cannot apply to any other
  target and it invariably does apply to each of the targets specified.

YMMV but I got into the habit of always using static pattern rules some
years ago.
Martin's Outlook, BlueArc Engineering

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Yaroslav Halchenko
Sent: Tuesday, March 28, 2006 18:20
To: address@hidden
Subject: mixed implicit rules problem

Dear Makers,

I thought that it is a bug in the recent make since I've first
encountered this situation while fixing RC bug in Debian distro (make of
version 3.80+3.81.rc2-1) but it is also present on slightly older system
running 3.80-9.

To make it short -- here is an example
( taken from my bug report
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351646 )

> cat  Makefile

        ln -snf $$(basename $<) $@

        ln -snf $$(basename $<) $@

a/b/c/lib%.so.1.2: a/b/c/libz%.so
        cat $< >| $@
> rm a/b/c/* -f
> /var/tmp/test# echo 1 > a/b/c/libzz.so.1.2
> /var/tmp/test# make a/b/c/libz.so
make: *** No rule to make target `a/b/c/libz.so'.  Stop.
> /var/tmp/test# make a/b/c/libz.so.1.2
ln -snf $(basename a/b/c/libzz.so.1.2) a/b/c/libzz.so.1
ln -snf $(basename a/b/c/libzz.so.1) a/b/c/libzz.so
cat a/b/c/libzz.so >| a/b/c/libz.so.1.2
rm a/b/c/libzz.so a/b/c/libzz.so.1
> /var/tmp/test# make a/b/c/libz.so
ln -snf $(basename a/b/c/libz.so.1.2) a/b/c/libz.so.1
ln -snf $(basename a/b/c/libz.so.1) a/b/c/libz.so
rm a/b/c/libz.so.1

As you can see, make could not figure out full graph of implicit rules
on how to derive libz.so from libzz.so.1.2.

Please advise -- is it me not fully understanding something or there is
something to fix? 

Please CC in replies - I am not on any list

Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Office: (973) 353-5440x263 | FWD: 82823 | Fax: (973) 353-1171
        101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07105
Student  Ph.D. @ CS Dept. NJIT

reply via email to

[Prev in Thread] Current Thread [Next in Thread]