SVN Revision now put into config.h by configure; removed -lrt dependency (needs more testing)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@823 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent d688a981d6
commit 54fc8fc0a9

@ -1,3 +1,13 @@
2007-12-09 [822] Kolja Waschk <kawk>
* configure.ac: Improve detection of flex version, get Subversion
revision from 1. svn info, or 2. ChangeLog, or 3. Revision tag
* src/version.awk: not needed anymore as SVN info is now put into
config.h by configure.
* src/Makefile.am: removed -lrt link (not available on Cygwin, need
more checks whether it is needed elsewhere); no version.h target
* doc/UrJTAG.txt: Added info about required libraries and ioperm
2007-12-08 [819] Kolja Waschk <kawk>
* include/Makefile.am, src/Makefile.am, src/svf/Makefile.am

@ -21,12 +21,26 @@
# Written by Marcel Telka <marcel@telka.sk>, 2002, 2003.
#
AC_INIT(JTAG Tools,0.6,,jtag)
AC_INIT(UrJTAG,0.6,,urjtag)
AC_PREREQ(2.54)
AC_COPYRIGHT([Copyright (C) 2002, 2003 ETC s.r.o.])
AC_REVISION($Revision$)
# Get SVN Revision - idea from xfce-power-manager (C) 2007 by B.Tarricone
dnl get svn revision
SVN=`which svn`
if test -n "$SVN" -a -x "$SVN"; then
SVN_REVISION=`LC_ALL=C svn info | awk '/^Revision: / {printf "%d\n", $2}'`
else if test -e "ChangeLog"; then
SVN_REVISION=`cat ChangeLog | awk '/^Revision: / {printf "%d\n", $2}'`
else
SVN_REVISION=`echo '$Revision$' | awk '/^Revision: / {printf "%d\n", $2}'`
fi fi
AC_DEFINE_UNQUOTED([SVN_REVISION], "$SVN_REVISION", [subversion revision number])
AC_SUBST([SVN_REVISION])
AC_CONFIG_AUX_DIR(tools)
AM_INIT_AUTOMAKE([check-news dist-bzip2])
@ -74,6 +88,10 @@ if test "$LEX" == flex ; then
modern_flex=no
flex_version=`$LEX --version | $AWK '{print $2}'`
if test "$flex_version" == "version" ; then
flex_version=`$LEX --version | $AWK '{print $3}'`
fi
flex_v1=`echo $flex_version | $AWK -F . '{print $1}' | $SED -e 's/[a-zA-Z]//g'`
flex_v2=`echo $flex_version | $AWK -F . '{print $2}' | $SED -e 's/[a-zA-Z]//g'`
flex_v3=`echo $flex_version | $AWK -F . '{print $3}' | $SED -e 's/[a-zA-Z]//g'`
@ -100,6 +118,8 @@ if test "$LEX" == flex ; then
AC_MSG_RESULT([no - flex $flex_version])
AM_CONDITIONAL([BISON_LOCATIONS], false)
fi
else
AM_CONDITIONAL([BISON_LOCATIONS], false)
fi
AC_CONFIG_SUBDIRS(libbrux)

@ -65,15 +65,13 @@ jtag_LDADD = \
-L../libbrux -lbrux \
-Lbus -lbus \
-Lsvf -lsvf \
-lrt \
-lm \
@LIBINTL@
nodist_jtag_SOURCES = version.h
BUILT_SOURCES = version.h
CLEANFILES = version.h
version.h: ../ChangeLog version.awk
$(AWK) -f version.awk $< > $@
# Removed -lrt (added in 704 for busy loop waiting; not
# available in Cygwin. not needed? If you re-add -lrt here
# please consider to add checks in configure.ac whether
# it is avaiable and really needed
localedir = $(datadir)/locale
INCLUDES = -DLOCALEDIR=\"$(localedir)\"

@ -24,7 +24,10 @@
*/
#include "sysdep.h"
#include "version.h"
#ifndef SVN_REVISION
#define SVN_REVISION "0"
#endif
#include <stdio.h>
#include <stdlib.h>
@ -32,8 +35,12 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_READLINE
#include <readline/readline.h>
#ifdef HAVE_READLINE_HISTORY
#include <readline/history.h>
#endif
#endif
#include <getopt.h>
#ifdef ENABLE_NLS
#include <locale.h>
@ -88,6 +95,8 @@ jtag_create_jtagdir( void )
free( jdir );
}
#ifdef HAVE_READLINE_HISTORY
static void
jtag_load_history( void )
@ -139,6 +148,8 @@ jtag_save_history( void )
free( file );
}
#endif /* HAVE_READLINE_HISTORY */
static int
jtag_parse_line( char *line )
{
@ -367,7 +378,7 @@ main( int argc, const char **argv )
if (help)
{
/* Print help info and exit. */
printf (_("%s\n"), PACKAGE_STRING);
printf (_("%s #%s\n"), PACKAGE_STRING, SVN_REVISION);
printf ("\n");
printf (_("Usage: %s [OPTION] [FILE]\n"), PACKAGE);
@ -390,7 +401,7 @@ main( int argc, const char **argv )
if (version)
{
printf(_("%s\nCopyright (C) 2002, 2003 ETC s.r.o.\n"), PACKAGE_STRING);
printf(_("%s #%s\nCopyright (C) 2002, 2003 ETC s.r.o.\n"), PACKAGE_STRING, SVN_REVISION);
printf(_("\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
@ -446,11 +457,11 @@ main( int argc, const char **argv )
/* interactive */
printf(
_("%s Build %s\n"
_("%s #%s\n"
"Copyright (C) 2002, 2003 ETC s.r.o.\n"
"%s is free software, covered by the GNU General Public License, and you are\n"
"welcome to change it and/or distribute copies of it under certain conditions.\n"
"There is absolutely no warranty for %s.\n\n"), PACKAGE_STRING, URJTAG_BUILD_NUMBER,
"There is absolutely no warranty for %s.\n\n"), PACKAGE_STRING, SVN_REVISION,
PACKAGE_NAME, PACKAGE_NAME
);

@ -1,26 +0,0 @@
BEGIN {
print "/*"
print " * version.h"
print " * control long build version number"
print " *"
print " * Created automatically with version.awk script"
print " *"
print " */"
print ""
print "#ifndef __VERSION_H__"
print "#define __VERSION_H__"
print ""
FS="[ \t.]"
}
/Revision/ { printf "#define URJTAG_BUILD_NUMBER\t\"%s\"\n", $2 }
END {
print ""
print "#ifndef URJTAG_BUILD_NUMBER"
print "#define URJTAG_BUILD_NUMBER \"0\""
print "#endif"
print ""
print "#endif"
}
Loading…
Cancel
Save