From: John Levon Subject: Re: [Xen-changelog] [xen-unstable] Avoid need for GREP variable by avoiding GNUisms. The Date: Wed, 18 Oct 2006 15:24:30 +0100 Message-ID: <20061018142430.GA2162@totally.trollied.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, Oct 18, 2006 at 02:10:11PM +0000, Keir Fraser wrote: > - $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map > + $(NM) -n $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map Sadly: -n Sorts external symbols by name before they are printed. > + `$(NM) -nr $(TARGET)-syms | head -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'` and -r Prepends the name of the object file or archive to each output line. regards, john