Changeset 540 for trunk/lib/Makefile.am


Ignore:
Timestamp:
Dec 29, 2007, 3:40:23 AM (14 years ago)
Author:
Peter Johansson
Message:

fixes automatic update of revision and copyright year in --version output. Options --version and --verbose can no be combined to get a slightly more detailed description.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Makefile.am

    r532 r540  
    4242  SVNblame.cc SVNinfo.cc SVNlog.cc SVNproperty.cc Trac.cc utility.cc
    4343
     44BUILT_SOURCES=subversion_info.h
     45
     46EXTRA_DIST=subversion_info.h
     47
    4448clean-local:
    45   rm -rf *~
     49  rm -rf *~ subversion_info.h
     50
     51all-local:
     52
     53if HAVE_SVN_WC
     54subversion_info.h: subversion_info.h.tmp
     55  @if [ ! -f $@ ]; then touch $@; fi; \
     56  diff $@ subversion_info.h.tmp > subversion_info.h.diff; \
     57  if test -s "subversion_info.h.diff"; then \
     58    mv subversion_info.h.tmp subversion_info.h; \
     59    $(ECHO) creating subversion_info.h; \
     60  fi; \
     61  rm -f subversion_info.h.tmp subversion_info.h.diff ;
     62
     63
     64subversion_info.h.tmp: FORCE
     65  @$(ECHO) '// svn_version.h generated from svn_version.h.in.' > $@ ;\
     66  revision=`$(SVNVERSION) $(top_srcdir)` ;\
     67  year=`svn info $(top_srcdir)| sed -n  's/.*Date: \(.*\)-..-.*/\1/p'`;\
     68  echo $$year; \
     69  $(SED) -e 's/sub_2_svn_revision/'$$revision'/g' \
     70  -e 's/sub_2_svn_year/'$$year'/g'  subversion_info.h.in >> $@ ;
     71endif
     72
     73FORCE:
Note: See TracChangeset for help on using the changeset viewer.