> 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
pattern,
  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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Yaroslav Halchenko
Sent: Tuesday, March 28, 2006 18:20
To: bug-make@gnu.org
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
SO=1
T=2
VER=$(SO).$(T)

lib%.so:lib%.so.$(SO)
        ln -snf $$(basename $<) $@

lib%.so.$(SO):lib%.so.$(VER)
        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


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to