Changeset 909 for trunk/lib


Ignore:
Timestamp:
Nov 29, 2009, 11:43:01 PM (14 years ago)
Author:
Peter Johansson
Message:

Set the copyright year automatically in svndigest-copy-cache. The year
is stored in a file .release_year and AC_DEFINEd and AC_SUBSTed, so it
can be used in both svndigest-copy-cache and svndigest (via
config.h). No need files lib/copyright_year anymore. The file
.release_year is updated same fashion as copyright_year.cc was
previously. A difference is that a change in .release will cause
configure to be rerun, which is expensive but I think we can live with
the cost since it only happens once a year.

Location:
trunk/lib
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Makefile.am

    r898 r909  
    3333
    3434noinst_HEADERS = AddStats.h Alias.h BlameStats.h ClassicStats.h \
    35   Commitment.h Configuration.h copyright_year.h css.h\
     35  Commitment.h Configuration.h css.h \
    3636  Date.h Directory.h File.h first_page.h Functor.h \
    3737  Graph.h \
     
    4444libsvndigest_a_SOURCES = AddStats.cc Alias.cc BlameStats.cc \
    4545  ClassicStats.cc \
    46   Commitment.cc Configuration.cc copyright_year.cc \
     46  Commitment.cc Configuration.cc \
    4747  css.cc Date.cc Directory.cc File.cc first_page.cc\
    4848  Functor.cc Graph.cc HtmlBuf.cc HtmlStream.cc \
     
    7070  $(srcdir)/subversion_info.cc.in >> $@ ;
    7171
    72 # update copyright year automatically (if we build from svn wc)
    73 $(srcdir)/copyright_year.cc: copyright_year.cc.tmp
    74   @$(MOVE_IF_CHANGE) copyright_year.cc.tmp $@
    75 
    76 copyright_year.cc.tmp: FORCE
    77   @if (echo $(SVN_REVISION) | $(GREP) M); then \
    78     $(SED) -e 's/"20[0-9][0-9]"/'\"`date -u "+%Y"`\"'/g' \
    79       $(srcdir)/copyright_year.cc > $@ ; \
    80   else \
    81     cp $(srcdir)/copyright_year.cc $@; \
    82   fi
    83 
    8472else
    8573# this is needed in 'svn export' build
  • trunk/lib/OptionVersion.cc

    r902 r909  
    2222#include <config.h>
    2323
    24 #include "copyright_year.h"
    2524#include "OptionVersion.h"
    2625#include "subversion_info.h"
     
    6564         << ")";
    6665    }
    67     cs << "\n\nCopyright (C) " << svn_year()
     66    cs << "\n\nCopyright (C) " << RELEASE_YEAR
    6867       << " Jari H\u00E4kkinen and Peter Johansson.\n"
    6968       << "This is free software. You may redistribute copies of it under "
Note: See TracChangeset for help on using the changeset viewer.