patchGNU Autoconf Archive - Patches: patch #7453, Macro: ax_prog_splint.m4 - Please...

 
 

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

Submitted by:  None
Submitted on:  Thu 27 Jan 2011 07:44:22 PM UTC  
 
Priority: 5 - NormalStatus: Done
Assigned to: Peter Simons <simons>Originator Email: -unavailable-
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 01 Mar 2011 11:10:44 AM UTC, comment #5:

Your changes are now on-line, and the macro will be included in the next public release. Thank you very much for your efforts!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Tue 08 Feb 2011 07:08:15 AM UTC, comment #4:

Hello Peter,

thank you for applying my patch. Here is a patch with the suggested corrections. In addition I have added support for running splint on libtool LTLIBRARIES.

Sorry for the slight delay.

Best regards
Henrik

(file #22622)

Anonymous
Thu 03 Feb 2011 09:07:22 PM UTC, comment #3:

Hi Henrik,

your patch has been applied in commit 3d38b2f4cf512334b678afa0ba492b8dd897ddec. Thank you very much for the update.

I have two more suggestions, if I may:

- It might be worthwhile to add a reference to the splint utility to the documentation, like the URL of the homepage. It's a nice service for those who are browsing the archive and maybe don't even know about splint.

- Your macro should probably define its dependency on with AC_REQUIRE([AX_ADD_AM_MACRO_STATIC]).

Please consider making those changes, too, if you have the chance.

Take care,
Peter

Peter Simons <simons>
Project AdministratorIn charge of this item.
Thu 03 Feb 2011 08:23:59 PM UTC, comment #2:

Hi Peter.

Thank you for your comments.

For the first comment I have no reason. I have removed the second copy in my new patch.

The second comment touches on my design. The macro is clearly written to be used by automake. I have added a comment on this in the synopsis.

I have for a long time missed this functionality in automake. Automake supplies a very well working building environment which I would like to contribute to by submitting my splint macro. The macro uses variables defined by automake so it would probably be hard for anyone not using automake to use this macro.

Best regards
Henrik

(file #22595)

Anonymous
Wed 02 Feb 2011 08:28:04 PM UTC, comment #1:

Hi Henrik,

thank you very much for sharing this macro. I have 2 questions and/or remarks:

  1. Why is the license disclaimer duplicated in the macro body?
  1. It looks like your macro works only in combination with Automake. Now, some people use Autoconf but not Automake. How would someone like that use your code?

Take care,
Peter

Peter Simons <simons>
Project AdministratorIn charge of this item.
Thu 27 Jan 2011 07:44:22 PM UTC, original submission:

# ===========================================================================
# 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
])
])

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22622:  0001-Added-splint-info.patch added by None (2kB - text/x-patch)
file #22595:  0001-Added-macro-AX_PROG_SPLINT.patch added by None (3kB - text/x-patch)
file #22539:  0001-Macro-AX_PROG_SPLINT.patch added by None (3kB - text/x-patch - Please use this patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 01 Mar 2011 11:10:44 AM UTCsimonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Tue 08 Feb 2011 07:08:15 AM UTCNoneAttached File-=>Added 0001-Added-splint-info.patch, #22622
    Thu 03 Feb 2011 09:07:22 PM UTCsimonsStatusIn Progress=>Ready For Test
    Thu 03 Feb 2011 08:23:59 PM UTCNoneAttached File-=>Added 0001-Added-macro-AX_PROG_SPLINT.patch, #22595
    Wed 02 Feb 2011 08:28:52 PM UTCsimonsAttached File#22538=>Removed
    Wed 02 Feb 2011 08:28:04 PM UTCsimonsStatusNone=>In Progress
      Assigned toNone=>simons
    Thu 27 Jan 2011 07:57:57 PM UTCNoneAttached File-=>Added 0001-Macro-AX_PROG_SPLINT.patch, #22539
    Thu 27 Jan 2011 07:55:41 PM UTCNoneAttached File-=>Added 0001-Macro-AX_PROG_SPLINT.patch, #22538

    Back to the top


    Powered by Savane 3.1-cleanup