1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-12 02:12:06 +02:00

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'.
This commit is contained in:
Stefano Lattarini
2012-08-29 14:22:47 +02:00
committed by Jim Meyering
parent d1b490c10d
commit f56980b99c
3 changed files with 15 additions and 12 deletions

View File

@@ -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

View File

@@ -492,7 +492,6 @@ gt_LOCALE_FR
AC_CONFIG_FILES(
Makefile
doc/Makefile
lib/Makefile
man/Makefile
po/Makefile.in

View File

@@ -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