Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 1999 12:51:12 +0100
From:      Marcel Moolenaar <marcel@scc.nl>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        "Stephen J. Roznowski" <sjr@home.net>, freebsd-bugs@FreeBSD.ORG, marcel@FreeBSD.ORG
Subject:   Re: Problem building -current (gnu/usr.bin/binutils/doc)
Message-ID:  <385CC6B0.F14A86B0@scc.nl>
References:  <Pine.BSF.4.10.9912192031250.6854-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.info.mk>

or with the last lines as:

+       SIMPLE_BACKUP_PREFIX=${SIMPLE_BACKUP_PREFIX} \
 		patch < ${.ALLSRC:M*.diff}
 
 .include <bsd.info.mk>

-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?385CC6B0.F14A86B0>