Changeset 1458 for trunk


Ignore:
Timestamp:
Jan 9, 2012, 3:34:58 AM (9 years ago)
Author:
Peter Johansson
Message:

update macro from yat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_am_macros.m4

    r1446 r1458  
    1 ## $Id: yat_am_macros.m4 2552 2011-08-14 15:21:43Z peter $
    2 
    3 # serial 8 (yat 0.8)
     1## $Id: yat_am_macros.m4 2680 2012-01-09 02:28:59Z peter $
     2
     3# serial 9 (yat 0.9)
    44
    55m4_define([yat_am_macros_copyright], [
     
    9191  AS_VAR_IF([have_svn_wc], [yes], [
    9292             AS_VAR_IF([SVNVERSION], [false], [
    93                         AC_MSG_ERROR([could not find svnversion, which is 
     93                        AC_MSG_ERROR([could not find svnversion, which is
    9494                         required when building from a subversion working copy])
    9595                       ])
     
    110110  && $(MOVE_IF_CHANGE) [$][@]-t [$][@]
    111111endif
    112 ) 
     112)
    113113dnl end AX_AC_APPEND_TO_FILE
    114114m4_popdef([YAT_AM_FILE])
     
    130130# macro YAT_SVN_REVISION.  You need to declare the following variables
    131131# in your Makefile.am:
    132 #   BUILT_SOURCES = 
    133 #   DISTCLEANFILES = 
     132#   BUILT_SOURCES =
     133#   DISTCLEANFILES =
    134134#   EXTRA_DIST =
    135135#
     
    137137[
    138138AC_REQUIRE([YAT_PROG_MOVE_IF_CHANGE])
    139 m4_pushdef([yat_AM_FILE], [m4_default([$1], [svn_revision_header.am])]) 
     139m4_pushdef([yat_AM_FILE], [m4_default([$1], [svn_revision_header.am])])
    140140m4_define([yat_HEADER_FILE], [m4_default([$2], [svn_revision.h])])
    141 m4_pushdef([yat_REVISION_DEFINE], [m4_default([$3], [SVN_REVISION])]) 
     141m4_pushdef([yat_REVISION_DEFINE], [m4_default([$3], [SVN_REVISION])])
    142142m4_pushdef([yat_INPUT_FILE], [m4_default([$4], [.revision])])
    143143
     
    186186AC_REQUIRE([_YAT_PROG_SVNVERSION])
    187187AC_REQUIRE([YAT_PROG_MOVE_IF_CHANGE])
     188m4_pushdef([YAT_am_file], [m4_default([$1], [svn_release_year.am])])
     189m4_pushdef([YAT_release_year], [m4_default([$2], [.release_year])])
    188190# .release_year is generated during make so in order to avoid bootstrap problem
    189 test -r $srcdir/$2 || date -u "+%Y" > $srcdir/$2
     191test -r $srcdir/YAT_release_year || date -u "+%Y" > $srcdir/YAT_release_year
    190192# propagate RELEASE_YEAR from file .release_year
    191 RELEASE_YEAR=`cat "$srcdir/$2"`
     193RELEASE_YEAR=`cat "$srcdir/YAT_release_year"`
    192194AC_SUBST([RELEASE_YEAR])
    193 AC_DEFINE_UNQUOTED([RELEASE_YEAR], ["$RELEASE_YEAR"], 
     195AC_DEFINE_UNQUOTED([RELEASE_YEAR], ["$RELEASE_YEAR"],
    194196                   [Define year package was last modified])
    195197dnl generate make rule for .release_year
    196 _YAT_AM_TOP([$1])
    197 _YAT_AC_APPEND_TO_FILE([$1],
    198 EXTRA_DIST += $(srcdir)/$2
    199 CONFIG_STATUS_DEPENDENCIES += $(srcdir)/$2
     198_YAT_AM_TOP(YAT_am_file)
     199_YAT_AC_APPEND_TO_FILE(YAT_am_file,
     200EXTRA_DIST += $(srcdir)/YAT_release_year
     201CONFIG_STATUS_DEPENDENCIES += $(srcdir)/YAT_release_year
    200202RELEASE_YEAR_FORCE:
    201203if HAVE_SVN_WC
    202 $(srcdir)/$2: RELEASE_YEAR_FORCE
     204$(srcdir)/YAT_release_year: RELEASE_YEAR_FORCE
    203205  @if $(SVNVERSION) $(srcdir) | grep 'M' > /dev/null; then \
    204206     date -u "+%%Y" > [$][@]-t \
     
    207209endif
    208210)
     211m4_popdef([YAT_am_file])
     212m4_popdef([YAT_release_year])
    209213]) # YAT_SVN_RELEASE_YEAR
    210214
     
    233237AC_DEFUN([_YAT_AC_APPEND_TO_FILE],
    234238[
    235 AX_AC_APPEND_TO_FILE([$1], 
     239AX_AC_APPEND_TO_FILE([$1],
    236240m4_bpatsubsts([$2], [\$], [${AX_DOLLAR}],
    237241                    [\\], [${AX_BS}],
     
    240244
    241245
    242 # _YAT_PROG_SVNVERSION 
     246# _YAT_PROG_SVNVERSION
    243247#
    244248# Wrapper around AC_PATH_PROG to allow using it as argument to
Note: See TracChangeset for help on using the changeset viewer.