Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!hp4nl!dutrun!hans From: hans@duttnph.tudelft.nl (Hans Buurman) Newsgroups: comp.bugs.4bsd Subject: Re: make: multiple dependency lines and .. Summary: an explanation Message-ID: <808@dutrun.UUCP> Date: 18 Jul 89 15:51:31 GMT References: <778@dutrun.UUCP> Sender: tnphnws@dutrun.UUCP Reply-To: hans@duttnph.UUCP (Hans Buurman) Organization: Delft University of Technology, The Netherlands Lines: 52 I complained the other day about make, multiple dependency lines and .. . I got one reply from Bradley White (bww@mtxinu.com), which seems only appropriate to share with the net: } The problem in your case though is with code to handle double suffix } rules like: } } .c.o: } cc -c $*.c } } In order to make it possible to redefine these rules, make throws } away all but the last command set for any target that begins with '.'. } } So in your case } } ../dir/foo: } touch file1 ../dir/foo } } ../dir/foo: file1 } } turned into } } ../dir/foo: } } ../dir/foo: file1 } } and so nothing was ever executed. } } The fix? Well, seeing as you can only ever have one rule set on } a ':' target anyway, just make sure it is the last one. That is, } } ../dir/foo: file1 } } ../dir/foo: } touch file1 ../dir/foo } } will work just fine. } (...) } } I too consider the behaviour an aberration, and have proposed changing } the rule for discarding previous command sets to "begins with a '.' } AND doesn't contain a '/'" --- a suffix rule should never have a '/'. Thanks to Bradley White for pointing this out. We agreed that it was a bug indeed. ----------------------------------------------------------------------------- Hans Buurman | hans@duttnph.tudelft.nl Pattern Recognition Group | hans@duttnph.UUCP Faculty of Applied Physics | mcvax!hp4nl!dutrun!duttnph!hans Delft University of Technology | tel. 31 - (0) 15 - 78 46 94