Calculate version string from configure.ac at compile time.
Also bump version from T.1.0-80 to T.81.0, as the leading 1.0 was useless.
This commit is contained in:
parent
5db1e9cdbb
commit
66c12e8e73
5 changed files with 29 additions and 13 deletions
|
|
@ -13,8 +13,8 @@ prefix = @prefix@
|
|||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
|
||||
tts: ${OBJS}
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} -o tts ${LIBS} @CURSES_LIB@
|
||||
tts: ${OBJS} vers.o
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} vers.o -o tts ${LIBS} @CURSES_LIB@
|
||||
|
||||
install:
|
||||
${INSTALL} -d -m 0755 ${bindir}
|
||||
|
|
@ -23,5 +23,8 @@ install:
|
|||
.c.o:
|
||||
${CC} ${CPPFLAGS} ${CFLAGS} -c $<
|
||||
|
||||
vers.c: vers.c.sh configure.ac
|
||||
sh @top_srcdir@/vers.c.sh @top_srcdir@/configure.ac
|
||||
|
||||
clean:
|
||||
rm -f tts *.o
|
||||
|
|
|
|||
18
configure
vendored
18
configure
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for RT/TTS T.1.0-80.
|
||||
# Generated by GNU Autoconf 2.69 for RT/TTS T.81.0.
|
||||
#
|
||||
# Report bugs to <felicity@loreley.flyingparchment.org.uk>.
|
||||
#
|
||||
|
|
@ -580,8 +580,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='RT/TTS'
|
||||
PACKAGE_TARNAME='rt-tts'
|
||||
PACKAGE_VERSION='T.1.0-80'
|
||||
PACKAGE_STRING='RT/TTS T.1.0-80'
|
||||
PACKAGE_VERSION='T.81.0'
|
||||
PACKAGE_STRING='RT/TTS T.81.0'
|
||||
PACKAGE_BUGREPORT='felicity@loreley.flyingparchment.org.uk'
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
|
@ -1232,7 +1232,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures RT/TTS T.1.0-80 to adapt to many kinds of systems.
|
||||
\`configure' configures RT/TTS T.81.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
|
@ -1293,7 +1293,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of RT/TTS T.1.0-80:";;
|
||||
short | recursive ) echo "Configuration of RT/TTS T.81.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
|
@ -1380,7 +1380,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
RT/TTS configure T.1.0-80
|
||||
RT/TTS configure T.81.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
|
@ -1749,7 +1749,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by RT/TTS $as_me T.1.0-80, which was
|
||||
It was created by RT/TTS $as_me T.81.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
|
@ -4720,7 +4720,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by RT/TTS $as_me T.1.0-80, which was
|
||||
This file was extended by RT/TTS $as_me T.81.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
|
@ -4782,7 +4782,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
RT/TTS config.status T.1.0-80
|
||||
RT/TTS config.status T.81.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
AC_PREREQ([2.69])
|
||||
AC_INIT([RT/TTS], [T.1.0-80], [felicity@loreley.flyingparchment.org.uk])
|
||||
AC_INIT([RT/TTS], [T.81.0], [felicity@loreley.flyingparchment.org.uk])
|
||||
AC_CONFIG_SRCDIR([tts.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
|
|
|||
9
tts.c
9
tts.c
|
|
@ -136,6 +136,8 @@ int c;
|
|||
|
||||
#define WSIZEOF(s) (sizeof(s) / sizeof(WCHAR))
|
||||
|
||||
extern char const *tts_version;
|
||||
|
||||
static volatile sig_atomic_t doexit;
|
||||
|
||||
static WINDOW *titwin, *statwin, *listwin;
|
||||
|
|
@ -1555,8 +1557,13 @@ size_t nargs;
|
|||
void
|
||||
drawheader()
|
||||
{
|
||||
WCHAR title[64];
|
||||
|
||||
SNPRINTF(title, WSIZEOF(title), "TTS %s - Type '?' for help",
|
||||
tts_version);
|
||||
wmove(titwin, 0, 0);
|
||||
waddstr(titwin, "TTS " PACKAGE_VERSION " - Type '?' for help");
|
||||
waddstr(titwin, title);
|
||||
|
||||
if (itime > 0) {
|
||||
WCHAR str[128];
|
||||
int h, m, s;
|
||||
|
|
|
|||
6
vers.c.sh
Normal file
6
vers.c.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
vers=`sed -n '/^AC_INIT/ { s/^AC_INIT(\[\(.*\)\], \[\(.*\)\], \[\(.*\)\])/\2/; p; }' $1`
|
||||
cat >vers.c <<EOF
|
||||
char const *tts_version = "$vers";
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue