From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4319 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Storing version information in libc.so Date: Sat, 30 Nov 2013 16:42:54 -0500 Message-ID: <20131130214254.GY24286@brightrain.aerifal.cx> References: <20131127054806.GA11224@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1385847783 15235 80.91.229.3 (30 Nov 2013 21:43:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 21:43:03 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4323-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 30 22:43:10 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VmsJi-0001td-45 for gllmg-musl@plane.gmane.org; Sat, 30 Nov 2013 22:43:10 +0100 Original-Received: (qmail 16209 invoked by uid 550); 30 Nov 2013 21:43:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 16191 invoked from network); 30 Nov 2013 21:43:07 -0000 Content-Disposition: inline In-Reply-To: <20131127054806.GA11224@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4319 Archived-At: On Wed, Nov 27, 2013 at 12:48:06AM -0500, Rich Felker wrote: > As for the build system, the proposed rule for generating version.c > is this: > > src/internal/version.c: VERSION $(wildcard .git .git/*) > sh tools/version.sh > $@ I think I'm going to replace this with: src/internal/version.c: src/internal/version.h and have version.h be the generated file, containing just: #define VERSION "..." This gives more flexibility to modify the mechanisms/linkage of stuff in version.c without having to edit a script, and makes the version.sh script much more generic. It also avoids the need to hard-code a generated .c file into the SRCS/OBJS lists. Rich