diff -r -c3 --unidirectional-new-file hello-2.4.orig/gen-version hello-2.4/gen-version *** hello-2.4.orig/gen-version 1970-01-01 01:00:00.000000000 +0100 --- hello-2.4/gen-version 2009-05-31 12:10:00.000000000 +0200 *************** *** 0 **** --- 1,2 ---- + #!/bin/sh + echo 2.4-20090531-2133 diff -r -c3 --unidirectional-new-file hello-2.4.orig/configure.ac hello-2.4/configure.ac *** hello-2.4.orig/configure.ac 2008-12-09 19:49:08.000000000 +0100 --- hello-2.4/configure.ac 2009-05-31 12:05:21.000000000 +0200 *************** *** 8,17 **** dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! AC_INIT([GNU Hello], [2.4], address@hidden) dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([readme-alpha]) # Minimum Autoconf version required. --- 8,19 ---- dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ! AC_INIT([GNU Hello], [-], address@hidden) dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) + AM_INIT_VERSION([$$version], [version=`sh $(top_srcdir)/gen-version`]) + AM_INIT_AUTOMAKE([readme-alpha]) # Minimum Autoconf version required. *************** *** 24,29 **** --- 26,32 ---- dnl Checks for programs. # We need a C compiler. AC_PROG_CC + AM_PROG_CC_C_O # Since we use gnulib: gl_EARLY must be called as soon as possible after # the C compiler is checked. The others could be later, but we just diff -r -c3 --unidirectional-new-file hello-2.4.orig/src/hello.c hello-2.4/src/hello.c *** hello-2.4.orig/src/hello.c 2008-12-03 19:48:12.000000000 +0100 --- hello-2.4/src/hello.c 2009-05-31 11:49:51.000000000 +0200 *************** *** 187,193 **** static void print_version (void) { ! printf ("hello (GNU %s) %s\n", PACKAGE, VERSION); /* xgettext: no-wrap */ puts (""); --- 187,193 ---- static void print_version (void) { ! printf ("hello (GNU %s) %s\n", PACKAGE, version); /* xgettext: no-wrap */ puts (""); diff -r -c3 --unidirectional-new-file hello-2.4.orig/src/system.h hello-2.4/src/system.h *** hello-2.4.orig/src/system.h 2008-11-27 20:48:24.000000000 +0100 --- hello-2.4/src/system.h 2009-05-31 11:50:07.000000000 +0200 *************** *** 37,40 **** --- 37,42 ---- /* Check for errors on write. */ #include "closeout.h" + extern char const version[]; + #endif /* HELLO_SYSTEM_H */ diff -r -c3 --unidirectional-new-file hello-2.4.orig/src/version.c hello-2.4/src/version.c *** hello-2.4.orig/src/version.c 1970-01-01 01:00:00.000000000 +0100 --- hello-2.4/src/version.c 2009-05-31 11:49:58.000000000 +0200 *************** *** 0 **** --- 1,4 ---- + #include + #include "system.h" + + char const version[] = VERSION; diff -r -c3 --unidirectional-new-file hello-2.4.orig/src/Makefile.am hello-2.4/src/Makefile.am *** hello-2.4.orig/src/Makefile.am 2008-11-27 20:48:24.000000000 +0100 --- hello-2.4/src/Makefile.am 2009-05-31 12:10:24.000000000 +0200 *************** *** 20,28 **** bin_PROGRAMS = hello hello_SOURCES = hello.c system.h ! hello_LDADD = @LIBINTL@ ../gnulib/lib/libgnu.a localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ --- 20,33 ---- bin_PROGRAMS = hello hello_SOURCES = hello.c system.h ! hello_LDADD = @LIBINTL@ ../gnulib/lib/libgnu.a libversion.a localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ + + noinst_LIBRARIES = libversion.a + libversion_a_SOURCES = version.c + libversion_a_CPPFLAGS = $(AM_CPPFLAGS) address@hidden@echo -DVERSION=\"$(VERSION)\"` + libversion_a-version.$(OBJEXT) : $(top_srcdir)/gen-version