automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [FYI] [ng] refactor: merge inst-vars.am into header-vars.m


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] refactor: merge inst-vars.am into header-vars.mk
Date: Wed, 8 Aug 2012 00:23:03 +0200

This will simplify possible future refactorings.  Given the small size
of 'inst-vars.am', and the fact that the content of a verbatim-included
makefile fragment is included in the distribution tarball only once,
this change doesn't increase the size of distribution tarballs in any
appreciable way, even if the variables once defined in 'inst-vars.am'
aren't really needed.

* lib/am/inst-vars.am: Remove, merged ...
* lib/am/header-vars.mk: ... in here, with all '##' comments turned
into '#' comments, and (few of them) slightly improved with the
addition of "FIXME" remarks.
* Makefile.am (dist_am_DATA): Adjust.
* lib/am/data.am: Include the 'inst-vars.am' file explicitly no more.
* lib/am/libs.am:: Likewise.
* lib/am/lisp.am:: Likewise.
* lib/am/ltlib.am:: Likewise.
* lib/am/mans.am:: Likewise.
* lib/am/python.am:: Likewise.
* lib/am/scripts.am:: Likewise.
* lib/am/texinfos.am:: Likewise.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 Makefile.am           |  1 -
 lib/am/data.am        |  4 ----
 lib/am/header-vars.mk | 53 +++++++++++++++++++++++++++++++++++++++++
 lib/am/inst-vars.am   | 65 ---------------------------------------------------
 lib/am/libs.am        |  4 ----
 lib/am/lisp.am        |  4 ----
 lib/am/ltlib.am       |  4 ----
 lib/am/mans.am        |  1 -
 lib/am/python.am      |  4 ----
 lib/am/scripts.am     |  4 ----
 lib/am/texinfos.am    |  2 --
 11 files changed, 53 insertions(+), 93 deletions(-)
 delete mode 100644 lib/am/inst-vars.am

diff --git a/Makefile.am b/Makefile.am
index 1c26bc3..f85663c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -201,7 +201,6 @@ dist_am_DATA = \
   lib/am/distdir.am \
   lib/am/footer.am \
   lib/am/header.am \
-  lib/am/inst-vars.am \
   lib/am/java.am \
   lib/am/lang-compile.am \
   lib/am/lex.am \
diff --git a/lib/am/data.am b/lib/am/data.am
index 379bc15..5941245 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
diff --git a/lib/am/header-vars.mk b/lib/am/header-vars.mk
index 1cfed95..b4306cd 100644
--- a/lib/am/header-vars.mk
+++ b/lib/am/header-vars.mk
@@ -355,3 +355,56 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+
+# Strip all directories.
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+
+# Number of files to install concurrently.
+am__install_max = 40
+# Take a $list of "nobase" files, strip $(srcdir) from them.
+# Split apart in setup variable and an action that can be used
+# in backticks or in a pipe.
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+# Take a "$list" of nobase files, collect them, indexed by their
+# srcdir-stripped dirnames.  For up to am__install_max files, output
+# a line containing the dirname and the files, space-separated.
+# The arbitrary limit helps avoid the quadratic scaling exhibited by
+# string concatenation in most shells, and should avoid line length
+# limitations, while still offering only negligible performance impact
+# through spawning more install commands than absolutely needed.
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+# Collect up to 40 files per line from stdin.
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+
+# A shell code fragment to uninstall files from a given directory.
+# It expects the $dir and $files shell variables to be defined respectively
+# to the directory where the files to be removed are, and to the list of
+# such files.
+# Some rm implementations complain if 'rm -f' is used without arguments,
+# so the fist "test -z" check (FIXME: this is probably obsolete; see
+# automake bug#10828).
+# At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
+# "test ! -[fdr]" below instead (FIXME: this should become obsolete when
+# we can assume the $SHELL set by Autoconf-generated configure scripts is
+# a truly POSIX shell; see:
+# <http://lists.gnu.org/archive/html/bug-autoconf/2012-06/msg00009.html>).
+# We expect $dir to be either non-existent or a directory, so the
+# failure we'll experience if it is a regular file is indeed desired
+# and welcome (better to fail loudly than silently).
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         cd "$$dir" && rm -f $$files; }; \
+  }
diff --git a/lib/am/inst-vars.am b/lib/am/inst-vars.am
deleted file mode 100644
index 759e769..0000000
--- a/lib/am/inst-vars.am
+++ /dev/null
@@ -1,65 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2004-2012 Free Software Foundation, Inc.
-
-## 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, 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, see <http://www.gnu.org/licenses/>.
-
-if %?FIRST%
-
-## Strip all directories.
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-## Number of files to install concurrently.
-am__install_max = 40
-## Take a $list of nobase files, strip $(srcdir) from them.
-## Split apart in setup variable and an action that can be used
-## in backticks or in a pipe.
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-## Take a $list of nobase files, collect them, indexed by their
-## srcdir-stripped dirnames.  For up to am__install_max files, output
-## a line containing the dirname and the files, space-separated.
-## The arbitrary limit helps avoid the quadratic scaling exhibited by
-## string concatenation in most shells, and should avoid line length
-## limitations, while still offering only negligible performance impact
-## through spawning more install commands than absolutely needed.
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-## Collect up to 40 files per line from stdin.
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-
-## A shell code fragment to uninstall files from a given directory.
-## It expects the $dir and $files shell variables to be defined respectively
-## to the directory where the files to be removed are, and to the list of
-## such files.
-am__uninstall_files_from_dir = { \
-## Some rm implementations complain if 'rm -f' is used without arguments.
-  test -z "$$files" \
-## At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
-## tests below instead.  We expect $dir to be either non-existent or a
-## directory, so the failure we'll experience if it is a regular file
-## is indeed desired and welcome (better to fail loudly thasn silently).
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         cd "$$dir" && rm -f $$files; }; \
-  }
-
-endif %?FIRST%
diff --git a/lib/am/libs.am b/lib/am/libs.am
index 10200ef..ece5212 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 5ed0149..c6fb923 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ## ---------- ##
 ## Building.  ##
 ## ---------- ##
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 794c4c2..d80b66f 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
diff --git a/lib/am/mans.am b/lib/am/mans.am
index bfc71dc..dc08f27 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -14,7 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-include inst-vars.am
 man%SECTION%dir = $(mandir)/man%SECTION%
 
 ## ------------ ##
diff --git a/lib/am/python.am b/lib/am/python.am
index 1ec6fbc..2ac22cc 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
 
 ## ------------ ##
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index f15edcb..08daeda 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -14,10 +14,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if %?INSTALL%
-include inst-vars.am
-endif %?INSTALL%
-
 ## ------------ ##
 ## Installing.  ##
 ## ------------ ##
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 1fbd505..71c497a 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -115,8 +115,6 @@ endif !%?SUBDIRS%
 
 if %?LOCAL-TEXIS%
 
-include inst-vars.am
-
 # In GNU make, '$^' used in a recipe contains every dependency for the
 # target, even those not declared when the recipe is read; for example,
 # on:
-- 
1.7.12.rc0




reply via email to

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