Changeset 909 for trunk/Makefile.am


Ignore:
Timestamp:
Nov 29, 2009, 11:43:01 PM (11 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r874 r909  
    2727SUBDIRS = lib bin man test
    2828
    29 EXTRA_dist = build_support/move-if-change
     29EXTRA_dist = build_support/move-if-change .release_year
     30MOVE_IF_CHANGE = $(SHELL) $(top_srcdir)/build_support/move-if-change
    3031
    3132clean-local:
    3233  rm -rf svndigest *~
     34
     35.PHONY: .release_year.tmp
     36if HAVE_SVN_WC
     37# update copyright year automatically (if we build from svn wc)
     38$(srcdir)/.release_year: .release_year.tmp
     39  @$(MOVE_IF_CHANGE) $@.tmp $@
     40
     41.release_year.tmp:
     42  @if ($(SVNVERSION) $(top_srcdir) | $(GREP) M > /dev/null); then \
     43     date -u "+%Y" > .release_year.tmp; \
     44  else \
     45     cp $(srcdir)/.release_year $@; \
     46  fi
     47endif
     48
    3349
    3450# This is a workaround to avoid a broken make when .m4 files are
Note: See TracChangeset for help on using the changeset viewer.