automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 1/4] [ng] rename: am__*clean_* -> am.clean.*.*


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 1/4] [ng] rename: am__*clean_* -> am.clean.*.*
Date: Tue, 31 Jul 2012 00:56:10 +0200

More precisely, do these renames:

  am__mostlyclean_files  ->  am.clean.mostly.f
  am__clean_files        ->  am.clean.normal.f
  am__distclean_files    ->  am.clean.dist.f
  am__maintclean_files   ->  am.clean.maint.f

  am__mostlyclean_dirs   ->  am.clean.mostly.d
  am__clean_dirs         ->  am.clean.normal.d
  am__distclean_dirs     ->  am.clean.dist.d
  am__maintclean_dirs    ->  am.clean.maint.d

throughout the codebase.  Also ...

* syntax-checks.mk (typos-for-clean, sc_variable_typos_rules): Delete.
The new names make it both more difficult to have typos and more difficult
to detect them automatically, so keeping these maintainer checks is no
more worth the hassle.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/am/am-dir.am         |  2 +-
 lib/am/clean.am          | 46 +++++++++++++++++++++++-----------------------
 lib/am/configure.am      |  6 +++---
 lib/am/dejagnu.am        |  6 +++---
 lib/am/java.am           |  4 ++--
 lib/am/libs.am           |  2 +-
 lib/am/lisp.am           |  2 +-
 lib/am/ltlib.am          |  4 ++--
 lib/am/parallel-tests.am |  4 ++--
 lib/am/progs.am          |  4 ++--
 lib/am/tags.am           |  4 ++--
 lib/am/texi-vers.am      |  4 ++--
 lib/am/texinfos.am       |  8 ++++----
 syntax-checks.mk         | 39 ---------------------------------------
 14 files changed, 48 insertions(+), 87 deletions(-)

diff --git a/lib/am/am-dir.am b/lib/am/am-dir.am
index 23a9554..af57f81 100644
--- a/lib/am/am-dir.am
+++ b/lib/am/am-dir.am
@@ -34,7 +34,7 @@ am.top-dir = $(top_builddir)/$(am.dir)
 # Its counterpart with an absolute path and for use in subdir makefiles.
 am.top-dir.abs = $(abs_top_builddir)/$(am.dir)
 
-am__distclean_dirs += $(am.dir)
+am.clean.dist.d += $(am.dir)
 
 $(am.dir):
        @mkdir $@
diff --git a/lib/am/clean.am b/lib/am/clean.am
index 8b6f571..bc8315d 100644
--- a/lib/am/clean.am
+++ b/lib/am/clean.am
@@ -14,49 +14,49 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-am__mostlyclean_files += $(MOSTLYCLEANFILES)
-am__clean_files       += $(CLEANFILES)
-am__distclean_files   += $(DISTCLEANFILES)
-am__maintclean_files  += $(MAINTAINERCLEANFILES)
+am.clean.mostly.f += $(MOSTLYCLEANFILES)
+am.clean.normal.f += $(CLEANFILES)
+am.clean.dist.f   += $(DISTCLEANFILES)
+am.clean.maint.f  += $(MAINTAINERCLEANFILES)
 
-am__mostlyclean_files += %MOSTLYCLEAN-FILES%
-am__clean_files       += %CLEAN-FILES%
-am__distclean_files   += %DISTCLEAN-FILES%
-am__maintclean_files  += %MAINTAINERCLEAN-FILES%
+am.clean.mostly.f += %MOSTLYCLEAN-FILES%
+am.clean.normal.f += %CLEAN-FILES%
+am.clean.dist.f   += %DISTCLEAN-FILES%
+am.clean.maint.f  += %MAINTAINERCLEAN-FILES%
 
-am__mostlyclean_dirs  += %MOSTLYCLEAN-DIRS%
-am__clean_dirs        += %CLEAN-DIRS%
-am__distclean_dirs    += %DISTCLEAN-DIRS%
-am__maintclean_dirs   += %MAINTAINERCLEAN-DIRS%
+am.clean.mostly.d += %MOSTLYCLEAN-DIRS%
+am.clean.normal.d += %CLEAN-DIRS%
+am.clean.dist.d   += %DISTCLEAN-DIRS%
+am.clean.maint.d  += %MAINTAINERCLEAN-DIRS%
 
-am__distclean_files += $(CONFIG_CLEAN_FILES)
+am.clean.dist.f += $(CONFIG_CLEAN_FILES)
 # Some files must be cleaned only in VPATH builds -- e.g., those linked
 # in usages like "AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])".
-am__distclean_files += $(if $(filter .,$(srcdir)),,$(CONFIG_CLEAN_VPATH_FILES))
+am.clean.dist.f += $(if $(filter .,$(srcdir)),,$(CONFIG_CLEAN_VPATH_FILES))
 
 # Built sources are automatically removed by maintainer-clean.
 # This is what mainline Automake does.
-am__maintclean_files += $(BUILT_SOURCES)
+am.clean.maint.f += $(BUILT_SOURCES)
 
 mostlyclean-am: mostlyclean-generic
 mostlyclean-generic:
-       $(call am.clean-cmd.f,$(am__mostlyclean_files))
-       $(call am.clean-cmd.d,$(am__mostlyclean_dirs))
+       $(call am.clean-cmd.f,$(am.clean.mostly.f))
+       $(call am.clean-cmd.d,$(am.clean.mostly.d))
 
 clean-am: clean-generic mostlyclean-am
 clean-generic:
-       $(call am.clean-cmd.f,$(am__clean_files))
-       $(call am.clean-cmd.d,$(am__clean_dirs))
+       $(call am.clean-cmd.f,$(am.clean.normal.f))
+       $(call am.clean-cmd.d,$(am.clean.normal.d))
 
 distclean-am: distclean-generic clean-am
 distclean-generic:
-       $(call am.clean-cmd.f,$(am__distclean_files))
-       $(call am.clean-cmd.d,$(am__distclean_dirs))
+       $(call am.clean-cmd.f,$(am.clean.dist.f))
+       $(call am.clean-cmd.d,$(am.clean.dist.d))
 
 maintainer-clean-am: maintainer-clean-generic distclean-am
 maintainer-clean-generic:
-       $(call am.clean-cmd.f,$(am__maintclean_files))
-       $(call am.clean-cmd.d,$(am__maintclean_dirs))
+       $(call am.clean-cmd.f,$(am.clean.maint.f))
+       $(call am.clean-cmd.d,$(am.clean.maint.d))
 
 # Makefiles and their dependencies cannot be cleaned by an '-am'
 # dependency, because that would prevent other distclean dependencies
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 5399047..67cad8d 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -130,8 +130,8 @@ if %?TOPDIR_P%
 
 ## This variable is used in 'clean.am'.  See the comments to the
 ## 'distclean' and 'maintainer-clean' targets there to understand
-## why we cannot simply append this to $(am__distclean_files) or
-## $(am__maintclean_files).
+## why we cannot simply append this to $(am.clean.dist.f) or
+## $(am.clean.maint.f).
 am__config_distclean_files = \
   config.status \
   config.cache \
@@ -144,6 +144,6 @@ am__config_distclean_files = \
 ## If you have an autom4te.cache that cause distcheck to fail, then
 ## it is good news: you finally discovered that autoconf and/or
 ## autoheader is needed to use your tarball, which is wrong.
-am__maintclean_dirs += $(top_srcdir)/autom4te.cache
+am.clean.maint.d += $(top_srcdir)/autom4te.cache
 
 endif %?TOPDIR_P%
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index cb5e8a3..42ba485 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -86,6 +86,6 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
 ## FIXME: we clean these on "make distclean" only for better compatibility
 ## FIXME: with mainline Automake, but wouldn't be more correct to clean
 ## FIXME: them on "make clean" instead?
