summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-08-29 14:22:47 +0200
committerJim Meyering <meyering@redhat.com>2012-08-30 15:21:59 +0200
commitf56980b99cadfe93fc208da781985786fdab87ce (patch)
tree7bcfe2692d04df6e509b9ea849be52987847b099
parentd1b490c10da134859e7819c2f6b837e8da3df576 (diff)
downloadcoreutils-f56980b99cadfe93fc208da781985786fdab87ce.tar.xz
build: don't use recursive make to build the 'doc' subdirectory
* doc/Makefile.am: Rename ... * doc/local.mk: ... like this. With further adjustments ... (info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in here. (coreutils_TEXINFOS): Likewise, and rename ... (doc_coreutils_TEXINFOS): ... like this. (constants.texi): Rename ... (doc/constants.texi): ... like this. Adjust the recipe to avoid spurious errors. (MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than setting it with '='. (ME): Delete. (find_upper_case_var): Use '$@', not '$(ME)', in error messages. * Makefile.am: Include 'doc/local.mk'. (SUBDIRS): Remove 'doc'. * configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac1
-rw-r--r--doc/local.mk (renamed from doc/Makefile.am)22
3 files changed, 15 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 72d93d544..0446e4344 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
ALL_RECURSIVE_TARGETS =
-SUBDIRS = lib src doc man po tests gnulib-tests
+SUBDIRS = lib src man po tests gnulib-tests
changelog_etc = \
ChangeLog-2005 \
@@ -169,3 +169,5 @@ check-git-hook-script-sync:
done; \
rm -rf $$t; \
test $$fail = 0
+
+include $(top_srcdir)/doc/local.mk
diff --git a/configure.ac b/configure.ac
index 5651fd127..52918ca6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,7 +492,6 @@ gt_LOCALE_FR
AC_CONFIG_FILES(
Makefile
- doc/Makefile
lib/Makefile
man/Makefile
po/Makefile.in
diff --git a/doc/Makefile.am b/doc/local.mk
index 121c7cc6d..665dd211d 100644
--- a/doc/Makefile.am
+++ b/doc/local.mk
@@ -1,4 +1,5 @@
# Make coreutils documentation. -*-Makefile-*-
+# This is included by the top-level Makefile.am.
# Copyright (C) 1995-2012 Free Software Foundation, Inc.
@@ -15,9 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-info_TEXINFOS = coreutils.texi
+info_TEXINFOS = doc/coreutils.texi
-coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
+doc_coreutils_TEXINFOS = \
+ doc/perm.texi \
+ doc/parse-datetime.texi \
+ doc/constants.texi \
+ doc/fdl.texi
doc_srcdir = $(top_srcdir)/doc
@@ -31,16 +36,16 @@ doc_srcdir = $(top_srcdir)/doc
# old systems.
AM_MAKEINFOFLAGS = --no-split
-constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
{ sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c && \
sed -n -e \
's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
- $(top_srcdir)/src/shred.c; } > t-$@ \
- && mv t-$@ $@
+ $(top_srcdir)/src/shred.c; } > $@-t \
+ && mv $@-t $@
-MAINTAINERCLEANFILES = constants.texi
+MAINTAINERCLEANFILES += doc/constants.texi
# Extended regular expressions to match word starts and ends.
_W = (^|[^A-Za-z0-9_])
@@ -108,9 +113,6 @@ sc-avoid-zeroes:
$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
&& exit 1 || :
-# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME = doc/Makefile
-
# The quantity inside @var{...} should not contain upper case letters.
# The leading backslash exemption is to permit in-macro uses like
# @var{\varName\} where the upper case letter is part of a parameter name.
@@ -121,7 +123,7 @@ find_upper_case_var = \
$$v = $$1; \
$$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
} \
- END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
+ END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
sc-lower-case-var:
$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
$(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi