From owner-freebsd-current@FreeBSD.ORG Sat Jul 12 18:31:10 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37A5E37B401 for ; Sat, 12 Jul 2003 18:31:10 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3160143F85 for ; Sat, 12 Jul 2003 18:31:09 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org (ugly.x.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h6D1QtgY022963; Sat, 12 Jul 2003 18:26:56 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F10B60C.3000106@acm.org> Date: Sat, 12 Jul 2003 18:29:48 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Evans References: <20030712165749.GA14599@colocall.net> <3F104A71.7060906@acm.org> <3F105499.BC7768C0@mindspring.com> <3F10576E.3060904@acm.org> <20030713095642.B1771@gamplex.bde.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org cc: Andrey Elperin Subject: Re: make release of CURRENT on 4.7 box X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2003 01:31:10 -0000 Bruce Evans wrote: > On Sat, 12 Jul 2003, Tim Kientzle wrote: > > >>Terry Lambert wrote: >> >>>Does this damage CURRENT on CURRENT or anything like that? >> >>Don't know, haven't had a chance to try it. >> >>To be honest, I was never able to understand how >>the previous version was supposed to work, since >>the newvers.sh script was run with a very >>odd current directory. > > > Looks like it was assumed to just set variables, so that sourcing > it doesn't make a mess. Here's the part that confuses me. sys/conf/newvers.sh does more than just set variables: * It updates the file "version" in the current directory * It creates the file "vers.c" in the current directory * It runs 'make -V KERN_IDENT' , which assumes at a minimum that there is a Makefile in the current directory. (Otherwise, you're invoking 'make' with no target.) When building -CURRENT on 4.7, the build fails in /usr/src/include because of the following: osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh \ ${.CURDIR}/../sys/sys/param.h \ ${.CURDIR}/Makefile @${ECHO} creating osreldate.h from newvers.sh @setvar PARAMFILE ${.CURDIR}/../sys/sys/param.h; \ . ${.CURDIR}/../sys/conf/newvers.sh; \ echo "$$COPYRIGHT" > osreldate.h; \ In particular, newvers.sh is being run with the current directory being ${.OBJDIR}, and ${.OBJDIR} doesn't contain a Makefile, so the 'make -V KERN_IDENT' fails. My patch just runs newvers.sh in ${.CURDIR}, which is also wrong, since that creates two files in ${.CURDIR} that shouldn't be there. I don't know the "right" way to fix this, because I don't really understand why 'osreldate.h' cares about KERN_IDENT, nor why it is reasonable for vers.c and version to be created as side-effects. I suspect that newvers.sh should be broken into two pieces: one that sets the variables and another that creates/updates version and vers.c. The former might then be useful in building osreldate.h. I don't really understand this machinery well enough to propose a concrete fix, though. Tim Kientzle