-am__distclean_files += site.exp site.bak
-am__distclean_files += $(addsuffix .sum,$(DEJATOOL))
-am__distclean_files += $(addsuffix .log,$(DEJATOOL))
+am.clean.dist.f += site.exp site.bak
+am.clean.dist.f += $(addsuffix .sum,$(DEJATOOL))
+am.clean.dist.f += $(addsuffix .log,$(DEJATOOL))
diff --git a/lib/am/java.am b/lib/am/java.am
index 7849344..0531bcf 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -80,9 +80,9 @@ endif %?INSTALL%
 
 ## Do not repeat the *.class wildcard over and over.
 if %?FIRST%
-am__clean_files += *.class
+am.clean.normal.f += *.class
 endif
-am__clean_files += class%NDIR%.stamp
+am.clean.normal.f += class%NDIR%.stamp
 
 
 ## -------------- ##
diff --git a/lib/am/libs.am b/lib/am/libs.am
index 0e39fe9..10200ef 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -101,4 +101,4 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_LIBRARIES)
+am.clean.normal.f += $(%DIR%_LIBRARIES)
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 84dd696..cf9b8cf 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -142,7 +142,7 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += elc-stamp $(ELCFILES)
+am.clean.normal.f += elc-stamp $(ELCFILES)
 
 ## -------------- ##
 ## Distributing.  ##
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 00928f3..794c4c2 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -107,8 +107,8 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_LTLIBRARIES)
+am.clean.normal.f += $(%DIR%_LTLIBRARIES)
 ## 'so_locations' files are created by some linkers (IRIX, OSF) when
 ## building a shared object.  Libtool places these files in the
 ## directory where the shared object is created.
-am__clean_files += $(wildcard $(addsuffix so_locations,$(sort $(dir 
$(%DIR%_LTLIBRARIES)))))
+am.clean.normal.f += $(wildcard $(addsuffix so_locations,$(sort $(dir 
$(%DIR%_LTLIBRARIES)))))
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 5297c67..20a70e5 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -287,7 +287,7 @@ am.test-suite.test-results = \
 am.test-suite.test-logs = \
   $(call am.memoize,am.test-suite.test-logs,$(addsuffix .log,$(strip 
$(am.test-suite.test-bases))))
 
-am__mostlyclean_files += $(am.test-suite.test-results) 
$(am.test-suite.test-logs)
+am.clean.mostly.f += $(am.test-suite.test-results) $(am.test-suite.test-logs)
 
 # $(TEST_LOGS) is a published interface.
 TEST_LOGS = $(am.test-suite.test-logs)
@@ -415,7 +415,7 @@ $(TEST_SUITE_LOG): $(am.test-suite.test-logs) 
$(am.test-suite.test-results)
        fi;                                                             \
        $$success || exit 1
 
-am__mostlyclean_files += $(TEST_SUITE_LOG)
+am.clean.mostly.f += $(TEST_SUITE_LOG)
 
 ## ------------------------------------------ ##
 ## Running all tests, or rechecking failures. ##
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 66ecc3d..6dac5a8 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -103,7 +103,7 @@ endif %?INSTALL%
 ## Cleaning.  ##
 ## ---------- ##
 
-am__clean_files += $(%DIR%_PROGRAMS)
+am.clean.normal.f += $(%DIR%_PROGRAMS)
 ## Under Cygwin, we build 'program$(EXEEXT)'.  However, if this
 ## program uses a Libtool library, Libtool will move it in
 ## '_libs/program$(EXEEXT)' and create a 'program' wrapper (without
@@ -112,7 +112,7 @@ am__clean_files += $(%DIR%_PROGRAMS)
 ## Cleaning the '_libs/' or '.libs/' directory is done from clean-libtool.
 ## FIXME: In the future (i.e., when it works) it would be nice to delegate
 ## this task to "libtool --mode=clean".
-?LIBTOOL?am__clean_files += $(if $(EXEEXT),$(patsubst 
%$(EXEEXT),%,$(%DIR%_PROGRAMS)))
+?LIBTOOL?am.clean.normal.f += $(if $(EXEEXT),$(patsubst 
%$(EXEEXT),%,$(%DIR%_PROGRAMS)))
 
 ## ---------- ##
 ## Checking.  ##
diff --git a/lib/am/tags.am b/lib/am/tags.am
index 1db4139..c2887d8 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -173,7 +173,7 @@ cscopelist-am: $(am__tagged_files)
 ## Cleaning.  ##
 ## ---------- ##
 
-am__distclean_files += TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+am.clean.dist.f += TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 if %?TOPDIR_P%
-am__distclean_files += cscope.out cscope.in.out cscope.po.out cscope.files
+am.clean.dist.f += cscope.out cscope.in.out cscope.po.out cscope.files
 endif %?TOPDIR_P%
diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am
index 1053dcd..afacbc8 100644
--- a/lib/am/texi-vers.am
+++ b/lib/am/texi-vers.am
@@ -40,5 +40,5 @@ am.dist.common-files += %VTEXI% %STAMPVTI%
        fi;
        @cp %VTEXI% $@
 
-am__mostlyclean_files += %VTI%.tmp
-%MAINTAINER-MODE%am__maintclean_files += %STAMPVTI% %VTEXI%
+am.clean.mostly.f += %VTI%.tmp
+%MAINTAINER-MODE%am.clean.maint.f += %STAMPVTI% %VTEXI%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index b7efd82..1fbd505 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -302,10 +302,10 @@ if %?LOCAL-TEXIS%
 ## Append to dirs, not files, because the %*CLEAN% substitutions can
 ## also contain any directory created by "makeinfo --html", as well as
 ## the '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
-am__mostlyclean_dirs += %MOSTLYCLEAN%
-am__clean_dirs += %TEXICLEAN%
-am__maintclean_dirs += %MAINTCLEAN%
+am.clean.mostly.d += %MOSTLYCLEAN%
+am.clean.normal.d += %TEXICLEAN%
+am.clean.maint.d += %MAINTCLEAN%
 
-am__maintclean_files += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9])
+am.clean.maint.f += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9])
 
 endif %?LOCAL-TEXIS%
diff --git a/syntax-checks.mk b/syntax-checks.mk
index fc1a868..7662d6f 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -351,45 +351,6 @@ $(sc_renamed_variables_rules): sc_no_% :
          exit 1; \
        fi
 
-# Variables whose name is prone to typos.
-
-define typos-for-clean
-
-fixtypo.am__mostlyclean$1 = am__mostlyclean_$1
-fixtypo.am__clean$1 = am__clean_$1
-fixtypo.am__distclean$1 = am__distclean_$1
-fixtypo.am__maintclean$1 = am__maintclean_$1
-
-fixtypo.am__mostly_clean_$1 = am__mostlyclean_$1
-fixtypo.am__dist_clean_$1 = am__distclean_$1
-
-fixtypo.am__maint_clean_$1 = am__maintclean_$1
-fixtypo.am__maintainerclean_$1 = am__maintclean_$1
-fixtypo.am__maintainer_clean_$1 = am__maintclean_$1
-
-endef
-
-$(eval $(call typos-for-clean,files))
-$(eval $(call typos-for-clean,dirs))
-
-sc_variables_typos_rules = \
-  $(patsubst fixtypo.%,sc_no_%,$(filter fixtypo.%,$(.VARIABLES)))
-
-$(sc_variable_typos_rules) : sc_no_% :
-       @files="\
-         $(xtests) \
-         $(pms) \
-         $(ams) \
-         $(srcdir)/automake.in \
-         $(srcdir)/doc/*.texi \
-       "; \
-       if grep -E '\b$*\b' $$files; then \
-         echo "'\$$($*)' is probably a typo." >&2; \
-         echo "You should use '$(fixtypo.$*)' instead." >&2; \
-         exit 1; \
-       fi
-
-
 sc_no_RECHECK_LOGS:
        @files="\
          $(xtests) \
-- 
1.7.12.rc0




reply via email to

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