I've tried, unsuccessfully, to list out unused macros in my acsite.m4 used in the autotools. There is probably an easy way to do this but I'm not all that familiar with m4.Any help would be appreciated


Here was my latest unsuccessful attempt:

unused:
        @ if [ -e /tmp/unused_macros.log ]; then rm -f /tmp/unused_macros.log; fi
        @ m4 -dta -R/usr/share/autoconf/autoconf/autoconf.m4f `ls *.m4` -o/tmp/unused_macros.log
        @ grep AC_DEFUN /tmp/unused_macros.log | sed -r 's/m4trace:.*AC_DEFUN\(([A-Z_]*),\s|$|./\1/g' | sort | uniq > /tmp/unused_macros.log
        @ cat *.m4 | grep AC_DEFUN | sed -r 's/.*AC_DEFUN\(\[(.*)\]\,.*/\1/' >> /tmp/unused_macros.log
        @ echo Unused macros: "`cat /tmp/unused_macros.log | tr "\n" "\\n " | sort | uniq -u`"


--
Brian Mingus
AIM, Skype: BReflection
Google talk: [EMAIL PROTECTED]
Phone: (720) 771-2599
_______________________________________________
M4-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-discuss

Reply via email to