Changeset 569


Ignore:
Timestamp:
Mar 13, 2008, 10:55:15 PM (13 years ago)
Author:
Peter Johansson
Message:

NOTE: may cause file name clash. Adding file
subversion_info.h'. Previously make' generated this file, and thus
you may experience a file name clash. Please remove subversion_info.h
prior updating.

Moved implementation of subversion_info to source file in order to
avoid re-compilations not needed. Using script move-if-change to
create source file.

Location:
trunk
Files:
2 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r568 r569  
    44
    55# Copyright (C) 2005, 2006 Jari Häkkinen
    6 # Copyright (C) 2007 Peter Johansson
     6# Copyright (C) 2007 2008 Peter Johansson
    77#
    88# This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    2525SUBDIRS = lib bin test
    2626
     27EXTRA_dist = build_support/move-if-change
     28
    2729clean-local:
    2830  rm -rf svndigest *~
    29 
    30 bajs.in: kiss
    31   cp kiss bajs.in
  • trunk/THANKS

    r542 r569  
    2525http://www.mhoenicka.de/system-cgi/blog/index.php?itemid=999
    2626
     27svndigest build system uses a shell script
     28(build_support/move-if-changed) that was copied from GCC. The script
     29is licensed under GNU GPL <http://www.gnu.org/licenses/>.
     30
    2731-----------------------------------------------------------------------
    2832{{{
    2933Copyright (C) 2005, 2006 Jari Häkkinen
    3034Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     35Copyright (C) 2008 Peter Johansson
    3136
    3237This file is part of svndigest, http://trac.thep.lu.se/svndigest
  • trunk/configure.ac

    r568 r569  
    137137
    138138wc_found="no";
    139 if (test `$SVNVERSION -n '.'` != "exported"); then
     139if (test $have_svnversion != "no" &&
     140    test `$SVNVERSION -n $srcdir` != "exported");
     141then
    140142   wc_found="yes";
    141143fi
    142 AC_CHECK_FILE("lib/subversion_info.h", info_found="yes", info_found="no")
     144echo $wc_found
     145AC_CHECK_FILE("$srcdir/lib/subversion_info.cc",info_found="yes",info_found="no")
    143146
    144147# Checking that a release (non-dev) has no pre in VERSION
     
    157160                bin/Makefile
    158161                lib/Makefile
    159                 test/Makefile
    160                 test/test_repo.sh
    161                 test/check_repo_status.sh],
    162                [chmod +x test/test_repo.sh;
    163                 chmod +x test/check_repo_status.sh])
     162                test/Makefile])
    164163
    165164# Print failure status information about selected items, and exit if
     
    170169all_reqs_ok="true"
    171170
    172 #
    173 if (test "$info_found" = "no" && test "$wc_found" = "no") ; then
    174    AC_MSG_WARN([Cannot find sources (lib/subverion_info.h).])
     171if (test "$wc_found" != "yes") ; then
     172if (test "$info_found" = "no") ; then
     173   AC_MSG_WARN([Cannot find sources (lib/subversion_info.cc).])
    175174   if (test "$svnversion" = "no") ; then
    176175     AC_MSG_WARN([If you grabbed the source from the subversion repository,
     
    185184   fi
    186185   all_reqs_ok="false"
     186else
     187   dnl test repo is not distributed
     188   AC_CONFIG_FILES([test/test_repo.sh
     189                    test/check_repo_status.sh],
     190                   [chmod +x test/test_repo.sh;
     191                    chmod +x test/check_repo_status.sh])
     192   
     193fi
    187194fi
    188195
  • trunk/lib/Makefile.am

    r564 r569  
    55# Copyright (C) 2005 Jari Häkkinen
    66# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    7 # Copyright (C) 2007 Peter Johansson
     7# Copyright (C) 2007 2008 Peter Johansson
    88#
    99# This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    3131  HtmlStream.h html_utility.h LineTypeParser.h \
    3232  LogIterator.h Node.h rmdirhier.h \
    33   Stats.h StatsCollection.h SVN.h SVNblame.h  \
     33  Stats.h StatsCollection.h subversion_info.h SVN.h SVNblame.h  \
    3434  SVNinfo.h SVNlog.h SVNproperty.h Trac.h utility.h
    3535
     
    4040  Functor.cc Gnuplot.cc GnuplotFE.cc  HtmlStream.cc \
    4141  html_utility.cc LineTypeParser.cc LogIterator.cc Node.cc \
    42   rmdirhier.cc Stats.cc StatsCollection.cc SVN.cc       \
     42  rmdirhier.cc Stats.cc StatsCollection.cc subversion_info.cc SVN.cc        \
    4343  SVNblame.cc SVNinfo.cc SVNlog.cc SVNproperty.cc Trac.cc utility.cc
    4444
    45 BUILT_SOURCES=subversion_info.h
    4645
    47 EXTRA_DIST=subversion_info.h
     46
    4847
    4948clean-local:
     
    5352
    5453if HAVE_SVN_WC
    55 subversion_info.h: subversion_info.h.tmp
    56   @if [ ! -f $@ ]; then touch $@; fi; \
    57   diff $@ subversion_info.h.tmp > subversion_info.h.diff; \
    58   if test -s "subversion_info.h.diff"; then \
    59     mv subversion_info.h.tmp subversion_info.h; \
    60     echo creating subversion_info.h; \
    61   fi; \
    62   rm -f subversion_info.h.tmp subversion_info.h.diff ;
     54subversion_info.cc: subversion_info.cc.tmp
     55  @$(SHELL) @top_srcdir@/build_support/move-if-change subversion_info.cc.tmp \
     56  subversion_info.cc
    6357
    64 
    65 subversion_info.h.tmp: FORCE
    66   @echo '// subversion_info.h generated from subversion_info.h.in.' > $@ ;\
     58subversion_info.cc.tmp: FORCE
     59  @echo '// subversion_info.cc generated from subversion_info.cc.in.' > $@ ;\
    6760  revision=`$(SVNVERSION) $(top_srcdir)` ;\
    6861  year=`svn info $(top_srcdir)|$(SED) -n  's/.*Date: \(.*\)-..-.*/\1/p'`;\
    6962  $(SED) -e 's/sub_2_svn_revision/'$$revision'/g' \
    70   -e 's/sub_2_svn_year/'$$year'/g'  subversion_info.h.in >> $@ ;
     63  -e 's/sub_2_svn_year/'$$year'/g'  subversion_info.cc.in >> $@ ;
    7164endif
    7265
  • trunk/lib/subversion_info.h

    r568 r569  
    1 // $Id$
    2 
    31#ifndef _theplu_svndigest_subversion_info_
    42#define _theplu_svndigest_subversion_info_
     3
     4// $Id$
    55
    66/*
     
    3030namespace svndigest{
    3131
    32   inline std::string svn_revision(void)
    33   { return "sub_2_svn_revision"; }
     32  std::string svn_revision(void);
    3433
    35   inline std::string svn_year(void)
    36   { return "sub_2_svn_year"; }
     34  std::string svn_year(void);
    3735
    3836}} // end of namespace svndigest and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.