From owner-freebsd-bugs Sun Dec 19 3:51:29 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 4C3E715059; Sun, 19 Dec 1999 03:51:21 -0800 (PST) (envelope-from marcel@scc.nl) Received: from [212.238.132.94] (helo=scones.sup.scc.nl) by post.mail.nl.demon.net with esmtp (Exim 2.02 #1) id 11zers-0003bX-00; Sun, 19 Dec 1999 11:51:16 +0000 Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.3/8.9.3) with ESMTP id MAA42881; Sun, 19 Dec 1999 12:51:12 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <385CC6B0.F14A86B0@scc.nl> Date: Sun, 19 Dec 1999 12:51:12 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.5 i386) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Evans Cc: "Stephen J. Roznowski" , freebsd-bugs@FreeBSD.ORG, marcel@FreeBSD.ORG Subject: Re: Problem building -current (gnu/usr.bin/binutils/doc) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bruce Evans wrote: > > On Tue, 14 Dec 1999, Stephen J. Roznowski wrote: > > >... > > patch -b .orig < /usr/src/gnu/usr.bin/binutils/doc/inc-hist.diff > > patch: **** can't find file `.orig' : No such file or directory > > *** Error code 2 > > > I was able to track this problem down to having ports/patch installed > > (/usr/local/bin/patch) and my build was picking up this version of patch > > vice the /usr/bin/patch one.... Perhaps "make buildworld" should specify > > a PATH variable? > > It does, but since patch(1) is no longer a build-tool, an old version of > patch(1) in $PATH is found instead of a tool in $STRICTTMPPATH. I've already been thinking about setting PATH to some fixed default, especially to solve the problems people may have when /usr/local/bin is before /usr/bin for example (and as is in this example). > "-b .orig" is used to avoid pollution in the environment (I use > SIMPLE_BACKUP_PREFIX="~"). It might be better to kill most of the > environment. Hmmm... is forcing `.orig' as the suffix not against POLA? I mean, if someone has SIMPLE_BACKUP_PREFIX in his/her environment, then he/she expects to find a backup file with that prefix. The makefile can easily be rewritten as (with cut-n-paste corruption): Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/doc/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- Makefile 1999/08/27 23:34:46 1.3 +++ Makefile 1999/12/19 11:48:01 @@ -13,12 +13,14 @@ INFOENTRY_ld= "* Ld: (ld). The GNU linker." INFOENTRY_annotate= "* GDB annotation: (annotate). Annotations for the GNU Debugger (GDB)." +SIMPLE_BACKUP_PREFIX?= ".orig" + MAKEINFOFLAGS+= --no-validate MAKEINFOFLAGS+= -I ${SRCDIR}/gas/doc -I ${SRCDIR}/ld -I ${SRCDIR}/bfd/doc MAKEINFOFLAGS+= -I ${GDBDIR}/gdb/doc MAKEINFOFLAGS+= -I ${CONTRIBDIR}/libreadline/doc -CLEANFILES= gdb-cfg.texi inc-hist.texi inc-hist.texi.orig +CLEANFILES= gdb-cfg.texi inc-hist.texi inc-hist.texi.${SIMPLE_BACKUP_PREFIX} as.info: as.texinfo asconfig.texi c-i386.texi ld.info: ld.texinfo bfdsumm.texi @@ -32,6 +34,6 @@ .PATH: ${CONTRIBDIR}/libreadline/doc inc-hist.texi: hsuser.texinfo inc-hist.diff cp ${.ALLSRC:M*.texinfo} ${.TARGET} - patch -b .orig < ${.ALLSRC:M*.diff} + patch -b ${SIMPLE_BACKUP_PREFIX} < ${.ALLSRC:M*.diff} .include or with the last lines as: + SIMPLE_BACKUP_PREFIX=${SIMPLE_BACKUP_PREFIX} \ patch < ${.ALLSRC:M*.diff} .include -- Marcel Moolenaar mailto:marcel@scc.nl SCC Internetworking & Databases http://www.scc.nl/ The FreeBSD project mailto:marcel@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message