]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] refactor: merge inst-vars.am into header-vars.mk
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 7 Aug 2012 22:01:29 +0000 (00:01 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 8 Aug 2012 10:35:27 +0000 (12:35 +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 <stefano.lattarini@gmail.com>
Makefile.am
lib/am/data.am
lib/am/header-vars.mk
lib/am/inst-vars.am [deleted file]
lib/am/libs.am
lib/am/lisp.am
lib/am/ltlib.am
lib/am/mans.am
lib/am/python.am
lib/am/scripts.am
lib/am/texinfos.am

index 1c26bc3a64b53f47540482bbe84af05d823883cb..f85663cd649da462c916c48780c4bd416e75ceda 100644 (file)
@@ -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 \
index 379bc15b3b1db597f17ceb869db02fa67dcfc330..594124526a651eca281243f507773e341dead661 100644 (file)
 ## 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.  ##
 ## ------------ ##
index 1cfed959d0cf9ceba5e98c9cb18f4c7cb8ab6842..b4306cd5fb6b0d1785119bc35c2d12cdabc838fb 100644 (file)
@@ -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 (file)
index 759e769..0000000
+++ /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%
index 10200efacdf45e98b6ef057b863650fd3ad158bb..ece521224d00f32d7e402fb04147a15363ecdfd7 100644 (file)
 ## 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.  ##
 ## ------------ ##
index 5ed0149a7a17be3d0386c5a52456bb81fd547495..c6fb923335baa1d5dba58bb25d9fa578fa290838 100644 (file)
 ## 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.  ##
 ## ---------- ##
index 794c4c2a99845bcde4a97be27478e284617b756d..d80b66f7862e78da61abed13380183591c30ede6 100644 (file)
 ## 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.  ##
 ## ------------ ##
index bfc71dc99a0055d2b3e3e05e46f0776cd3623207..dc08f274491acf77e399e247ad9aaa86f8eee22d 100644 (file)
@@ -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%
 
 ## ------------ ##
index 1ec6fbc8e320a2f334ee89fd2abdb4ad99fd14df..2ac22ccc2721ddc80ef793a4046119fca6db0dcb 100644 (file)
 ## 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)
 
 ## ------------ ##
index f15edcb1bd2449ec3fd6c4384100b84bc81c7149..08daeda42039429a023486052650a5caee4807f9 100644 (file)
 ## 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.  ##
 ## ------------ ##
index 1fbd50574f4935208956fdc6d28ff1663f4d7dab..71c497ad891f69c373b3abf9fbe4bf29dd4ec51a 100644 (file)
@@ -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: