summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-08-08 00:01:29 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-08-08 12:35:27 +0200
commitfd74123befe7ce42c44d52128bb2e725706bb967 (patch)
treee4494aa033fa27b5903374aeceaf49a7d821b7e6
parentbdc607514748d8892dab26158b6d9693079d3a20 (diff)
downloadautomake-fd74123befe7ce42c44d52128bb2e725706bb967.tar.gz
[ng] refactor: merge inst-vars.am into header-vars.mk
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>
-rw-r--r--Makefile.am1
-rw-r--r--lib/am/data.am4
-rw-r--r--lib/am/header-vars.mk53
-rw-r--r--lib/am/inst-vars.am65
-rw-r--r--lib/am/libs.am4
-rw-r--r--lib/am/lisp.am4
-rw-r--r--lib/am/ltlib.am4
-rw-r--r--lib/am/mans.am1
-rw-r--r--lib/am/python.am4
-rw-r--r--lib/am/scripts.am4
-rw-r--r--lib/am/texinfos.am2
11 files changed, 53 insertions, 93 deletions
diff --git a/Makefile.am b/Makefile.am
index 1c26bc3a6..f85663cd6 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 379bc15b3..594124526 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 1cfed959d..b4306cd5f 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 759e76990..000000000
--- 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 10200efac..ece521224 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 5ed0149a7..c6fb92333 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 794c4c2a9..d80b66f78 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 bfc71dc99..dc08f2744 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 1ec6fbc8e..2ac22ccc2 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 f15edcb1b..08daeda42 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 1fbd50574..71c497ad8 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: