From owner-freebsd-questions@FreeBSD.ORG Fri May 13 18:44:40 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86345106566C for ; Fri, 13 May 2011 18:44:40 +0000 (UTC) (envelope-from vogelke@hcst.net) Received: from beta.hcst.com (beta.hcst.com [192.52.183.241]) by mx1.freebsd.org (Postfix) with ESMTP id 34C0D8FC16 for ; Fri, 13 May 2011 18:44:39 +0000 (UTC) Received: from beta.hcst.com (localhost [127.0.0.1]) by beta.hcst.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p4DIiccp020648 for ; Fri, 13 May 2011 14:44:38 -0400 Received: (from vogelke@localhost) by beta.hcst.com (8.14.3/8.14.3/Submit) id p4DIicS0020647; Fri, 13 May 2011 14:44:38 -0400 Received: by kev.msw.wpafb.af.mil (Postfix, from userid 32768) id 989E8BE4D; Fri, 13 May 2011 14:41:44 -0400 (EDT) To: freebsd-questions@freebsd.org In-reply-to: <4DCCC412.1010004@infracaninophile.co.uk> (message from Matthew Seaman on Fri, 13 May 2011 06:39:30 +0100) Organization: Array Infotech X-Disclaimer: I don't speak for the USAF or Array Infotech. X-GPG-ID: 1024D/711752A0 2006-06-27 Karl Vogel X-GPG-Fingerprint: 56EB 6DBF 4224 C953 F417 CC99 4C7C 7D46 7117 52A0 References: <4DCCC412.1010004@infracaninophile.co.uk> Message-Id: <20110513184144.989E8BE4D@kev.msw.wpafb.af.mil> Date: Fri, 13 May 2011 14:41:44 -0400 (EDT) From: vogelke+unix@pobox.com (Karl Vogel) Subject: Re: How do you "install" utility built using gnu toolchain? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vogelke+unix@pobox.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2011 18:44:40 -0000 >> On 13/05/2011 05:29, Dale Scott wrote: D> It's pretty general question, but is it typically standard procedure for D> a utility building using the GNU tool chain to be able to install itself D> into /usr/local/bin? >> On Fri, 13 May 2011 06:39:30 +0100, >> Matthew Seaman said: M> 'gmake install' should put binaries into appropriate locations. Make M> sure that you specify /usr/local as the prefix when running configure. I usually do two builds: me% mkdir /tmp/local me% configure --prefix=/tmp/local ...whatever... me% gmake me% gmake -n install 2>&1 | grep -v /tmp/local shows if something's going to be installed elsewhere, but that's only happened to me once in a blue moon (typo in Makefile.in). root# gmake install me% cd /tmp/local me% ls -lR provides a list of exactly what'll be installed, with ownership and permissions, in case you ever want to know where a given file came from. The "clean", "realclean", and "distclean" targets can behave slightly differently, depending on who put the source together. To make cleanup consistent, I make a TOC of the pristine directory before and after configuration/build: me% cd /path/to/source me% find . -print | sort | tail +2 > /tmp/BEFORE ... configure, build, test, install, whatever ... me% find . -print | sort | tail +2 > /tmp/AFTER me% comm -23 /tmp/AFTER /tmp/BEFORE > TARGETS me% rm /tmp/AFTER /tmp/BEFORE Running "xargs rm < TARGETS" (and/or "rmdir") gives me a pristine source directory. Sure, you can just remove the whole thing and unpack a clean tarball, but this is easier if you have local patches or you'd like to keep part of the generated output, like the configuration stuff. -- Karl Vogel I don't speak for the USAF or my company No, I really can't recover any files from your thumb drive, even if you did find it after it passed through your dog. --actual IT support question