Changes in / [883b421:76e80de]


Ignore:
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rca1fb26a r1c22155  
    44.deps
    55/bin/
    6 BUILD_VERSION.mk
    76META.yml
    87MYMETA.yml
     
    4140tester
    4241varstubs.c
    43 version.c
    44 version.c.new
    4542zcrypt
  • Makefile.am

    rca1fb26a ra223b6b  
    11ACLOCAL_AMFLAGS = -I m4
    22
    3 GIT_DESCRIPTION := $(if $(wildcard $(srcdir)/.git),$(shell cd $(srcdir) && git describe --match='barnowl-*' HEAD 2>/dev/null))
    4 VERSION = $(if $(GIT_DESCRIPTION),$(GIT_DESCRIPTION:barnowl-%=%),@VERSION@)
    5 -include BUILD_VERSION.mk
    6 
    7 FORCE:
    8 BUILD_VERSION.mk: $(if $(filter-out $(BUILD_VERSION),$(VERSION)),FORCE)
    9         echo 'BUILD_VERSION = $(VERSION)' > $@
     3GIT_DESCRIPTION := $(if $(wildcard .git),$(shell git describe --match='barnowl-*' HEAD 2>/dev/null))
     4GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
    105
    116bin_PROGRAMS = bin/barnowl
     
    149endif
    1510
    16 zcrypt_SOURCES = zcrypt.c filterproc.c version.c
     11zcrypt_SOURCES = zcrypt.c filterproc.c
    1712
    1813check_PROGRAMS = bin/tester
     
    5247           -I$(top_srcdir)/libfaim/ \
    5348           -DDATADIR='"$(pkgdatadir)"' \
    54            -DBINDIR='"$(bindir)"'
     49           -DBINDIR='"$(bindir)"' \
     50           $(GIT_FLAGS)
    5551
    5652CODELIST_SRCS=message.c mainwin.c popwin.c zephyr.c messagelist.c \
     
    6864BASE_SRCS = $(CODELIST_SRCS) $(NORMAL_SRCS)
    6965
    70 GEN_C = varstubs.c perlglue.c gmarshal_funcs.c version.c version.c.new
     66GEN_C = varstubs.c perlglue.c gmarshal_funcs.c
    7167GEN_H = owl_prototypes.h owl_prototypes.h.new gmarshal_funcs.h
    7268
    73 BUILT_SOURCES = $(GEN_H)
     69BUILT_SOURCES = $(GEN_C) $(GEN_H)
    7470
    7571# Only copy file into place if file.new is different
    76 owl_prototypes.h version.c: %: %.new
     72%: %.new
    7773        @diff -U0 $@ $< || { \
    7874         test -f $@ && echo '$@ changed!'; \
     
    9187        $(AM_V_GEN)perl $< $(sort $(filter-out $<,$+)) > $@
    9288
    93 version.c.new: Makefile BUILD_VERSION.mk
    94         $(AM_V_GEN)echo 'const char *version = "$(VERSION)";' > $@
    95 
    9689gmarshal_funcs.h: marshal_types
    9790        glib-genmarshal --header $< > $@
     
    10396        $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
    10497
    105 CLEANFILES = $(BUILT_SOURCES) $(GEN_C) $(noinst_SCRIPTS) $(check_SCRIPTS) BUILD_VERSION.mk
     98CLEANFILES = $(BUILT_SOURCES) $(noinst_SCRIPTS) $(check_SCRIPTS)
    10699EXTRA_DIST = \
    107100    autogen.sh \
  • commands.c

    rca1fb26a ra38becd  
    11141114void owl_command_version(void)
    11151115{
    1116   owl_function_makemsg("BarnOwl version %s", version);
     1116  owl_function_makemsg("BarnOwl version %s", OWL_VERSION_STRING);
    11171117}
    11181118
  • functions.c

    rca1fb26a ra38becd  
    115115void owl_function_show_license(void)
    116116{
    117   char *text = g_strdup_printf(
    118     "BarnOwl version %s\n"
     117  const char *text;
     118
     119  text=""
     120    "BarnOwl version " OWL_VERSION_STRING "\n"
    119121    "Copyright (c) 2006-2011 The BarnOwl Developers. All rights reserved.\n"
    120122    "Copyright (c) 2004 James Kretchmar. All rights reserved.\n"
     
    153155    "WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n"
    154156    "OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n"
    155     "IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
    156     version);
     157    "IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";
    157158  owl_function_popless_text(text);
    158   g_free(text);
    159159}
    160160
     
    13591359void owl_function_about(void)
    13601360{
    1361   char *text = g_strdup_printf(
    1362     "This is BarnOwl version %s.\n\n"
     1361  owl_function_popless_text(
     1362    "This is BarnOwl version " OWL_VERSION_STRING ".\n\n"
    13631363    "BarnOwl is a fork of the Owl zephyr client, written and\n"
    13641364    "maintained by Alejandro Sedeno and Nelson Elhage at the\n"
     
    13791379    "This program is free software. You can redistribute it and/or\n"
    13801380    "modify under the terms of the Sleepycat License. Use the \n"
    1381       "':show license' command to display the full license\n",
    1382       version);
    1383   owl_function_popless_text(text);
    1384   g_free(text);
     1381    "':show license' command to display the full license\n"
     1382  );
    13851383}
    13861384
     
    17831781
    17841782  owl_fmtext_append_normal(&fm, "  Version: ");
    1785   owl_fmtext_append_normal(&fm, version);
     1783  owl_fmtext_append_normal(&fm, OWL_VERSION_STRING);
    17861784  owl_fmtext_append_normal(&fm, "\n");
    17871785
  • owl.c

    rca1fb26a r120dac7  
    3636void usage(FILE *file)
    3737{
    38   fprintf(file, "Barnowl version %s\n", version);
     38  fprintf(file, "Barnowl version %s\n", OWL_VERSION_STRING);
    3939  fprintf(file, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");
    4040  fprintf(file, "  -n,--no-subs        don't load zephyr subscriptions\n");
     
    8080      break;
    8181    case 'v':
    82       printf("This is BarnOwl version %s\n", version);
     82      printf("This is BarnOwl version %s\n", OWL_VERSION_STRING);
    8383      exit(0);
    8484    case 'h':
     
    578578  /* welcome message */
    579579  owl_function_debugmsg("startup: creating splash message");
    580   char *welcome = g_strdup_printf(
     580  owl_function_adminmsg("",
    581581    "-----------------------------------------------------------------------\n"
    582     "Welcome to BarnOwl version %s.\n"
     582    "Welcome to BarnOwl version " OWL_VERSION_STRING ".\n"
    583583    "To see a quick introduction, type ':show quickstart'.                  \n"
    584584    "Press 'h' for on-line help.                                            \n"
     
    588588    "                                                                 OvO   \n"
    589589    "Please report any bugs or suggestions to bug-barnowl@mit.edu    (   )  \n"
    590     "-----------------------------------------------------------------m-m---\n",
    591     version);
    592   owl_function_adminmsg("", welcome);
    593   g_free(welcome);
     590    "-----------------------------------------------------------------m-m---\n"
     591  );
    594592
    595593  owl_function_debugmsg("startup: setting context interactive");
  • owl.h

    rca1fb26a r120dac7  
    6464#include "window.h"
    6565
    66 extern const char *version;
     66#ifndef OWL_VERSION_STRING
     67#ifdef  GIT_VERSION
     68#define stringify(x)       __stringify(x)
     69#define __stringify(x)     #x
     70#define OWL_VERSION_STRING stringify(GIT_VERSION)
     71#else
     72#define OWL_VERSION_STRING PACKAGE_VERSION
     73#endif
     74#endif /* !OWL_VERSION_STRING */
    6775
    6876/* Feature that is being tested to redirect stderr through a pipe.
  • perlconfig.c

    rca1fb26a r96d80e9  
    336336  }
    337337
    338   sv_setpv(get_sv("BarnOwl::VERSION", TRUE), version);
     338  sv_setpv(get_sv("BarnOwl::VERSION", TRUE), OWL_VERSION_STRING);
    339339
    340340  /* Add the system lib path to @INC */
  • zcrypt.c

    rca1fb26a r8f335a8  
    2929#include "filterproc.h"
    3030
    31 extern const char *version;
     31#ifndef OWL_VERSION_STRING
     32#ifdef  GIT_VERSION
     33#define stringify(x)       __stringify(x)
     34#define __stringify(x)     #x
     35#define OWL_VERSION_STRING stringify(GIT_VERSION)
     36#else
     37#define OWL_VERSION_STRING PACKAGE_VERSION
     38#endif
     39#endif /* !OWL_VERSION_STRING */
    3240
    3341/* Annotate functions in which the caller owns the return value and is
     
    149157      case OPT_VERSION:
    150158        /* Version */
    151         printf("This is zcrypt version %s\n", version);
     159        printf("This is zcrypt version %s\n", OWL_VERSION_STRING);
    152160        exit(0);
    153161      case OPT_HELP:
Note: See TracChangeset for help on using the changeset viewer.