From owner-freebsd-arch Fri Feb 1 23:12:36 2002 Delivered-To: freebsd-arch@freebsd.org Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by hub.freebsd.org (Postfix) with ESMTP id 2A25D37B400 for ; Fri, 1 Feb 2002 23:12:32 -0800 (PST) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g127CV640056 for ; Fri, 1 Feb 2002 23:12:31 -0800 (PST) (envelope-from marcel@kayak.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.11.6/8.11.6) id g127D6Z00720 for arch@FreeBSD.org; Fri, 1 Feb 2002 23:13:06 -0800 (PST) (envelope-from marcel) Date: Fri, 1 Feb 2002 23:13:06 -0800 From: Marcel Moolenaar To: arch@FreeBSD.org Subject: install(1) to use a cross strip(1) Message-ID: <20020201231306.A670@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.21i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Gang, As part of doing cross development with our source tree I hit upon the nasty habit of install(1) to want to use strip(1) and specificly by that name. To make my live easier, I have made install(1) look for an envvar first. Is this kind of flexibility generic enough to have it committed? --- xinstall.c 19 Dec 2001 06:05:42 -0000 1.47 +++ xinstall.c 27 Jan 2002 08:54:51 -0000 @@ -702,6 +702,7 @@ strip(to_name) const char *to_name; { + char *stripbin; int serrno, status; switch (fork()) { @@ -711,7 +712,10 @@ errno = serrno; err(EX_TEMPFAIL, "fork"); case 0: - execlp("strip", "strip", to_name, (char *)NULL); + stripbin = getenv("STRIPBIN"); + if (stripbin == NULL) + stripbin = "strip"; + execlp(stripbin, stripbin, to_name, (char *)NULL); err(EX_OSERR, "exec(strip)"); default: if (wait(&status) == -1 || status) { NOTE: I use STRIPBIN, because STRIP is already taken (see /usr/share/mk). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message