Changeset 1616


Ignore:
Timestamp:
Feb 21, 2023, 9:10:31 AM (7 months ago)
Author:
Peter Johansson
Message:

update 3rd-party autoconf macros

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1613 r1616  
    164164  @echo "creating $@"
    165165
    166 STABLE_VERSION = $(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)
    167 STABLE_BRANCH = ^/branches/$(STABLE_VERSION)-stable
    168 
    169 # create a tag from current stable branch; depends on check-version to
    170 # ensure that version is macro.minor.micro (no pre suffix), that wc is
    171 # pristine and updated.
    172 svn-tag: check-version check-svn-diff
    173   svn copy $(STABLE_BRANCH) ^/tags/$(VERSION) \
    174   -m "tagging version $(VERSION)"
    175 
    176 # create a stable-branch from trunk
    177 svn-stable-branch: check-svn-diff all
    178   svn copy ^/trunk $(STABLE_BRANCH) \
    179   -m "New stable branch $(STABLE_VERSION)" \
    180   && svn co $(STABLE_BRANCH) ../svndigest-$(STABLE_VERSION).x \
    181   && bin/svndigest-copy-cache -v -t ../svndigest-$(STABLE_VERSION).x
    182 
    183166syntax-check: assert-header-without-use \
    184167  assert-without-header \
  • trunk/configure.ac

    r1613 r1616  
    329329
    330330dnl maintainer make rules from yat project
    331 YAT_SVN_RELEASE
     331YAT_SVN_RELEASE([maintainer.am],
     332  [$(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)],
     333  [libyat@frs.sourceforge.net:/home/frs/project/s/sv/svndigest],
     334  [https://sourceforge.net/projects/svndigest/files/$(distdir).tar.gz/files],
     335  [https://dev.thep.lu.se/svndigest/browser/tags/$(VERSION)/NEWS])
     336
    332337YAT_SVN_REVISION
    333338YAT_REVISION_HEADER
     
    346351                [chmod +x-w build_support/dummy_help2man.sh])
    347352
    348 AC_CONFIG_HEADER([yat/config_public.h])
     353AC_CONFIG_HEADERS([yat/config_public.h])
    349354
    350355# Print failure status information about selected items, and exit if
  • trunk/m4/ax_ac_append_to_file.m4

    r1463 r1616  
    11# ===========================================================================
    2 #   http://www.gnu.org/software/autoconf-archive/ax_ac_append_to_file.html
     2#   https://www.gnu.org/software/autoconf-archive/ax_ac_append_to_file.html
    33# ===========================================================================
    44#
     
    2121#   warranty.
    2222
    23 #serial 8
     23#serial 10
    2424
    2525AC_DEFUN([AX_AC_APPEND_TO_FILE],[
     
    2828AX_FILE_ESCAPES
    2929[
    30 printf "$2" >> "$1"
     30printf "%s" "$2" >> "$1"
    3131])
    3232])
  • trunk/m4/ax_ac_print_to_file.m4

    r1463 r1616  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_ac_print_to_file.html
     2#   https://www.gnu.org/software/autoconf-archive/ax_ac_print_to_file.html
    33# ===========================================================================
    44#
     
    2222#   warranty.
    2323
    24 #serial 8
     24#serial 10
    2525
    2626AC_DEFUN([AX_AC_PRINT_TO_FILE],[
     
    2828AC_REQUIRE([AX_FILE_ESCAPES])
    2929[
    30 printf "$2" > "$1"
     30printf "%s" "$2" > "$1"
    3131])
    3232])
  • trunk/m4/ax_append_compile_flags.m4

    r1510 r1616  
    1 # ===========================================================================
    2 #  http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
    3 # ===========================================================================
     1# ============================================================================
     2#  https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
     3# ============================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
     7#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2121#   force the compiler to issue an error when a bad flag is given.
    2222#
     23#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
     24#
    2325#   NOTE: This macro depends on the AX_APPEND_FLAG and
    2426#   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
     
    2931#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    3032#
    31 #   This program is free software: you can redistribute it and/or modify it
    32 #   under the terms of the GNU General Public License as published by the
    33 #   Free Software Foundation, either version 3 of the License, or (at your
    34 #   option) any later version.
    35 #
    36 #   This program is distributed in the hope that it will be useful, but
    37 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    38 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    39 #   Public License for more details.
    40 #
    41 #   You should have received a copy of the GNU General Public License along
    42 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    43 #
    44 #   As a special exception, the respective Autoconf Macro's copyright owner
    45 #   gives unlimited permission to copy, distribute and modify the configure
    46 #   scripts that are the output of Autoconf when processing the Macro. You
    47 #   need not follow the terms of the GNU General Public License when using
    48 #   or distributing such scripts, even though portions of the text of the
    49 #   Macro appear in them. The GNU General Public License (GPL) does govern
    50 #   all other use of the material that constitutes the Autoconf Macro.
    51 #
    52 #   This special exception to the GPL applies to versions of the Autoconf
    53 #   Macro released by the Autoconf Archive. When you make and distribute a
    54 #   modified version of the Autoconf Macro, you may extend this special
    55 #   exception to the GPL to apply to your modified version as well.
     33#   Copying and distribution of this file, with or without modification, are
     34#   permitted in any medium without royalty provided the copyright notice
     35#   and this notice are preserved.  This file is offered as-is, without any
     36#   warranty.
    5637
    57 #serial 3
     38#serial 7
    5839
    5940AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
    60 [AC_REQUIRE([AX_CHECK_COMPILE_FLAG])
    61 AC_REQUIRE([AX_APPEND_FLAG])
     41[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
     42AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
    6243for flag in $1; do
    63   AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
     44  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
    6445done
    6546])dnl AX_APPEND_COMPILE_FLAGS
  • trunk/m4/ax_append_flag.m4

    r1463 r1616  
    11# ===========================================================================
    2 #      http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
     2#      https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
    33# ===========================================================================
    44#
     
    2424#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    2525#
    26 #   This program is free software: you can redistribute it and/or modify it
    27 #   under the terms of the GNU General Public License as published by the
    28 #   Free Software Foundation, either version 3 of the License, or (at your
    29 #   option) any later version.
    30 #
    31 #   This program is distributed in the hope that it will be useful, but
    32 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    33 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    34 #   Public License for more details.
    35 #
    36 #   You should have received a copy of the GNU General Public License along
    37 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    38 #
    39 #   As a special exception, the respective Autoconf Macro's copyright owner
    40 #   gives unlimited permission to copy, distribute and modify the configure
    41 #   scripts that are the output of Autoconf when processing the Macro. You
    42 #   need not follow the terms of the GNU General Public License when using
    43 #   or distributing such scripts, even though portions of the text of the
    44 #   Macro appear in them. The GNU General Public License (GPL) does govern
    45 #   all other use of the material that constitutes the Autoconf Macro.
    46 #
    47 #   This special exception to the GPL applies to versions of the Autoconf
    48 #   Macro released by the Autoconf Archive. When you make and distribute a
    49 #   modified version of the Autoconf Macro, you may extend this special
    50 #   exception to the GPL to apply to your modified version as well.
     26#   Copying and distribution of this file, with or without modification, are
     27#   permitted in any medium without royalty provided the copyright notice
     28#   and this notice are preserved.  This file is offered as-is, without any
     29#   warranty.
    5130
    52 #serial 2
     31#serial 8
    5332
    5433AC_DEFUN([AX_APPEND_FLAG],
    55 [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
    56 AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
    57 AS_VAR_SET_IF(FLAGS,
    58   [case " AS_VAR_GET(FLAGS) " in
    59     *" $1 "*)
    60       AC_RUN_LOG([: FLAGS already contains $1])
    61       ;;
    62     *)
    63       AC_RUN_LOG([: FLAGS="$FLAGS $1"])
    64       AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
    65       ;;
    66    esac],
    67   [AS_VAR_SET(FLAGS,["$1"])])
     34[dnl
     35AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
     36AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
     37AS_VAR_SET_IF(FLAGS,[
     38  AS_CASE([" AS_VAR_GET(FLAGS) "],
     39    [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
     40    [
     41     AS_VAR_APPEND(FLAGS,[" $1"])
     42     AC_RUN_LOG([: FLAGS="$FLAGS"])
     43    ])
     44  ],
     45  [
     46  AS_VAR_SET(FLAGS,[$1])
     47  AC_RUN_LOG([: FLAGS="$FLAGS"])
     48  ])
    6849AS_VAR_POPDEF([FLAGS])dnl
    6950])dnl AX_APPEND_FLAG
  • trunk/m4/ax_append_link_flags.m4

    r1510 r1616  
    11# ===========================================================================
    2 #   http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
     2#   https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
    33# ===========================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
     7#   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2020#   issue an error when a bad flag is given.
    2121#
     22#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
     23#
    2224#   NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
    2325#   Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
     
    2729#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    2830#
    29 #   This program is free software: you can redistribute it and/or modify it
    30 #   under the terms of the GNU General Public License as published by the
    31 #   Free Software Foundation, either version 3 of the License, or (at your
    32 #   option) any later version.
    33 #
    34 #   This program is distributed in the hope that it will be useful, but
    35 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    36 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    37 #   Public License for more details.
    38 #
    39 #   You should have received a copy of the GNU General Public License along
    40 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    41 #
    42 #   As a special exception, the respective Autoconf Macro's copyright owner
    43 #   gives unlimited permission to copy, distribute and modify the configure
    44 #   scripts that are the output of Autoconf when processing the Macro. You
    45 #   need not follow the terms of the GNU General Public License when using
    46 #   or distributing such scripts, even though portions of the text of the
    47 #   Macro appear in them. The GNU General Public License (GPL) does govern
    48 #   all other use of the material that constitutes the Autoconf Macro.
    49 #
    50 #   This special exception to the GPL applies to versions of the Autoconf
    51 #   Macro released by the Autoconf Archive. When you make and distribute a
    52 #   modified version of the Autoconf Macro, you may extend this special
    53 #   exception to the GPL to apply to your modified version as well.
     31#   Copying and distribution of this file, with or without modification, are
     32#   permitted in any medium without royalty provided the copyright notice
     33#   and this notice are preserved.  This file is offered as-is, without any
     34#   warranty.
    5435
    55 #serial 3
     36#serial 7
    5637
    5738AC_DEFUN([AX_APPEND_LINK_FLAGS],
    58 [AC_REQUIRE([AX_CHECK_LINK_FLAG])
    59 AC_REQUIRE([AX_APPEND_FLAG])
     39[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
     40AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
    6041for flag in $1; do
    61   AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
     42  AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
    6243done
    6344])dnl AX_APPEND_LINK_FLAGS
  • trunk/m4/ax_check_compile_flag.m4

    r1463 r1616  
    11# ===========================================================================
    2  http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
     2https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
    33# ===========================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
     7#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2020#   force the compiler to issue an error when a bad flag is given.
    2121#
     22#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
     23#
    2224#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
    2325#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
     
    2830#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    2931#
    30 #   This program is free software: you can redistribute it and/or modify it
    31 #   under the terms of the GNU General Public License as published by the
    32 #   Free Software Foundation, either version 3 of the License, or (at your
    33 #   option) any later version.
    34 #
    35 #   This program is distributed in the hope that it will be useful, but
    36 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    37 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    38 #   Public License for more details.
    39 #
    40 #   You should have received a copy of the GNU General Public License along
    41 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    42 #
    43 #   As a special exception, the respective Autoconf Macro's copyright owner
    44 #   gives unlimited permission to copy, distribute and modify the configure
    45 #   scripts that are the output of Autoconf when processing the Macro. You
    46 #   need not follow the terms of the GNU General Public License when using
    47 #   or distributing such scripts, even though portions of the text of the
    48 #   Macro appear in them. The GNU General Public License (GPL) does govern
    49 #   all other use of the material that constitutes the Autoconf Macro.
    50 #
    51 #   This special exception to the GPL applies to versions of the Autoconf
    52 #   Macro released by the Autoconf Archive. When you make and distribute a
    53 #   modified version of the Autoconf Macro, you may extend this special
    54 #   exception to the GPL to apply to your modified version as well.
     32#   Copying and distribution of this file, with or without modification, are
     33#   permitted in any medium without royalty provided the copyright notice
     34#   and this notice are preserved.  This file is offered as-is, without any
     35#   warranty.
    5536
    56 #serial 2
     37#serial 6
    5738
    5839AC_DEFUN([AX_CHECK_COMPILE_FLAG],
    59 [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
     40[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
    6041AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
    6142AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
    6243  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
    6344  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
    64   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
     45  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
    6546    [AS_VAR_SET(CACHEVAR,[yes])],
    6647    [AS_VAR_SET(CACHEVAR,[no])])
    6748  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
    68 AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
     49AS_VAR_IF(CACHEVAR,yes,
    6950  [m4_default([$2], :)],
    7051  [m4_default([$3], :)])
  • trunk/m4/ax_check_link_flag.m4

    r1463 r1616  
    11# ===========================================================================
    2 #    http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
     2#    https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
    33# ===========================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
     7#   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2020#   issue an error when a bad flag is given.
    2121#
     22#   INPUT gives an alternative input source to AC_LINK_IFELSE.
     23#
    2224#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
    2325#   macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
     
    2830#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    2931#
    30 #   This program is free software: you can redistribute it and/or modify it
    31 #   under the terms of the GNU General Public License as published by the
    32 #   Free Software Foundation, either version 3 of the License, or (at your
    33 #   option) any later version.
    34 #
    35 #   This program is distributed in the hope that it will be useful, but
    36 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    37 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    38 #   Public License for more details.
    39 #
    40 #   You should have received a copy of the GNU General Public License along
    41 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    42 #
    43 #   As a special exception, the respective Autoconf Macro's copyright owner
    44 #   gives unlimited permission to copy, distribute and modify the configure
    45 #   scripts that are the output of Autoconf when processing the Macro. You
    46 #   need not follow the terms of the GNU General Public License when using
    47 #   or distributing such scripts, even though portions of the text of the
    48 #   Macro appear in them. The GNU General Public License (GPL) does govern
    49 #   all other use of the material that constitutes the Autoconf Macro.
    50 #
    51 #   This special exception to the GPL applies to versions of the Autoconf
    52 #   Macro released by the Autoconf Archive. When you make and distribute a
    53 #   modified version of the Autoconf Macro, you may extend this special
    54 #   exception to the GPL to apply to your modified version as well.
     32#   Copying and distribution of this file, with or without modification, are
     33#   permitted in any medium without royalty provided the copyright notice
     34#   and this notice are preserved.  This file is offered as-is, without any
     35#   warranty.
    5536
    56 #serial 2
     37#serial 6
    5738
    5839AC_DEFUN([AX_CHECK_LINK_FLAG],
    59 [AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
     40[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
     41AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
    6042AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
    6143  ax_check_save_flags=$LDFLAGS
    6244  LDFLAGS="$LDFLAGS $4 $1"
    63   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
     45  AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
    6446    [AS_VAR_SET(CACHEVAR,[yes])],
    6547    [AS_VAR_SET(CACHEVAR,[no])])
    6648  LDFLAGS=$ax_check_save_flags])
    67 AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
     49AS_VAR_IF(CACHEVAR,yes,
    6850  [m4_default([$2], :)],
    6951  [m4_default([$3], :)])
  • trunk/m4/ax_check_preproc_flag.m4

    r1463 r1616  
    11# ===========================================================================
    2  http://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
     2https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html
    33# ===========================================================================
    44#
    55# SYNOPSIS
    66#
    7 #   AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
     7#   AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
    88#
    99# DESCRIPTION
     
    2020#   preprocessor to issue an error when a bad flag is given.
    2121#
     22#   INPUT gives an alternative input source to AC_PREPROC_IFELSE.
     23#
    2224#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
    2325#   macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG.
     
    2830#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
    2931#
    30 #   This program is free software: you can redistribute it and/or modify it
    31 #   under the terms of the GNU General Public License as published by the
    32 #   Free Software Foundation, either version 3 of the License, or (at your
    33 #   option) any later version.
    34 #
    35 #   This program is distributed in the hope that it will be useful, but
    36 #   WITHOUT ANY WARRANTY; without even the implied warranty of
    37 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    38 #   Public License for more details.
    39 #
    40 #   You should have received a copy of the GNU General Public License along
    41 #   with this program. If not, see <http://www.gnu.org/licenses/>.
    42 #
    43 #   As a special exception, the respective Autoconf Macro's copyright owner
    44 #   gives unlimited permission to copy, distribute and modify the configure
    45 #   scripts that are the output of Autoconf when processing the Macro. You
    46 #   need not follow the terms of the GNU General Public License when using
    47 #   or distributing such scripts, even though portions of the text of the
    48 #   Macro appear in them. The GNU General Public License (GPL) does govern
    49 #   all other use of the material that constitutes the Autoconf Macro.
    50 #
    51 #   This special exception to the GPL applies to versions of the Autoconf
    52 #   Macro released by the Autoconf Archive. When you make and distribute a
    53 #   modified version of the Autoconf Macro, you may extend this special
    54 #   exception to the GPL to apply to your modified version as well.
     32#   Copying and distribution of this file, with or without modification, are
     33#   permitted in any medium without royalty provided the copyright notice
     34#   and this notice are preserved.  This file is offered as-is, without any
     35#   warranty.
    5536
    56 #serial 2
     37#serial 6
    5738
    5839AC_DEFUN([AX_CHECK_PREPROC_FLAG],
    59 [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
     40[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
    6041AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
    6142AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
    6243  ax_check_save_flags=$CPPFLAGS
    6344  CPPFLAGS="$CPPFLAGS $4 $1"
    64   AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
     45  AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
    6546    [AS_VAR_SET(CACHEVAR,[yes])],
    6647    [AS_VAR_SET(CACHEVAR,[no])])
    6748  CPPFLAGS=$ax_check_save_flags])
    68 AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
     49AS_VAR_IF(CACHEVAR,yes,
    6950  [m4_default([$2], :)],
    7051  [m4_default([$3], :)])
  • trunk/m4/ax_file_escapes.m4

    r1463 r1616  
    11# ===========================================================================
    2 #      http://www.gnu.org/software/autoconf-archive/ax_file_escapes.html
     2#     https://www.gnu.org/software/autoconf-archive/ax_file_escapes.html
    33# ===========================================================================
    44#
     
    2020#   warranty.
    2121
    22 #serial 7
     22#serial 8
    2323
    2424AC_DEFUN([AX_FILE_ESCAPES],[
  • trunk/m4/pkg.m4

    r1495 r1616  
    1 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
    2 # serial 1 (pkg-config-0.24)
    3 #
    4 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
    5 #
    6 # This program is free software; you can redistribute it and/or modify
    7 # it under the terms of the GNU General Public License as published by
    8 # the Free Software Foundation; either version 2 of the License, or
    9 # (at your option) any later version.
    10 #
    11 # This program is distributed in the hope that it will be useful, but
    12 # WITHOUT ANY WARRANTY; without even the implied warranty of
    13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14 # General Public License for more details.
    15 #
    16 # You should have received a copy of the GNU General Public License
    17 # along with this program; if not, write to the Free Software
    18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    19 #
    20 # As a special exception to the GNU General Public License, if you
    21 # distribute this file as part of a program that contains a
    22 # configuration script generated by Autoconf, you may include it under
    23 # the same distribution terms that you use for the rest of that program.
    24 
    25 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
    26 # ----------------------------------
     1# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
     2# serial 12 (pkg-config-0.29.2)
     3
     4dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
     5dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
     6dnl
     7dnl This program is free software; you can redistribute it and/or modify
     8dnl it under the terms of the GNU General Public License as published by
     9dnl the Free Software Foundation; either version 2 of the License, or
     10dnl (at your option) any later version.
     11dnl
     12dnl This program is distributed in the hope that it will be useful, but
     13dnl WITHOUT ANY WARRANTY; without even the implied warranty of
     14dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     15dnl General Public License for more details.
     16dnl
     17dnl You should have received a copy of the GNU General Public License
     18dnl along with this program; if not, write to the Free Software
     19dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     20dnl 02111-1307, USA.
     21dnl
     22dnl As a special exception to the GNU General Public License, if you
     23dnl distribute this file as part of a program that contains a
     24dnl configuration script generated by Autoconf, you may include it under
     25dnl the same distribution terms that you use for the rest of that
     26dnl program.
     27
     28dnl PKG_PREREQ(MIN-VERSION)
     29dnl -----------------------
     30dnl Since: 0.29
     31dnl
     32dnl Verify that the version of the pkg-config macros are at least
     33dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
     34dnl installed version of pkg-config, this checks the developer's version
     35dnl of pkg.m4 when generating configure.
     36dnl
     37dnl To ensure that this macro is defined, also add:
     38dnl m4_ifndef([PKG_PREREQ],
     39dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
     40dnl
     41dnl See the "Since" comment for each macro you use to see what version
     42dnl of the macros you require.
     43m4_defun([PKG_PREREQ],
     44[m4_define([PKG_MACROS_VERSION], [0.29.2])
     45m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     46    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
     47])dnl PKG_PREREQ
     48
     49dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
     50dnl ----------------------------------
     51dnl Since: 0.16
     52dnl
     53dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
     54dnl first found in the path. Checks that the version of pkg-config found
     55dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
     56dnl used since that's the first version where most current features of
     57dnl pkg-config existed.
    2758AC_DEFUN([PKG_PROG_PKG_CONFIG],
    2859[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
    29 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
     60m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
     61m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
    3062AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
    3163AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
     
    4577  fi
    4678fi[]dnl
    47 ])# PKG_PROG_PKG_CONFIG
    48 
    49 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
    50 #
    51 # Check to see whether a particular set of modules exists.  Similar
    52 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
    53 #
    54 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
    55 # only at the first occurence in configure.ac, so if the first place
    56 # it's called might be skipped (such as if it is within an "if", you
    57 # have to call PKG_CHECK_EXISTS manually
    58 # --------------------------------------------------------------
     79])dnl PKG_PROG_PKG_CONFIG
     80
     81dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
     82dnl -------------------------------------------------------------------
     83dnl Since: 0.18
     84dnl
     85dnl Check to see whether a particular set of modules exists. Similar to
     86dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
     87dnl
     88dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
     89dnl only at the first occurence in configure.ac, so if the first place
     90dnl it's called might be skipped (such as if it is within an "if", you
     91dnl have to call PKG_CHECK_EXISTS manually
    5992AC_DEFUN([PKG_CHECK_EXISTS],
    6093[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
     
    6699fi])
    67100
    68 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
    69 # ---------------------------------------------
     101dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
     102dnl ---------------------------------------------
     103dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
     104dnl pkg_failed based on the result.
    70105m4_define([_PKG_CONFIG],
    71106[if test -n "$$1"; then
     
    73108 elif test -n "$PKG_CONFIG"; then
    74109    PKG_CHECK_EXISTS([$3],
    75                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
     110                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
     111          test "x$?" != "x0" && pkg_failed=yes ],
    76112         [pkg_failed=yes])
    77113 else
    78114    pkg_failed=untried
    79115fi[]dnl
    80 ])# _PKG_CONFIG
    81 
    82 # _PKG_SHORT_ERRORS_SUPPORTED
    83 # -----------------------------
     116])dnl _PKG_CONFIG
     117
     118dnl _PKG_SHORT_ERRORS_SUPPORTED
     119dnl ---------------------------
     120dnl Internal check to see if pkg-config supports short errors.
    84121AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
    85122[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
     
    89126        _pkg_short_errors_supported=no
    90127fi[]dnl
    91 ])# _PKG_SHORT_ERRORS_SUPPORTED
    92 
    93 
    94 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
    95 # [ACTION-IF-NOT-FOUND])
    96 #
    97 #
    98 # Note that if there is a possibility the first call to
    99 # PKG_CHECK_MODULES might not happen, you should be sure to include an
    100 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
    101 #
    102 #
    103 # --------------------------------------------------------------
     128])dnl _PKG_SHORT_ERRORS_SUPPORTED
     129
     130
     131dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
     132dnl   [ACTION-IF-NOT-FOUND])
     133dnl --------------------------------------------------------------
     134dnl Since: 0.4.0
     135dnl
     136dnl Note that if there is a possibility the first call to
     137dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
     138dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
    104139AC_DEFUN([PKG_CHECK_MODULES],
    105140[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
     
    108143
    109144pkg_failed=no
    110 AC_MSG_CHECKING([for $1])
     145AC_MSG_CHECKING([for $2])
    111146
    112147_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
     
    118153
    119154if test $pkg_failed = yes; then
    120     AC_MSG_RESULT([no])
     155        AC_MSG_RESULT([no])
    121156        _PKG_SHORT_ERRORS_SUPPORTED
    122157        if test $_pkg_short_errors_supported = yes; then
    123           $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
    124         else 
    125           $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
     158          $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
     159        else
     160          $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
    126161        fi
    127162  # Put the nasty error message in config.log where it belongs
     
    136171installed software in a non-standard prefix.
    137172
    138 _PKG_TEXT])dnl
     173_PKG_TEXT])[]dnl
    139174        ])
    140175elif test $pkg_failed = untried; then
    141       AC_MSG_RESULT([no])
     176        AC_MSG_RESULT([no])
    142177  m4_default([$4], [AC_MSG_FAILURE(
    143178[The pkg-config script could not be found or is too old.  Make sure it
     
    147182_PKG_TEXT
    148183
    149 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
     184To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
    150185        ])
    151186else
     
    155190  $3
    156191fi[]dnl
    157 ])# PKG_CHECK_MODULES
     192])dnl PKG_CHECK_MODULES
     193
     194
     195dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
     196dnl   [ACTION-IF-NOT-FOUND])
     197dnl ---------------------------------------------------------------------
     198dnl Since: 0.29
     199dnl
     200dnl Checks for existence of MODULES and gathers its build flags with
     201dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
     202dnl and VARIABLE-PREFIX_LIBS from --libs.
     203dnl
     204dnl Note that if there is a possibility the first call to
     205dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
     206dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
     207dnl configure.ac.
     208AC_DEFUN([PKG_CHECK_MODULES_STATIC],
     209[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
     210_save_PKG_CONFIG=$PKG_CONFIG
     211PKG_CONFIG="$PKG_CONFIG --static"
     212PKG_CHECK_MODULES($@)
     213PKG_CONFIG=$_save_PKG_CONFIG[]dnl
     214])dnl PKG_CHECK_MODULES_STATIC
     215
     216
     217dnl PKG_INSTALLDIR([DIRECTORY])
     218dnl -------------------------
     219dnl Since: 0.27
     220dnl
     221dnl Substitutes the variable pkgconfigdir as the location where a module
     222dnl should install pkg-config .pc files. By default the directory is
     223dnl $libdir/pkgconfig, but the default can be changed by passing
     224dnl DIRECTORY. The user can override through the --with-pkgconfigdir
     225dnl parameter.
     226AC_DEFUN([PKG_INSTALLDIR],
     227[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
     228m4_pushdef([pkg_description],
     229    [pkg-config installation directory @<:@]pkg_default[@:>@])
     230AC_ARG_WITH([pkgconfigdir],
     231    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
     232    [with_pkgconfigdir=]pkg_default)
     233AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
     234m4_popdef([pkg_default])
     235m4_popdef([pkg_description])
     236])dnl PKG_INSTALLDIR
     237
     238
     239dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
     240dnl --------------------------------
     241dnl Since: 0.27
     242dnl
     243dnl Substitutes the variable noarch_pkgconfigdir as the location where a
     244dnl module should install arch-independent pkg-config .pc files. By
     245dnl default the directory is $datadir/pkgconfig, but the default can be
     246dnl changed by passing DIRECTORY. The user can override through the
     247dnl --with-noarch-pkgconfigdir parameter.
     248AC_DEFUN([PKG_NOARCH_INSTALLDIR],
     249[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
     250m4_pushdef([pkg_description],
     251    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
     252AC_ARG_WITH([noarch-pkgconfigdir],
     253    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
     254    [with_noarch_pkgconfigdir=]pkg_default)
     255AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
     256m4_popdef([pkg_default])
     257m4_popdef([pkg_description])
     258])dnl PKG_NOARCH_INSTALLDIR
     259
     260
     261dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
     262dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
     263dnl -------------------------------------------
     264dnl Since: 0.28
     265dnl
     266dnl Retrieves the value of the pkg-config variable for the given module.
     267AC_DEFUN([PKG_CHECK_VAR],
     268[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
     269AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
     270
     271_PKG_CONFIG([$1], [variable="][$3]["], [$2])
     272AS_VAR_COPY([$1], [pkg_cv_][$1])
     273
     274AS_VAR_IF([$1], [""], [$5], [$4])dnl
     275])dnl PKG_CHECK_VAR
  • trunk/m4/yat_am_macros.m4

    r1509 r1616  
    1 ## $Id: yat_am_macros.m4 2807 2012-08-05 23:39:51Z peter $
    2 
    3 # serial 11 (yat 0.9)
     1## $Id: yat_am_macros.m4 3785 2019-01-23 01:28:16Z peter $
     2
     3# serial 12 (yat 0.16)
    44
    55m4_define([yat_am_macros_copyright], [
    66#
    7 #   Copyright (C) 2011, 2012 Peter Johansson
     7#   Copyright (C) 2011, 2012, 2019 Peter Johansson
    88#
    99#   This file is part of the yat library, http://dev.thep.lu.se/yat
     
    204204$(srcdir)/YAT_release_year: RELEASE_YEAR_FORCE
    205205  $(AM_V_at)if $(SVNVERSION) $(srcdir) | grep 'M' > /dev/null; then \
    206      date -u "+%%Y" > [$][@]-t \
     206     date -u "+%Y" > [$][@]-t \
    207207     && $(MOVE_IF_CHANGE) [$][@]-t [$][@]; \
    208208  fi
     
    239239AX_AC_APPEND_TO_FILE([$1],
    240240m4_bpatsubsts([$2], [\$], [${AX_DOLLAR}],
    241                     [\\], [${AX_BS}],
     241                    [\\], [\\\\],
    242242                    [\"], [${AX_DQ}]))
     243
    243244])
    244245
  • trunk/m4/yat_svn_release.m4

    r1509 r1616  
    1 ## $Id: yat_svn_release.m4 2787 2012-07-23 03:14:44Z peter $
    2 
    3 # serial 9 (yat 0.9)
     1## $Id: yat_svn_release.m4 3855 2020-01-02 01:11:34Z peter $
     2
     3# serial 17 (yat 0.17)
    44
    55# SYNOPSIS
     
    99# DESCRIPTION
    1010#
    11 #   Creates a few make rules useful for maintainer. You need to add
    12 #
    13 #     include $(srcdir)/maintainer.am
    14 #
    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.
    2411#
    2512# COPYLEFT
    2613m4_define([yat_svn_release_copyright], [dnl
    2714#
    28 #   Copyright (C) 2009, 2010, 2011, 2012 Peter Johansson
     15#   Copyright (C) 2009, 2010, 2011, 2012, 2014, 2019 Peter Johansson
    2916#
    3017#   This file is part of the yat library, http://dev.thep.lu.se/yat
     
    4532])
    4633
     34
     35AC_DEFUN([YAT_AC_WRITE],
     36[
     37m4_esyscmd([cat > $1 << '__EOF'
     38$2
     39__EOF
     40])
     41])
     42
     43
     44AC_DEFUN([YAT_AC_WRITE_APPEND],
     45[
     46m4_esyscmd([cat >> $1 << '__EOF'
     47$2
     48__EOF
     49])
     50])
     51
     52
     53# YAT_SVN_RELEASE(am-file, stable-version, upload-url, download-url, news-url)
     54# ============================================================================
    4755AC_DEFUN([YAT_SVN_RELEASE],
    4856[
     57  m4_pushdef([YAT_OUTPUTFILE], [m4_default([$1], [maintainer.am])])
     58
    4959  AC_REQUIRE([AC_PROG_SED])
    5060  AC_REQUIRE([AC_PROG_EGREP])
    51   AC_CHECK_PROGS([MD5], [md5sum gmd5sum md5 md5deep], [no])
    52   m4_pushdef([YAT_OUTPUTFILE], [m4_default([$1], [maintainer.am])])
    53 
    54   AX_AC_PRINT_TO_FILE(YAT_OUTPUTFILE,
    55 [#  ]YAT_OUTPUTFILE[ generated by autoconf from $0
    56 ]yat_svn_release_copyright[
    57 .PHONY: check-svn-diff check-news check-news-date check-version \\
     61  AC_CHECK_PROGS([MD5], [md5sum gmd5sum md5 md5deep], [false])
     62  AC_CHECK_PROG([SVN], [svn], [svn], false)
     63  AC_CHECK_PROG([SVNCOPYRIGHT], [svncopyright], [svncopyright], [false])
     64  AC_CHECK_PROG([SVNDIGEST_COPY_CACHE], [svndigest-copy-cache],
     65                [svndigest-copy-cache], [false])
     66  AC_CHECK_PROG([SCP], [scp], [scp], [false])
     67
     68  YAT_AC_WRITE(YAT_OUTPUTFILE,
     69[# $1 generated by Autoconf ]AC_AUTOCONF_VERSION[ from macro $0
     70## include this file in Makefile.am
     71
     72STABLE_VERSION = $2
     73STABLE_BRANCH = ^/branches/$(STABLE_VERSION)-stable
     74UPLOAD_URL = $3
     75DOWNLOAD_URL = $4
     76NEWS_URL = $5
     77SVN_LIST_CC = `$(SVN) list -R $(srcdir) | $(EGREP) ".cc$$" | $(SED) 's,^,$(srcdir)/,'`
     78
     79.PHONY: check-svn-diff check-news check-news-date check-version \
    5880        check-release-tools maintainer-check release
    5981
    60 # stub rule to work around bug in Automake 1.11
    61 \$(srcdir)/]YAT_OUTPUTFILE[:
    62 
     82# --------------------------------------------------------------------
     83# Tagging and uploading a release
     84#
     85# This is the main target used at release. It does several checks of
     86# the package, creates a tarball, an svn tag, and uploads the package
     87# to download page.
     88# --------------------------------------------------------------------
     89release-tag-upload:
     90  @test -z "$(RELEASE_LOCAL)" || $(MAKE) $(AM_MAKEFLAGS) $(RELEASE_LOCAL)
     91  $(MAKE) $(AM_MAKEFLAGS) check-release-tools
     92  $(MAKE) $(AM_MAKEFLAGS) release-check
     93  $(MAKE) $(AM_MAKEFLAGS) distcheck
     94  $(MAKE) $(AM_MAKEFLAGS) maintainer-check
     95  $(MAKE) $(AM_MAKEFLAGS) svn-tag
     96  $(SVN) update $(srcdir)
     97  $(MAKE) $(AM_MAKEFLAGS) dist
     98  $(MAKE) $(AM_MAKEFLAGS) $(distdir).tar.gz.MD5
     99  $(MAKE) $(AM_MAKEFLAGS) announce.txt
     100  $(MAKE) $(AM_MAKEFLAGS) upload
     101
     102$(distdir).tar.gz.MD5: $(distdir).tar.gz
     103  $(MD5) $(distdir).tar.gz > $(distdir).tar.gz.MD5
     104
     105# Check that we have all tools needed to do a release
     106check-release-tools:
     107  @test x"$(sf_user)" != x"" || \
     108  { echo "make variable 'sf_user' is empty" >&2; exit 1; }
     109  @test "x$(MD5)" != "xfalse" || \
     110  { echo "no tool to calculate MD5 checksum available" 1>&2 && exit 1; }
     111  @test "x$(SVN)" != "xfalse" || \
     112  { echo "no subversion client available" 1>&2 && exit 1; }
     113  @test "x$(SVNDIGEST_COPY_CACHE)" != "xfalse" || \
     114  { echo "svndigest-copy-cache not available" 1>&2 && exit 1; }
     115  @test "x$(SCP)" != "xfalse" || \
     116  { echo "scp not available" 1>&2 && exit 1; }
     117
     118# upload dist tarball to $(UPLOAD_URL)
     119upload: $(distdir).tar.gz $(distdir).tar.gz.MD5
     120  $(SCP) $(distdir).tar.gz $(distdir).tar.gz.MD5 \
     121  $(sf_user),$(UPLOAD_URL)
     122
     123
     124mc_exportdir = _exported
     125mc_builddir = _exported_build
     126
     127# ---------------------------------------------------------------------
     128# Similar to automake generated distcheck rule
     129#
     130# This rule 'svn export' the local WC and tries to bootstrap, a VPATH
     131# configuration, and check that everything is there to make dist. The
     132# rule is hookable; if variable MAINTAINER_CHECK_LOCAL is non-empty it
     133# will be issued. A typical declaration would be
     134# MAINTAINER_CHECK_LOCAL = check
     135# ---------------------------------------------------------------------
     136maintainer-check:
     137  $(MAKE) $(AM_MAKEFLAGS) syntax-check
     138  rm -rf $(mc_exportdir)
     139  rm -rf $(mc_builddir)
     140  $(SVN) export $(srcdir) $(mc_exportdir)
     141  mkdir $(mc_builddir)
     142  @cd $(mc_exportdir) \
     143  && echo "./bootstrap" \
     144  && ./bootstrap \
     145  && cd ../$(mc_builddir) \
     146  && ../$(mc_exportdir)/configure --srcdir=../$(mc_exportdir) \
     147     $(DISTCHECK_CONFIGURE_FLAGS) \
     148  && { test -z "$(MAINTAINER_CHECK_LOCAL)" || \
     149        $(MAKE) $(AM_MAKEFLAGS) $(MAINTAINER_CHECK_LOCAL); } \
     150  && $(MAKE) $(AM_MAKEFLAGS) dist || exit 1
     151  rm -rf $(mc_builddir) $(mc_exportdir)
     152
     153# -----------------------------------------
     154# Check that package is ready for release
     155# -----------------------------------------
     156release-check: check-news check-news-date check-svn-diff check-version
     157
     158# Check that NEWS mention VERSION early on
     159check-news:
     160  @case `sed 15q $(srcdir)/NEWS` in \
     161  *"$(VERSION)"*);; \
     162  *) \
     163    echo "NEWS not updated" 1>&2; \
     164    exit 1;; \
     165  esac
     166
     167# Check that NEWS mention today's date (in UTC)
     168check-news-date:
     169  @today=`date -u "+%e %B %Y"`; \
     170  case `sed 15q $(srcdir)/NEWS` in \
     171  *"$$today"*);; \
     172  *) \
     173    echo "NEWS: release date incorrect; expected '$$today'" 1>&2;\
     174    exit 1;; \
     175  esac
     176
     177# Check that VERSION is appropriate for release
     178check-version:
     179  @echo $(VERSION) | $(EGREP) '^[0-9]+(\.[0-9]+)+$$' > /dev/null || \
     180  { echo "invalid version string: $(VERSION)" 1>&2; exit 1; }
     181
     182
     183#------------------
     184# Subversion rules
     185#------------------
     186
     187# Check that WC is in sync with repository
    63188check-svn-diff:
    64   @str=\`svn diff -rHEAD \$(srcdir)\`; \\
    65   if test -n \"\$\$str\"; then \\
    66     echo \"\$\$str\" 1>&2;\\
    67     exit 1;\\
    68   fi
    69 
    70 check-news:
    71   @case \`sed 15q \$(srcdir)/NEWS\` in \\
    72   *\"\$(VERSION)\"*);; \\
    73   *) \\
    74     echo \"NEWS not updated\" 1>&2; \\
    75     exit 1;; \\
    76   esac
    77 
    78 check-news-date:
    79   @today=\`date -u \"+%%e %%B %%Y\"\`; \\
    80   case \`sed 15q \$(srcdir)/NEWS\` in \\
    81   *\"\$\$today\"*);; \\
    82   *) \\
    83     echo \"NEWS: release date incorrect; expected '\$\$today'\" 1>&2;\\
    84     exit 1;; \\
    85   esac
    86 
    87 check-version:
    88   @echo \$(VERSION) | \$(EGREP) '^[0-9]+(\\.[0-9]+)+\$\$' > /dev/null || \\
    89   { echo \"invalid version string: \$(VERSION)\" 1>&2; exit 1; }
    90 
    91 check-release-tools:
    92   @test \"x\$(MD5)\" != \"xno\" || \\
    93   (echo \"no tool to calculate MD5 checksum available\" 1>&2 && exit 1)
    94 
    95 mc_exportdir=_exported
    96 mc_builddir=_exported_build
    97 
    98 maintainer-check:
    99   rm -rf \$(mc_exportdir)
    100   rm -rf \$(mc_builddir)
    101   svn export \$(srcdir) \$(mc_exportdir)
    102   mkdir \$(mc_builddir)
    103   @cd \$(mc_exportdir) \\
    104   && echo \"./bootstrap\" \\
    105   && ./bootstrap \\
    106   && cd ../\$(mc_builddir) \\
    107   && ../\$(mc_exportdir)/configure --srcdir=../\$(mc_exportdir) \\
    108      \$(DISTCHECK_CONFIGURE_FLAGS) \\
    109   && { test -z \"\$(MAINTAINER_CHECK_LOCAL)\" || \\
    110         \$(MAKE) \$(AM_MAKEFLAGS) \$(MAINTAINER_CHECK_LOCAL); } \\
    111   && \$(MAKE) \$(AM_MAKEFLAGS) dist || exit 1
    112   rm -rf \$(mc_builddir) \$(mc_exportdir)
    113 
    114 release: all
    115   \$(MAKE) \$(AM_MAKEFLAGS) check-release-tools
    116   @test -z \"\$(RELEASE_LOCAL)\" || \$(MAKE) \$(AM_MAKEFLAGS) \$(RELEASE_LOCAL)
    117   \$(MAKE) \$(AM_MAKEFLAGS) check-version
    118   \$(MAKE) \$(AM_MAKEFLAGS) check-news
    119   \$(MAKE) \$(AM_MAKEFLAGS) check-news-date
    120   \$(MAKE) \$(AM_MAKEFLAGS) check-svn-diff
    121   \$(MAKE) \$(AM_MAKEFLAGS) maintainer-check
    122   \$(MAKE) \$(AM_MAKEFLAGS) distcheck
    123   @for a in \$(DIST_ARCHIVES); do \\
    124     \$(MD5) \$\$a > \$\$a.MD5; \\
    125   done;
    126   @test -z \"\$(RELEASE_HOOK)\" || \$(MAKE) \$(AM_MAKEFLAGS) \$(RELEASE_HOOK)
    127 ])
    128   m4_popdef([YAT_OUTPUTFILE])
    129 
     189  @str=`$(SVN) diff -rHEAD $(srcdir)`; \
     190  test -z "$$str" || { echo "$$str" 1>&2; exit 1; }
     191
     192check-svn-wc-is-trunk:
     193  @$(SVN) info $(srcdir) | $(GREP) -q '/trunk'
     194
     195
     196# create a tag from current stable branch; depends on check-version to
     197# ensure that version is macro.minor.micro (no pre suffix), that wc is
     198# pristine and updated.
     199svn-tag: check-version check-svn-diff
     200  cd $(srcdir) && \
     201  $(SVN) copy $(STABLE_BRANCH) ^/tags/$(VERSION) \
     202  -m "tagging version $(VERSION)"
     203
     204# create a stable-branch from trunk
     205svn-stable-branch: check-svn-diff check-svn-wc-is-trunk
     206  cd $(srcdir) && \
     207  $(SVN) copy ^/trunk $(STABLE_BRANCH) \
     208  -m "New stable branch $(STABLE_VERSION)" \
     209  && svn co $(STABLE_BRANCH) ../$(PACKAGE)-$(STABLE_VERSION).x \
     210  && $(SVNDIGEST_COPY_CACHE) -v -r . -t ../$(PACKAGE)-$(STABLE_VERSION).x
     211
     212
     213# Update copyright statement
     214copyright:
     215  $(SVNCOPYRIGHT) -v -r $(srcdir)
     216
     217syntax-check: sc_config_h
     218
     219sc_config_h:
     220  @for f in $(SVN_LIST_CC); do \
     221    $(GREP) '^#include' $$f | head -n 1 | $(GREP) -q '<config.h>' || \
     222    { echo "missing '#include <config.h>' in $$f" >&2; exit 1; } \
     223  done
     224
     225# Generate an announcement
     226announce.txt: Makefile $(distdir).tar.gz.MD5
     227  @echo "I'm happy to announce the release of $(PACKAGE_STRING)" > $][@
     228  @echo >> $][@
     229  @echo "<INSERT TEXT HERE>" >> $][@
     230  @echo >> $][@
     231  @echo "You can find the new release here:" >> $][@
     232  @echo >> $][@
     233  @echo "$(DOWNLOAD_URL)" >> $][@
     234  @echo >> $][@
     235  @echo "Here is the checksum" >> $][@
     236  @echo >> $][@
     237  @printf "MD5:    " >> $][@
     238  @cat $(distdir).tar.gz.MD5 | $(SED) 's/ .*//' >> $][@
     239  @echo >> $][@
     240  @echo "Please report bugs by email to $(PACKAGE_BUGREPORT)" >> $][@
     241  @echo >> $][@
     242  @echo "This release was bootstrapped with the following tools:" >> $][@
     243  @$(AUTOCONF) --version | head -n 1 | $(SED) -e 's/.*(//' -e 's/)//' >> $][@
     244  @$(AUTOMAKE) --version | head -n 1 | $(SED) -e 's/.*(//' -e 's/)//' >> $][@]dnl
     245)
     246
     247m4_ifdef([AM_PROG_LIBTOOL],
     248[YAT_AC_WRITE_APPEND(YAT_OUTPUTFILE,
     249[ @$(srcdir)/libtool --version | head -n 1 | $(SED) -e 's/.*(//' -e 's/)//' >> $][@])
     250])
     251
     252YAT_AC_WRITE_APPEND(YAT_OUTPUTFILE,
     253[ @echo >> $][@
     254  @echo You can find the list of significant changes between $(VERSION)>> $][@
     255  @echo and earlier versions at >> $][@
     256  @echo >> $][@
     257  @echo $(NEWS_URL) >> $][@
     258])
     259
     260m4_popdef([YAT_OUTPUTFILE])
    130261]) # YAT_SVN_RELEASE
Note: See TracChangeset for help on using the changeset viewer.