automake
[Top][All Lists]
Advanced

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

underquoted definitions in aclocal/*.m4


From: Brad Bell
Subject: underquoted definitions in aclocal/*.m4
Date: Tue, 17 Jan 2006 04:20:03 -0800
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Underquoted definitions in */aclocal/*.m4 create a problem for the user of automake; see
   http://lists.freedesktop.org/pipermail/xserver/2004-April/001198.html

The true fix for these problems need to be done by the developers of the corresponding packages,
not the person running aclocal; see
   http://sources.redhat.com/automake/automake.html#Extending%20aclocal
The bash shell script below will attempt to fix these problems on one particular system (so that these warnings do not hide other warnings that have relevance to the person running aclocal). # ! /bin/bash
# -----------------------------------------------------------------------
# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-06 Bradley M. Bell
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ------------------------------------------------------------------------
echo "Some packages have bad aclocal macros that generate warnings: see"
echo "http://sources.redhat.com/automake/automake.html#Extending-aclocal";
echo "This shell script will attempt to fix them."
echo
#
aclocal >& junk
list=`grep 'aclocal/.*.m4:[0-9]*: *warning' < junk | sed -e"s/\.m4:.*/.m4/"`
#
emptylist=true
for file in $list
do
   emptylist=false
   oldtext=`grep '^ *AC_DEFUN *( *AM_PATH_[A-Za-z_]* *,' $file`
   if [ "${oldtext}NOTHING" != "NOTHING" ]
   then
       sed < $file > junk -e \
's/^ *AC_DEFUN *( *AM_PATH_\([A-Za-z_]*\) *,/AC_DEFUN([AM_PATH_\1],/'
       newtext=`grep 'AC_DEFUN(\[AM_PATH_[A-Za-z_]*\],' junk`
       echo "$file"
       echo "$oldtext -> $newtext"
       if [ -w $file ]
       then
           mv junk $file
       else
           echo "Do not have premission to change this file."
           rm junk
       fi
   else
       echo "$file"
       echo "Do not know how to fix this file."
   fi
done
if [ $emptylist == true ]
then
   echo "No aclocal warnings to be fixed."
fi




reply via email to

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