Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2002 23:13:06 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        arch@FreeBSD.org
Subject:   install(1) to use a cross strip(1)
Message-ID:  <20020201231306.A670@dhcp01.pn.xcllnt.net>

next in thread | raw e-mail | index | archive | help
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




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