From d3f4eecd553f4cf4e32a37eb4058e958ec266be6 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 25 Dec 2009 19:16:13 +0100 Subject: set-serial.sh: generate serial numbers automatically Usage: ./set-serial.sh m4/ax_foo.m4 m4/ax_bar.m4 [...] This script determines the number of revisions that have occurred to a given m4 file, and patches an appropriate #serial number into the file automatically. After that, the script checks whether git(1) regards that file as modified now. If it does, the serial number is bumped one more time to ensure that the number will be correct as soon as the changes have been committed. Consequently, running this script on an unmodified m4 file with correct serial number information is a no-op and doesn't change anything. --- TODO | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'TODO') diff --git a/TODO b/TODO index 4e87e8c..5c8bc6b 100644 --- a/TODO +++ b/TODO @@ -91,6 +91,7 @@ * TODO Generate serial lines - A way to obtain that number automatically might be the following approach: - - : git log -- m4/ax_have_epoll.m4 | egrep -c '^commit [0-9a-f]' + The script [[file:set-serial.sh][set-serial.sh]] uses the git repository to determine an appropriate + serial number (i.e. the number of commits that have occurred) and patches + that number into the m4 file. The solution seems to work nicely, but it isn't + integrated into the build process yet. -- cgit v1.2.1