autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #7453] Macro: ax_prog_splint.m4 - Please review and comment.


From: anonymous
Subject: [patch #7453] Macro: ax_prog_splint.m4 - Please review and comment.
Date: Thu, 27 Jan 2011 19:44:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12

URL:
  <http://savannah.gnu.org/patch/?7453>

                 Summary: Macro: ax_prog_splint.m4  - Please review and
comment.
                 Project: GNU Autoconf Archive
            Submitted by: None
            Submitted on: Thu 27 Jan 2011 07:44:22 PM UTC
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

#
===========================================================================
#    http://www.gnu.org/software/autoconf-archive/ax_prog_splint.html
#
===========================================================================
#
# SYNOPSIS
#
#   AX_PROG_SPLINT([AX_SPLINTFLAGS])
#
# DESCRIPTION
#
#   Check for program splint.
#
#   Enables following environment variables:
#
#      SPLINT
#      SPLINTFLAGS
#
#   and AX_SPLINTFLAGS is given by AC_SUBST. If AX_SPLINTFLAGS 
#   is not given by AX_PROG_SPLINT it defaults to "-weak".
#
#   Enables the following make target:
#
#      splint-check
#
#   which runs splint per PROGRAMS and LIBRARIES. Output from splint run 
#   is collected in file ***_splint.log where *** is given by the 
#   PROGRAMS or LIBRARIES name.
#
#   The following line is required in Makefile.am:
#
#      include aminclude_static.am
#
# LICENSE
#
#   Copyright (c) 2011 Henrik Uhrenholt
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

#serial 1

dnl Copyright (C) 2011 Henrik Uhrenholt
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.  This file is offered as-is,
dnl without any warranty.


AC_DEFUN([AX_PROG_SPLINT],
[
AC_ARG_VAR([SPLINT], [splint executable])
AC_ARG_VAR([SPLINTFLAGS], [splint flags])
if test "x$SPLINT" = "x"; then
   AC_CHECK_PROGS([SPLINT], [splint])
fi
if test "x$SPLINT" != "x"; then
   ax_splintflags=$1
   if test "x$1" = "x"; then
      ax_splintflags=-weak
   fi
   AC_SUBST([AX_SPLINTFLAGS], [$ax_splintflags])
   ax_prog_splint_enable=yes
else
   AC_MSG_WARN([splint support disabled])
   ax_prog_splint_enable=no
fi
AM_CONDITIONAL([ax_prog_splint_enable], [test x"$ax_prog_splint_enable" =
x"yes"])

AX_ADD_AM_MACRO_STATIC([
if ax_prog_splint_enable

define splint_rules
\$(1)_splint.log: \$${AX_DOLLAR}(\$(1)_OBJECTS)
        -\$(SPLINT) \$(AX_SPLINTFLAGS) \$(SPLINTFLAGS)  \$(AM_SPLINTFLAGS)
\$(DEFAULT_INCLUDES) \$(AM_CPPFLAGS) +error-stream-stdout
+warning-stream-stdout \$${AX_DOLLAR}(addprefix
\$(srcdir)/,\$${AX_DOLLAR}(\$(1)_SOURCES)) > \$${AX_DOLLAR}@
endef


SPLINT_BIN=\$(subst /,_,\$(PROGRAMS:\$(EXEEXT)=))
SPLINT_LIB=\$(subst /,_,\$(LIBRARIES:.a=_a))
SPLINTFILES=\$(addsuffix _splint.log,\$(SPLINT_LIB) \$(SPLINT_BIN))

splint-check: all \$(SPLINTFILES)

\$(foreach bin, \$(SPLINT_BIN) \$(SPLINT_LIB),\$(eval \$(call
splint_rules,\$(bin))))




endif

clean-local: clean-local-splint
clean-local-splint:
        -test -z \"\$(SPLINTFILES)\" || rm -f \$(SPLINTFILES)

distclean-local: distclean-local-splint
distclean-local-splint: clean-local-splint
])
])





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?7453>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]