Changeset 1337


Ignore:
Timestamp:
Feb 13, 2011, 12:57:58 AM (12 years ago)
Author:
Peter Johansson
Message:

using macros from yat to create files .release and .release_year

Location:
trunk
Files:
1 added
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1315 r1337  
    2727SUBDIRS = yat lib bin man test
    2828
    29 EXTRA_DIST = build_support/move-if-change .release_year
    30 MOVE_IF_CHANGE = $(SHELL) $(top_srcdir)/build_support/move-if-change
    3129
    3230lazycheck recheck: all
     
    3634  rm -rf svndigest *~
    3735
    38 .PHONY: .release_year.tmp recheck
    39 if HAVE_SVN_WC
    40 # update copyright year automatically (if we build from svn wc)
    41 $(srcdir)/.release_year: $(builddir)/.release_year.tmp
    42   @$(MOVE_IF_CHANGE) $(builddir)/.release_year.tmp $@
     36.PHONY: recheck
    4337
    44 $(builddir)/.release_year.tmp:
    45   @if ($(SVNVERSION) $(top_srcdir) | $(GREP) M > /dev/null); then \
    46      date -u "+%Y" > $@; \
    47   else \
    48      cp $(srcdir)/.release_year $@; \
    49   fi
    50 endif
     38## need to declare these variables here so they can be appended below
     39BUILT_SOURCES =
     40CLEANFILES =
     41CONFIG_STATUS_DEPENDENCIES =
     42DISTCLEANFILES =
     43EXTRA_DIST =
    5144
     45include $(top_srcdir)/svn_revision.am
     46include $(top_srcdir)/svn_revision_header.am
     47
     48include $(top_srcdir)/svn_release_year.am
    5249
    5350##############################################################
  • trunk/configure.ac

    r1293 r1337  
    1313# Copyright (C) 2006 Jari Häkkinen
    1414# Copyright (C) 2007, 2008, 2009, 2010 Jari Häkkinen, Peter Johansson
     15# Copyright (C) 2011 Peter Johansson
    1516#
    1617# This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    4748           AC_SUBST([PACKAGE_URL], ["http://dev.thep.lu.se/svndigest"])])
    4849
    49 # propagate RELEASE_YEAR from file .release_year
    50 RELEASE_YEAR=`cat $srcdir/.release_year`
    51 AC_SUBST([RELEASE_YEAR])
    52 AC_DEFINE_UNQUOTED([RELEASE_YEAR], ["$RELEASE_YEAR"],
    53                    [Define year package was last modified])
    54 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/.release_year'])
    55 
    5650AC_SUBST([SVNDIGEST_MAJOR_VERSION], [MAJOR_VERSION])
    5751AC_SUBST([SVNDIGEST_MINOR_VERSION], [MINOR_VERSION])
     
    173167LIBS=$save_LIBS
    174168AC_SUBST([SVN_LIBS])
    175 
    176 
    177 # check if svnversion is installed
    178 AC_PATH_PROG([SVNVERSION], [svnversion], [no])
    179169
    180170# PLplot API checks
     
    267257AC_SUBST(PLPLOT_LIBS)
    268258
    269 # checking if we build in a subversion WC
    270 AS_IF([test -d $srcdir/.svn], [wc_found="yes"], [wc_found="no"])
    271 AM_CONDITIONAL([HAVE_SVN_WC], [test "$wc_found" = "yes"])
    272 AC_SUBST([wc_found])
    273 
    274259# checking if we have test repo
    275260test_repo_filename=$srcdir/test/repo;
     
    286271AC_CONFIG_FILES([test/svn_update.sh], [chmod +x test/svn_update.sh])
    287272
    288 dnl maintainer make rukes from yat project
     273dnl maintainer make rules from yat project
    289274YAT_SVN_RELEASE
     275YAT_SVN_REVISION
     276YAT_REVISION_HEADER
     277YAT_SVN_RELEASE_YEAR
     278
    290279
    291280# Restore FLAGS
     
    311300all_reqs_ok="true"
    312301
    313 if (test "$wc_found" = "yes"); then
     302AS_VAR_IF([have_svn_wc], [yes], [
    314303   AC_MSG_CHECKING([help2man])
    315304   # redirecting potential error msg to log file
     
    325314          [                             ], 79))
    326315   ])
    327    # svnversion is required when building from svn wc
    328    if (test "x$SVNVERSION" = "xno"); then
    329       all_reqs_ok="false";
    330       AC_MSG_WARN([dnl
    331 Cannot find svnversion, which is required when building from a
    332 subversion working copy. Please install svnversion and make sure it is
    333 in your search path.]);
    334    fi
    335316   if (test "$test_repo_found" = "no"); then
    336317      all_reqs_ok="false";
     
    340321update in top directory.]);
    341322   fi
    342 fi
     323])
    343324
    344325# Non-existing APR is fatal -- sub-sequent compilation will fail.
  • trunk/lib/Makefile.am

    r1324 r1337  
    2222# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2323
    24 MOVE_IF_CHANGE = $(SHELL) $(top_srcdir)/build_support/move-if-change
    25 SVN_REVISION = `$(SVNVERSION) $(top_srcdir)`
    26 
    2724AM_CPPFLAGS = -I$(top_srcdir) $(SVNDIGEST_CPPFLAGS)
    2825AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS)
     
    3936  main_utility.h Node.h NodeCounter.h NodePrinter.h NodeVisitor.h \
    4037  OptionVersion.h rmdirhier.h \
    41   Stats.h StatsCollection.h StatsPlotter.h subversion_info.h \
     38  Stats.h StatsCollection.h StatsPlotter.h subversion_revision.h \
    4239  SvndigestVisitor.h SVN.h SVNblame.h \
    4340  SVNdiff.h SVNinfo.h SVNlog.h SVNproperty.h TinyStats.h \
     
    6057  html_utility.cc LineTypeParser.cc main_utility.cc Node.cc \
    6158  NodeCounter.cc OptionVersion.cc \
    62   rmdirhier.cc Stats.cc StatsCollection.cc SVN.cc \
     59  rmdirhier.cc Stats.cc StatsCollection.cc subversion_revision.cc SVN.cc \
    6360  SVNblame.cc SVNdiff.cc SVNinfo.cc \
    6461  SVNlog.cc SVNproperty.cc TinyStats.cc \
    6562  Trac.cc utility.cc Vector.cc
    66 
    67 nodist_libsvndigest_core_a_SOURCES = subversion_info.cc
    68 
    69 
    7063
    7164clean-local:
     
    7467all-local:
    7568
    76 EXTRA_DIST = subversion_info.cc.in .revision
    77 CLEANFILES = subversion_info.cc
    7869
    79 if HAVE_SVN_WC
    80 $(srcdir)/.revision: FORCE
    81   @$(SVNVERSION) $(top_srcdir) > $@-t && $(MOVE_IF_CHANGE) $@-t $@
    82 else
    83 ## this is needed in 'svn export' build
    84 $(srcdir)/.revision:
    85   echo "" > $@
    86 endif
    87 
    88 subversion_info.cc: $(srcdir)/subversion_info.cc.in $(srcdir)/.revision
    89   @rm -f $@-t $@ && \
    90   { revision=`cat $(srcdir)/.revision`; \
    91     echo '// DO NOT EDIT! GENERATED AUTOMATICALLY!' && \
    92     $(SED) -e 's/sub_2_svn_revision/r'$$revision'/g' \
    93     < $(srcdir)/subversion_info.cc.in; \
    94   } > $@-t && mv $@-t $@
    95 
    96 FORCE:
  • trunk/lib/OptionVersion.cc

    r1211 r1337  
    2323
    2424#include "OptionVersion.h"
    25 #include "subversion_info.h"
     25#include "subversion_revision.h"
    2626#include "utility.h"
    2727
  • trunk/lib/html_utility.cc

    r1099 r1337  
    2929#include "Date.h"
    3030#include "HtmlStream.h"
    31 #include "subversion_info.h"
     31#include "subversion_revision.h"
    3232
    3333#include <cassert>
  • trunk/lib/subversion_revision.cc

    r1335 r1337  
    2020*/
    2121
    22 #include "subversion_info.h"
     22#include "subversion_revision.h"
     23#include "svn_revision.h"
    2324#include <string>
    2425
     
    4041  std::string svn_revision(void)
    4142  {
    42     return "sub_2_svn_revision";
     43    return SVN_REVISION;
    4344  }
    4445
  • trunk/m4/yat_add_flag.m4

    r1315 r1337  
    1 ## $Id: yat_add_flag.m4 2107 2009-11-07 15:53:27Z peter $
     1## $Id: yat_add_flag.m4 2202 2010-02-21 18:39:13Z peter $
    22
    33# SYNOPSIS
     
    1717# LAST MODIFICATION
    1818#
    19 #   $Date: 2009-11-07 10:53:27 -0500 (Sat, 07 Nov 2009) $
     19#   $Date: 2010-02-21 13:39:13 -0500 (Sun, 21 Feb 2010) $
    2020#
    2121# COPYLEFT
  • trunk/m4/yat_svn_release.m4

    r1317 r1337  
    1 ## $Id: yat_svn_release.m4 2350 2010-11-21 15:35:23Z peter $
     1## $Id: yat_svn_release.m4 2425 2011-02-12 23:54:53Z peter $
    22
    3 # serial 4 (yat 0.7)
     3# serial 5 (yat 0.8)
    44
    55# SYNOPSIS
     
    1313#     include $(srcdir)/maintainer.am
    1414#
    15 #   to your top Makefile.am.
     15#   in your top Makefile.am. The main targets are `maintainer-check'
     16#   and `release'. maintainer-check 'svn exports' from the local wc
     17#   and try to build from this pristine directory via './boostrap;
     18#   ./configure $(DISTCHECK_CONFIGURE_FLAGS); make'. You can add
     19#   additional target that should be run within maintainer-check by
     20#   defining variable `MAINTAINER_CHECK_LOCAL'. The target `release'
     21#   runs `maintainer-check' in addition to some more sanity checks
     22#   such as checking that wc is not modified compared with repository
     23#   and finishes by running distcheck.
    1624#
    1725# COPYLEFT
    1826m4_define([yat_svn_release_copyright], [
    1927#
    20 #   Copyright (C) 2009, 2010 Peter Johansson
     28#   Copyright (C) 2009, 2010, 2011 Peter Johansson
    2129#
    2230#   This file is part of the yat library, http://dev.thep.lu.se/yat
  • trunk/man/Makefile.am

    r1298 r1337  
    3434# We depend on configure to catch VERSION changes, Makefile.in to
    3535# catch rules changes, svndigest.x is an obvious dependency, and
    36 # subversion_info.cc changes for every revsion.
     36# lib/.revision changes for every revsion.
    3737man_deps=$(top_srcdir)/configure $(srcdir)/Makefile.in \
    38   $(srcdir)/svndigest.x $(top_srcdir)/lib/subversion_info.cc
     38  $(srcdir)/svndigest.x $(top_srcdir)/lib/.revision
    3939
    4040$(srcdir)/svndigest.1: $(man_deps)
  • trunk/test/init.sh.in

    r1293 r1337  
    4848shell=@SHELL@
    4949test_repo_found=@test_repo_found@
    50 wc_found="@wc_found@"
     50have_svn_wc="@have_svn_wc@"
    5151
    5252test -z "$SVNDIGEST" && SVNDIGEST="${abs_top_builddir}/bin/svndigest";
     
    8181      fi;;
    8282    wc)
    83       if test x$wc_found = xno; then
     83      if test x$have_svn_wc = xno; then
    8484        exit_skip "not subversion working copy";
    8585      fi;;
Note: See TracChangeset for help on using the changeset viewer.