From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] More 'Sam I am' In-Reply-To: Your message of "Fri, 10 Feb 2006 08:09:47 CST." <8c5fce165415fdcb81e598bfee75740d@quanstro.net> References: <8c5fce165415fdcb81e598bfee75740d@quanstro.net> Date: Fri, 10 Feb 2006 15:17:46 +0000 From: John Stalker Message-ID: <200602101517.aa21844@salmon.maths.tcd.ie> Topicbox-Message-UUID: f989d38e-ead0-11e9-9d60-3106f5b1d025 > i use the change times on files, so writing only the changed files > is important to me. Important to you or to mk? Not that I recommend this as a solution to the problem of writing only changed files, but I tend to write mk recipes like %.dvi:DP false: %.tex %.aux touch md5/$target md5 $prereq >junk/$target while ! cmp -s junk/$target md5/$target do latex $stem.tex junk/$target done rm junk/$target so that the target is rebuilt if the prerequites have really changed rather than if their timestamps have. In the example of LaTeX this is needed for a variety of reasons stemming from the innate stupidity of the program, but I've started doing it for pretty much everything. It's very helpful if, for example, you want to rebuild an old version of the target. The md5 and cmp overhead is tolerable for small projects, but I admit that it scales badly. ps Sorry for giving the p9p version rather the native. -- John Stalker University of Dublin, Trinity College School of Mathematics