From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <93eda9166703582e977be5cb09aabf48@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] mk surprises me From: David Gordon Hogan MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 28 Mar 2002 09:52:23 -0500 Topicbox-Message-UUID: 6f03ac68-eaca-11e9-9e20-41e7f4b1d025 > the behaviour i expect (cp f1.c f1, even when f1.c was older than f1, > provided that hdr.h was younger than f1) is the one described in > plan9v2 documentation. admitedly your suspicion sounds much more > logical than the documenation. > i have (as well as i can) copied the contents of the mkfile from the book. > perhaps this is an error in the book? (there are others). I can not find your example in the documentation. Could you please provide a reference? (Name of paper and section name, please). I did find the following rule in an example: %.$O: hdr.h but of course, this avoids the mistake of making _everything_ depend on hdr.h which your example contains. > or, is there a difference between plan9 mk and inferno mk for host systems? Not of this magnitude. Your example should behave the same way on both. Charles' diagnonis of the problem is correct, that you have effectively made f1.c depend on hdr.h, but not provided a recipe for making f1.c, hence if hdr.h is more recent than f1.c, mk complains. The solution is to change the rule so that the source file f1.c doesn't depend on hdr.h.