gbranden pushed a commit to branch branden-2023-03-31 in repository groff. commit 1962e8105f245920412e9660b3a79e4c7b2bd6b7 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Mon Mar 13 22:15:16 2023 -0500
m4/groff.m4 (GROFF_TMAC): Fix code style nits. Update indentation and "brace style" to match recent practice. --- m4/groff.m4 | 81 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/m4/groff.m4 b/m4/groff.m4 index 19bf7f980..0dde04991 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -1121,63 +1121,73 @@ AC_DEFUN([GROFF_TMAC], [AC_MSG_CHECKING([for prefix of system macro packages]) sys_tmac_prefix= sys_tmac_file_prefix= - for d in /usr/share/lib/tmac /usr/lib/tmac; do - for t in "" tmac.; do - for m in an s m; do - f=$d/$t$m - if test -z "$sys_tmac_prefix" \ - && test -f $f \ - && grep '^\.if' $f >/dev/null 2>&1; then - sys_tmac_prefix=$d/$t - sys_tmac_file_prefix=$t - fi + for d in /usr/share/lib/tmac /usr/lib/tmac + do + for t in "" tmac. + do + for m in an s m + do + f=$d/$t$m + if test -z "$sys_tmac_prefix" \ + && test -f $f \ + && grep '^\.if' $f >/dev/null 2>&1 + then + sys_tmac_prefix=$d/$t + sys_tmac_file_prefix=$t + fi done done done sys_tmac_prefix_result=none test -z "$sys_tmac_prefix" \ - || sys_tmac_prefix_result="$sys_tmac_prefix" + || sys_tmac_prefix_result="$sys_tmac_prefix" AC_MSG_RESULT([$sys_tmac_prefix_result]) AC_SUBST([sys_tmac_prefix]) AC_MSG_CHECKING([which system macro packages should be made available]) tmac_wrap= - if test "$sys_tmac_file_prefix" = tmac.; then - for f in $sys_tmac_prefix*; do + if test "$sys_tmac_file_prefix" = tmac. + then + for f in $sys_tmac_prefix* + do suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` case "$suff" in e) - ;; + ;; *) - grep "Copyright.*Free Software Foundation" $f >/dev/null \ - || tmac_wrap="$tmac_wrap $suff" ;; + grep "Copyright.*Free Software Foundation" $f >/dev/null \ + || tmac_wrap="$tmac_wrap $suff" ;; esac done - elif test -n "$sys_tmac_prefix"; then + elif test -n "$sys_tmac_prefix" + then files=`echo $sys_tmac_prefix*` grep "\\.so" $files >conftest.sol - for f in $files; do + for f in $files + do case "$f" in ${sys_tmac_prefix}e) - ;; + ;; *.me) - ;; + ;; */ms.*) - ;; + ;; *) - b=`basename $f` - if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ - || grep -l "Copyright.*Free Software Foundation" $f >/dev/null; then - : - else - suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` - case "$suff" in - tmac.*) - ;; - *) - tmac_wrap="$tmac_wrap $suff" ;; - esac - fi + b=`basename $f` + if grep "\\.so.*/$b\$" conftest.sol >/dev/null \ + || grep -l "Copyright.*Free Software Foundation" $f \ + >/dev/null + then + : + else + suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"` + case "$suff" in + tmac.*) + ;; + *) + tmac_wrap="$tmac_wrap $suff" ;; + esac + fi esac done rm -f conftest.sol @@ -1185,7 +1195,8 @@ AC_DEFUN([GROFF_TMAC], tmac_wrap_result="none found" test -z "$tmac_wrap" || tmac_wrap_result="$tmac_wrap" AC_MSG_RESULT([$tmac_wrap_result]) - AC_SUBST([tmac_wrap])]) + AC_SUBST([tmac_wrap]) +]) # Searching if a non-GNU Troff is installed. The built-in register _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit