From owner-cvs-src@FreeBSD.ORG Sat Apr 23 01:25:29 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4B0D16A4CE; Sat, 23 Apr 2005 01:25:29 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32D8843D41; Sat, 23 Apr 2005 01:25:29 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j3N1NYkQ046584; Fri, 22 Apr 2005 19:23:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 22 Apr 2005 19:23:33 -0600 (MDT) Message-Id: <20050422.192333.91757691.imp@bsdimp.com> To: marcel@xcllnt.net From: "M. Warner Losh" In-Reply-To: <94969eabff134918730e7dcead17bb51@xcllnt.net> References: <20050422203437.GB50191@ip.net.ua> <94969eabff134918730e7dcead17bb51@xcllnt.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: ru@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/config main.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2005 01:25:30 -0000 In message: <94969eabff134918730e7dcead17bb51@xcllnt.net> Marcel Moolenaar writes: : On Apr 22, 2005, at 1:34 PM, Ruslan Ermilov wrote: : : >>> I personally fail to see how this can be solved... :-( : >> : >> Ok, what about this: : >> mkdep(1) creates lines of the form : >> : >> foo.o: foo.c inc1.h inc2.h : >> : >> Would this problem be solved if mkdep(1) created lines like: : >> : >> foo.o .depend: foo.c inc1.h inc2.h : >> : >> or equivalent? : >> : >> Would something else break if we do that? : >> : > I fail to see what this gives us, except for also breaking : > "make .depend" when .depend is present and inc2.h disappears. : : True, there is a phase ordering problem. But isn't that something : that can be worked around by making the necessary adjustments to : make(1). The adjustments would be that if .depend is out of : date, it is being made without making any sources that are out : of date (or missing). This may require adding a special source : to the mix of special sources that make(1) already has: .SOFTDEP : or something like that. One can also hardcode this special case, : but that seems ugly. Looks like Justin's changes just make the problem worse. It make the make depend fail, where before it would just fail to generate a new .depend file. The only thing that has a chance of working would be something like: ALLDEPENDS= beforebeforedepend: .for __i in ${ALLDEPENDS} .if !exists($__i) F := $F $__i .endif .endfor .if !empty($F) rm -f .depend .endif and then add beforebeforedepend before beforedepend and adjust the ordering rules accordingly. Make could be modified to have exists take a list of files and return true iff they all exist... Warner