From a47f786c83bac69332edd1a9be276b768bd0ff85 Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Wed, 1 Jun 2022 16:46:52 -0500 Subject: [build]: Rename variables and macros for clarity. [build]: Rename shell variables and Autoconf/Automake macros of Boolean sense to have names more like logical predicates and avoid doofy "DONT" nomenclature. * m4/groff.m4 (GROFF_MAKE_RM): Rename shell variable `groff_is_rm_defined` to `groff_make_defines_rm` (purely for clarity; it already had a good name). (GROFF_MAKE_RM): Rename this... (GROFF_MAKE_DEFINES_RM): to this, to make parallelism obvious, and enabling... * configure.ac: ...rename of `MAKE_DONT_HAVE_RM` to `MAKE_DEFINES_RM` with sense of test reversed. Also interpolate `GROFF_MAKE_DEFINES_RM` instead of `GROFF_MAKE_RM`. This in turn enables... * Makefile.am: ...revision of conditional from `MAKE_DONT_HAVE_RM` to "!`MAKE_DEFINES_RM`". --- ChangeLog | 19 +++++++++++++++++++ Makefile.am | 5 ++--- configure.ac | 5 ++--- m4/groff.m4 | 8 ++++---- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fe946dd9..ebbde8414 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2022-06-01 G. Branden Robinson + + [build]: Rename shell variables and Autoconf/Automake macros of + Boolean sense to have names more like logical predicates and + avoid doofy "DONT" nomenclature. + + * m4/groff.m4 (GROFF_MAKE_RM): Rename shell variable + `groff_is_rm_defined` to `groff_make_defines_rm` (purely for + clarity; it already had a good name). + (GROFF_MAKE_RM): Rename this... + (GROFF_MAKE_DEFINES_RM): to this, to make parallelism obvious, + and enabling... + * configure.ac: ...rename of `MAKE_DONT_HAVE_RM` to + `MAKE_DEFINES_RM` with sense of test reversed. Also interpolate + `GROFF_MAKE_DEFINES_RM` instead of `GROFF_MAKE_RM`. This in + turn enables... + * Makefile.am: ...revision of conditional from + `MAKE_DONT_HAVE_RM` to "!`MAKE_DEFINES_RM`". + 2022-06-01 G. Branden Robinson * m4/groff.m4 (GROFF_URW_FONTS_PATH, diff --git a/Makefile.am b/Makefile.am index 645b310e5..eba1309f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -572,9 +572,8 @@ PDFMOMBIN = $(abs_top_builddir)/pdfmom FFLAG=-F$(abs_top_builddir)/font -F$(abs_top_srcdir)/font MFLAG=-M$(abs_top_builddir)/tmac -M$(abs_top_srcdir)/tmac -# make builtin variable RM -if MAKE_DONT_HAVE_RM -RM = rm -f +if !MAKE_DEFINES_RM +RM=rm -f endif # 'VERSION' is generated by gnulib script git-version-gen, using the diff --git a/configure.ac b/configure.ac index a6d26dcab..b4d4b7338 100644 --- a/configure.ac +++ b/configure.ac @@ -168,7 +168,7 @@ GROFF_CHECK_GROHTML_PROGRAMS GROFF_CHECK_GROPDF_PROGRAMS GROFF_PNMTOOLS_CAN_BE_QUIET GROFF_PNMTOPS_NOSETPAGE -GROFF_MAKE_RM +GROFF_MAKE_DEFINES_RM GROFF_DIFF_D GROFF_HAVE_TEST_EF_OPTION GROFF_BASH @@ -192,8 +192,7 @@ AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"]) # src/libs/libxutil AM_CONDITIONAL([WITHOUT_X11], [test "$groff_no_x" = yes]) -# make builtin variable RM -AM_CONDITIONAL([MAKE_DONT_HAVE_RM], [test "$groff_is_rm_defined" = no]) +AM_CONDITIONAL([MAKE_DEFINES_RM], [test "$groff_make_defines_rm" = yes]) # Some programs have a "g" prefix if an existing troff installation is # detected. diff --git a/m4/groff.m4 b/m4/groff.m4 index 7236abba9..c3de8cb61 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -1645,8 +1645,8 @@ AC_DEFUN([GROFF_PROG_XPMTOPPM], # Check for make built-in variable RM. -AC_DEFUN([GROFF_MAKE_RM], [ - AC_MSG_CHECKING(whether make has built-in variable 'RM') +AC_DEFUN([GROFF_MAKE_DEFINES_RM], [ + AC_MSG_CHECKING(whether make defines 'RM') cat < test_make_rm.mk all: @if test -n "\$(RM)"; \ @@ -1656,8 +1656,8 @@ all: echo no; \ fi EOF - groff_is_rm_defined=`make -sf test_make_rm.mk` - AC_MSG_RESULT([$groff_is_rm_defined]) + groff_make_defines_rm=`make -sf test_make_rm.mk` + AC_MSG_RESULT([$groff_make_defines_rm]) rm -f test_make_rm.mk ]) -- cgit v1.2.1