Changeset 2425


Ignore:
Timestamp:
Feb 13, 2011, 12:54:53 AM (11 years ago)
Author:
Peter
Message:

remove YAT_SVN_RELEASE that accidentily had been included in yat_am_macros.m4. Fix some errors in first version

Location:
trunk/m4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_am_macros.m4

    r2424 r2425  
    2323#
    2424])
    25 
    26 # YAT_SVN_RELASE([AM_FILE = maintainer.am])
    27 #
    28 # Creates a few make rules useful for maintainer. You need to add
    29 #
    30 # include $(srcdir)/maintainer.am
    31 #
    32 # in your top Makefile.am. The main targets are `maintainer-check' and
    33 # `release'. maintainer-check 'svn exports' from the local wc and try
    34 # to build from this pristine directory via './boostrap; ./configure
    35 # $(DISTCHECK_CONFIGURE_FLAGS); make'. You can add additional target
    36 # that should be run within maintainer-check by defining variable
    37 # `MAINTAINER_CHECK_LOCAL'. The target `release' runs
    38 # `maintainer-check' in addition to some more sanity checks such as
    39 # checking that wc is not modified compared with repository and
    40 # finishes by running distcheck.
    41 #
    42 AC_DEFUN([YAT_SVN_RELEASE],
    43 [
    44   AC_REQUIRE([AC_PROG_SED])       
    45   AC_REQUIRE([AC_PROG_EGREP])       
    46   AC_CHECK_PROGS([MD5], [md5sum gmd5sum md5 md5deep], [no])
    47   m4_pushdef([YAT_OUTPUTFILE], [m4_default([$1], [maintainer.am])])
    48 
    49   AX_AC_PRINT_TO_FILE(YAT_OUTPUTFILE,
    50 [#  ]YAT_OUTPUTFILE[ generated by autoconf from $0
    51 ]yat_am_macros_copyright[
    52 .PHONY: check-svn-diff check-news check-news-date check-version \\
    53         check-release-tools maintainer-check release
    54 
    55 # stub rule to work around bug in Automake
    56 \$(srcdir)/]YAT_OUTPUTFILE[:
    57 
    58 check-svn-diff:
    59   @str=\`svn diff -rHEAD \$(srcdir)\`; \\
    60   if test -n \"\$\$str\"; then \\
    61     echo \"\$\$str\" 1>&2;\\
    62     exit 1;\\
    63   fi
    64 
    65 check-news:
    66   @case \`sed 15q \$(srcdir)/NEWS\` in \\
    67   *\"\$(VERSION)\"*);; \\
    68   *) \\
    69     echo \"NEWS not updated\" 1>&2; \\
    70     exit 1;; \\
    71   esac
    72 
    73 check-news-date:
    74   @today=\`date -u \"+%%e %%B %%Y\"\`; \\
    75   case \`sed 15q \$(srcdir)/NEWS\` in \\
    76   *\"\$\$today\"*);; \\
    77   *) \\
    78     echo \"NEWS: release date incorrect; expected '\$\$today'\" 1>&2;\\
    79     exit 1;; \\
    80   esac
    81 
    82 check-version:
    83   @echo \$(VERSION) | \$(EGREP) '^[0-9]+(\\.[0-9]+)+\$\$' > /dev/null || \\
    84   { echo \"invalid version string: \$(VERSION)\" 1>&2; exit 1; }
    85 
    86 check-release-tools:
    87   @test \"x\$(MD5)\" != \"xno\" || \\
    88   (echo \"no tool to calculate MD5 checksum available\" 1>&2 && exit 1)
    89 
    90 mc_exportdir=_exported
    91 
    92 maintainer-check:
    93   rm -rf \$(mc_exportdir)
    94   svn export \$(srcdir) \$(mc_exportdir)
    95   mkdir \$(mc_exportdir)/_build
    96   @cd \$(mc_exportdir) \\
    97   && echo \"./bootstrap\" \\
    98   && ./bootstrap \\
    99   && cd _build \\
    100   && ../configure --srcdir=.. \$(DISTCHECK_CONFIGURE_FLAGS) \\
    101   && ( test -z \"\$(MAINTAINER_CHECK_LOCAL)\" || \\
    102         \$(MAKE) \$(AM_MAKEFLAGS) \$(MAINTAINER_CHECK_LOCAL) ) \\
    103   && \$(MAKE) \$(AM_MAKEFLAGS) dist \\
    104   && rm -rf \$(mc_exportdir)
    105 
    106 release: all
    107   \$(MAKE) \$(AM_MAKEFLAGS) check-release-tools
    108   @test -z \"\$(RELEASE_LOCAL)\" || \$(MAKE) \$(AM_MAKEFLAGS) \$(RELEASE_LOCAL)
    109   \$(MAKE) \$(AM_MAKEFLAGS) check-version
    110   \$(MAKE) \$(AM_MAKEFLAGS) check-news
    111   \$(MAKE) \$(AM_MAKEFLAGS) check-news-date
    112   \$(MAKE) \$(AM_MAKEFLAGS) check-svn-diff
    113   \$(MAKE) \$(AM_MAKEFLAGS) maintainer-check
    114   \$(MAKE) \$(AM_MAKEFLAGS) distcheck
    115   @for a in \$(DIST_ARCHIVES); do \\
    116     \$(MD5) \$\$a > \$\$a.MD5; \\
    117   done;
    118   @test -z \"\$(RELEASE_HOOK)\" || \$(MAKE) \$(AM_MAKEFLAGS) \$(RELEASE_HOOK)
    119 ])
    120   m4_popdef([YAT_OUTPUTFILE])
    121 
    122 ]) # YAT_SVN_RELEASE
    123 
    12425
    12526# YAT_HAVE_SVN_WC
     
    19394                       ])
    19495            ])
     96dnl create dummy file in 'svn export'
     97m4_syscmd([test -d .svn || test -r ]yat_svn_revision_FILE[ || \
     98           echo "exported" > ]yat_svn_revision_FILE[])
    19599dnl write top of am file
    196100_YAT_AM_TOP(YAT_AM_FILE)
     
    198102dnl write rules to create .revision
    199103_YAT_AC_APPEND_TO_FILE(YAT_AM_FILE,
    200 EXTRA_DIST += $(yat__revision_file)
     104EXTRA_DIST += yat_svn_revision_FILE
    201105if HAVE_SVN_WC
    202106YAT_SVN_REVISION_FORCE:
     
    204108  @$(SVNVERSION) $(srcdir) > [$][@]-t \
    205109  && $(MOVE_IF_CHANGE) [$][@]-t [$][@]
    206 else
    207 ## this is needed in 'svn export' build
    208 $(srcdir)/yat_svn_revision_FILE:
    209   echo "" > [$][@]
    210110endif
    211111)
     
    256156  revision=$$(cat $(srcdir)/]yat_INPUT_FILE[) \
    257157  && sed "s|@]yat_REVISION_DEFINE[@|$$revision|g" < $(srcdir)/]yat_HEADER_FILE.in[ \
    258   > $(builddir)/]yat_HEADER_FILE[-t \
    259   && mv $(builddir)/]yat_HEADER_FILE[ $(builddir)/]yat_HEADER_FILE[
     158  > [$][@]-t && mv [$][@]-t [$][@]
    260159)
    261160m4_popdef([yat_AM_FILE])
     
    319218AX_AC_PRINT_TO_FILE([$1],dnl
    320219[# ]$1[ generated automatically by GNU Autoconf
    321 ]yat_svn_copyright[
     220]yat_am_macros_copyright[
    322221# stub rule to work around bug in Automake
    323222\$(top_srcdir)/]$1[:
  • trunk/m4/yat_svn_release.m4

    r2350 r2425  
    11## $Id$
    22
    3 # serial 4 (yat 0.7)
     3# serial 5 (yat 0.8)
    44
    55# SYNOPSIS
     
    1313#     include $(srcdir)/maintainer.am
    1414#
    15 #   to your top Makefile.am.
     15#   in your top Makefile.am. The main targets are `maintainer-check'
     16#   and `release'. maintainer-check 'svn exports' from the local wc
     17#   and try to build from this pristine directory via './boostrap;
     18#   ./configure $(DISTCHECK_CONFIGURE_FLAGS); make'. You can add
     19#   additional target that should be run within maintainer-check by
     20#   defining variable `MAINTAINER_CHECK_LOCAL'. The target `release'
     21#   runs `maintainer-check' in addition to some more sanity checks
     22#   such as checking that wc is not modified compared with repository
     23#   and finishes by running distcheck.
    1624#
    1725# COPYLEFT
    1826m4_define([yat_svn_release_copyright], [
    1927#
    20 #   Copyright (C) 2009, 2010 Peter Johansson
     28#   Copyright (C) 2009, 2010, 2011 Peter Johansson
    2129#
    2230#   This file is part of the yat library, http://dev.thep.lu.se/yat
Note: See TracChangeset for help on using the changeset viewer.