From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 28 16:40:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73369F21 for ; Sat, 28 Sep 2013 16:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45162256A for ; Sat, 28 Sep 2013 16:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8SGe1cE032098 for ; Sat, 28 Sep 2013 16:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8SGe1Ow032096; Sat, 28 Sep 2013 16:40:01 GMT (envelope-from gnats) Date: Sat, 28 Sep 2013 16:40:01 GMT Message-Id: <201309281640.r8SGe1Ow032096@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: conf/174422: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 16:40:01 -0000 The following reply was made to PR conf/174422; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: conf/174422: commit references a PR Date: Sat, 28 Sep 2013 16:39:54 +0000 (UTC) Author: ian Date: Sat Sep 28 16:39:46 2013 New Revision: 255930 URL: http://svnweb.freebsd.org/changeset/base/255930 Log: Allow the path to the system source directory to be passed in to newvers.sh. Pass it in from include/Makefile. If it isn't passed in, fall back to the old logic of using dirname $0. Using dirname $0 does not yield the path to the script if it was sourced in from another script in another directory; you end up with the parent script's path. That was causing newvers.sh to look one level below the FreeBSD src/ directory when building osreldate.h and it may find something like a git or svn repo there that has nothing to do with FreeBSD. PR: 174422 Approved by: re () MFC after: 2 weeks Modified: head/include/Makefile head/sys/conf/newvers.sh Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Sep 28 16:25:20 2013 (r255929) +++ head/include/Makefile Sat Sep 28 16:39:46 2013 (r255930) @@ -104,8 +104,9 @@ SHARED?= copies INCS+= osreldate.h -NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh -PARAM_H= ${.CURDIR}/../sys/sys/param.h +SYSDIR= ${.CURDIR}/../sys +NEWVERS_SH= ${SYSDIR}/conf/newvers.sh +PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} @@ -113,6 +114,7 @@ osreldate.h vers.c: ${NEWVERS_SH} ${PARA MAKE="${MAKE}" \ NEWVERS_SH=${NEWVERS_SH} \ PARAM_H=${PARAM_H} \ + SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sat Sep 28 16:25:20 2013 (r255929) +++ head/sys/conf/newvers.sh Sat Sep 28 16:39:46 2013 (r255930) @@ -38,7 +38,10 @@ if [ "X${BRANCH_OVERRIDE}" != "X" ]; the fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" -SYSDIR=$(dirname $0)/.. + +if [ "X${SYSDIR}" = "X" ]; then + SYSDIR=$(dirname $0)/.. +fi if [ "X${PARAMFILE}" != "X" ]; then RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"