[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
From: |
Jim Meyering |
Subject: |
Re: [PATCH 00/22] Towards a non-recursive build system for coreutils? |
Date: |
Thu, 30 Aug 2012 14:16:19 +0200 |
Stefano Lattarini wrote:
> On 08/30/2012 12:10 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>>>> Thanks for all the work.
>>>>
>>>> Would you please mail to me (or to the list) the concatenation of those
>>>> patches
>>
>> Thanks again. I've begun looking at these changes, so here's
>> some preliminary feedback.
>>
>> As expected, the build now seems faster.
>> I haven't yet measured it.
>>
> IMHO, a proper measurement will be appropriate only once 'src/' has been
> merged into the top-level as well.
>
>> I've had to make a few changes:
>>
>> - "make distcheck" failed due to a typo in man/local.mk.
>> I fixed that by s,dir/,man/, below.
>>
> Oops. I should have run a "make dist" at least ("make distcheck" fails
> for me even on the master branch, so I didn't run it, although I tried
> a VPATH build).
>
>> - "make syntax-check" failed due to a long line and to a TAB
>> followed by 8 spaces. To address the long line, rather than
>> splitting the just-lengthened line, I preferred to factor out
>> this definition:
>>
>> texi_files = $(srcdir)/doc/*.texi
>>
> OTOH, I had seen this, and I thought I had fixed it. I must have lost
> the patch in the reshuffling and rebasing ... Sorry for the confusion.
I've merged those into the appropriate change sets, removed all
Signed-off-by: lines and made a few minor wording changes.
Please review the differences. If you're happy with the result,
I'll push the lot.
>From 276b67f7bf307f38778e102cf843d6666b808602 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 12:35:43 +0200
Subject: [PATCH 01/22] build: don't abuse Automake internals (with its
'check-am' rule)
* tests/check.mk (check-am): Remove; obtain the same effect by moving
its dependency '.built-programs' ...
(check_DATA): ... to this variable.
---
tests/check.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/check.mk b/tests/check.mk
index be3641f..0e08f6d 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -38,7 +38,7 @@ check: vc_exe_in_TESTS
CLEANFILES =
CLEANFILES += .built-programs
-check-am: .built-programs
+check_DATA = .built-programs
.built-programs: $(top_srcdir)/src/Makefile.am
$(AM_V_GEN)(cd $(top_builddir)/src \
&& MAKEFLAGS= $(MAKE) -s built_programs.list) \
--
1.7.12
>From 2e9335609e5e6648ce690ac8cb69df9a7bfda024 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 13:03:27 +0200
Subject: [PATCH 02/22] maint: slightly improve .gitignore
* .gitignore: Ignore '.deps' only when it's a directory.
Ignore '*.trs' only if they are in a subdirectory of the
'tests/' directory.
---
.gitignore | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 383361b..aad59bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,7 @@
*.[EIOX]
*.bak
*.o
-*.trs
-*/.deps
+*/.deps/
*~
._bootmp
.gdb-history
@@ -155,6 +154,7 @@
/src/version.h
/stamp-h1
/tests/*/*.log
+/tests/*/*.trs
/tests/.built-programs
/tests/t?
/tests/test-suite.log
--
1.7.12
>From a5af26936f26bcde91c45d99c499d648ecc37af4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 13:55:49 +0200
Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
not EXTRA_DIST
* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
(EXTRA_DIST): ... listing them here. This ensure the rebuild rules
will be more faithful.
($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
---
doc/Makefile.am | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index dea2756..9a50714 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,7 +17,7 @@
info_TEXINFOS = coreutils.texi
-EXTRA_DIST = perm.texi parse-datetime.texi constants.texi fdl.texi
+coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
@@ -40,9 +40,6 @@ constants.texi: $(top_srcdir)/src/tail.c
$(top_srcdir)/src/shred.c
MAINTAINERCLEANFILES = constants.texi
-$(DVIS): $(EXTRA_DIST)
-$(INFO_DEPS): $(EXTRA_DIST)
-
# Extended regular expressions to match word starts and ends.
_W = (^|[^A-Za-z0-9_])
W_ = ([^A-Za-z0-9_]|$$)
--
1.7.12
>From 78f9df627616976bf27777d5751d60f0fe841cac Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 14:01:12 +0200
Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
doc Makefile
This is just a preparatory refactoring that will become useful in
a future change (where the doc/Makefile.am makefile will be merged
with the top-level one).
* doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
Use it throughout instead of "bare" '$(srcdir)'.
---
doc/Makefile.am | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9a50714..4e5150f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,6 +19,8 @@ info_TEXINFOS = coreutils.texi
coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
+doc_srcdir = $(top_srcdir)/doc
+
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
# then this is necessary even if the package name is 7 characters long.
@@ -60,21 +62,21 @@ syntax_checks = \
# List words/regexps here that should not appear in the texinfo documentation.
check-texinfo: $(syntax_checks)
$(AM_V_GEN)fail=0; \
- grep '@url{' $(srcdir)/*.texi && fail=1; \
- grep '\$$@"' $(srcdir)/*.texi && fail=1; \
- grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
- grep -n filename $(srcdir)/*.texi \
+ grep '@url{' $(doc_srcdir)/*.texi && fail=1; \
+ grep '\$$@"' $(doc_srcdir)/*.texi && fail=1; \
+ grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1; \
+ grep -n filename $(doc_srcdir)/*.texi \
| $(EGREP) -v 'setfilename|[{]filename[}]' \
&& fail=1; \
exit $$fail
sc-avoid-builtin:
- $(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi \
+ $(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
&& exit 1 || :
sc-avoid-path:
$(AM_V_GEN)fail=0; \
- $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
+ $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi \
| $(EGREP) -v \
'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]' \
&& fail=1; \
@@ -82,28 +84,28 @@ sc-avoid-path:
# Use "time zone", not "timezone".
sc-avoid-timezone:
- $(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
# Check for insufficient exponent grouping, e.g.,
# @math{2^64} should be @math{2^{64}}.
sc-exponent-grouping:
- $(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1
|| :
# E.g., use @sc{nul}, not NUL.
sc-use-small-caps-NUL:
- $(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
# Say I/O, not IO.
sc-avoid-io:
- $(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
# I prefer nonzero over non-zero.
sc-avoid-non-zero:
- $(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
# Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
sc-avoid-zeroes:
- $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
+ $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
&& exit 1 || :
# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
@@ -122,6 +124,6 @@ find_upper_case_var = \
END {$$m and (warn "$(ME): 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) $(srcdir)/*.texi
+ $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
check: check-texinfo
--
1.7.12
>From a050c0bcfa833e697f849015e84a2bd31a010963 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 14:15:42 +0200
Subject: [PATCH 05/22] build: use 'check-local' to extend the 'check' target
* doc/Makefile.am (check-local): Here, by making this depend
on 'check-texinfo' ...
(check): ... rather than this. While the old usage worked, it
did so for an implementation detail rather than a documented
behaviour, so relying on that was riskier a "unclean".
---
doc/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4e5150f..121c7cc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -126,4 +126,4 @@ sc-lower-case-var:
$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
$(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
-check: check-texinfo
+check-local: check-texinfo
--
1.7.12
>From 975a78c51c2936b5d061c33acd297fcd627a7663 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 14:22:47 +0200
Subject: [PATCH 06/22] 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'.
---
Makefile.am | 4 +++-
configure.ac | 1 -
doc/{Makefile.am => local.mk} | 22 ++++++++++++----------
3 files changed, 15 insertions(+), 12 deletions(-)
rename doc/{Makefile.am => local.mk} (90%)
diff --git a/Makefile.am b/Makefile.am
index 72d93d5..0446e43 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 5651fd1..52918ca 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
similarity index 90%
rename from doc/Makefile.am
rename to doc/local.mk
index 121c7cc..665dd21 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
--
1.7.12
>From 1d317cea7ed0de55664652e1b4b8bd4fde1cb23f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:02:19 +0200
Subject: [PATCH 07/22] build: don't define $(SUFFIXES) explicitly
* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart
enough to extract the list of suffixes from the '.x.1' suffix rule
automatically.
---
man/Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index cc93a42..8e9df08 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -139,8 +139,6 @@ yes.1: $(common_dep) $(srcdir)/yes.x
../src/yes.c
# provoke regeneration of all $(MAN) files.
$(MAN): $(top_srcdir)/src/system.h
-SUFFIXES = .x .1
-
# Ensure that help2man runs the ../src/ginstall binary as
# 'install' when creating install.1.
# Similarly, ensure that it uses the ../src/[ binary to create test.1.
--
1.7.12
>From 817ab71b93a8288da90db6b78a96218e796d9de4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:18:08 +0200
Subject: [PATCH 08/22] maint: simplify definition of $MAN in configure.ac
* configure.ac: Here, by making less use of 'sed' and 'tr' munging,
and relying on a smarter and simpler shell loop instead.
---
configure.ac | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 52918ca..bc7520d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,16 +456,19 @@ case " $optional_bin_progs " in
*' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
esac
-MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
-
-# Change "ginstall.1" to "install.1" in $MAN.
-MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
- | tr '\015\012' ' '; echo`
-
-# Remove [.1, since writing a portable rule for it in man/Makefile.am
-# is not practical. The sed LHS below uses the autoconf quadrigraph
-# representing '['.
-MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
+MAN=`
+ for p in $optional_bin_progs; do
+ # Change "ginstall.1" to "install.1" in $MAN.
+ test $p = ginstall && p=install
+ # Ignore the "[" program, since writing a portable make rule to
+ # generate its manpage is not practical.
+ dnl Use the autoconf-provided quadrigraph to represent "[",
+ dnl otherwise we will incur in dreadful quoting issues.
+ test x$p = x'@<:@' && continue
+ echo "$p.1"
+ done`
+# Normalize whitespace.
+MAN=`echo $MAN`
OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
AC_SUBST([OPTIONAL_BIN_PROGS])
--
1.7.12
>From 9955bd9fd4d1c3df7325869eb3dd4475936f6aa6 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:44:05 +0200
Subject: [PATCH 09/22] build: add an explanatory comment
* man/Makefile.am (EXTRA_DIST): Describe portability issues of the
idiom we now use. Reformat the definition a little while at it.
---
man/Makefile.am | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 8e9df08..44eb310 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,10 +19,19 @@ dist_man1_MANS = $(MAN)
man_aux = $(dist_man1_MANS:.1=.x)
-EXTRA_DIST = $(man_aux) $(NO_INSTALL_PROGS_DEFAULT:%=%.x) help2man \
- $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+EXTRA_DIST = $(man_aux) help2man
MAINTAINERCLEANFILES = $(dist_man1_MANS)
+# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make). In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+ $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
+ $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+
# Depend on ../.version to get version number changes.
common_dep = ../.version
--
1.7.12
>From 6537c196510670268eebcbb6bc0a4fe0bf575a61 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:55:54 +0200
Subject: [PATCH 10/22] build: fix a stray usage of uninitialized $(ME)
* man/Makefile.am (sc_option_desc_uppercase): Here.
---
man/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 44eb310..84b585f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -185,7 +185,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/;
s/^test$$/[/'`
.PHONY: sc_option_desc_uppercase
sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
- { echo 1>&2 '$(ME): found initial capitals in --help'; \
+ { echo 1>&2 '$@: found initial capitals in --help'; \
exit 1; } || :;
.PHONY: sc_man_file_correlation
--
1.7.12
>From 01ee6c536827acf8804c5ae4fbfa9a5d57ef5e3c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:56:47 +0200
Subject: [PATCH 11/22] build: rename common_dep -> mandep in man/Makefile
This is mostly a preparatory refactoring in view of future changes.
* man/Makefile.am (common_dep): Rename ...
(mandep): ... like this.
All usages adjusted.
---
man/Makefile.am | 212 ++++++++++++++++++++++++++++----------------------------
1 file changed, 106 insertions(+), 106 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 84b585f..ef0fbd9 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -33,116 +33,116 @@ EXTRA_DIST += \
$(NO_INSTALL_PROGS_DEFAULT:%=%.1)
# Depend on ../.version to get version number changes.
-common_dep = ../.version
+mandep = ../.version
# Note that arch depends on uname.c
-arch.1: $(common_dep) $(srcdir)/arch.x ../src/uname.c
-
-base64.1: $(common_dep) $(srcdir)/base64.x ../src/base64.c
-basename.1: $(common_dep) $(srcdir)/basename.x ../src/basename.c
-cat.1: $(common_dep) $(srcdir)/cat.x ../src/cat.c
-chcon.1: $(common_dep) $(srcdir)/chcon.x ../src/chcon.c
-chgrp.1: $(common_dep) $(srcdir)/chgrp.x ../src/chgrp.c
-chmod.1: $(common_dep) $(srcdir)/chmod.x ../src/chmod.c
-chown.1: $(common_dep) $(srcdir)/chown.x ../src/chown.c
-chroot.1: $(common_dep) $(srcdir)/chroot.x ../src/chroot.c
-cksum.1: $(common_dep) $(srcdir)/cksum.x ../src/cksum.c
-comm.1: $(common_dep) $(srcdir)/comm.x ../src/comm.c
-cp.1: $(common_dep) $(srcdir)/cp.x ../src/cp.c
-csplit.1: $(common_dep) $(srcdir)/csplit.x ../src/csplit.c
-cut.1: $(common_dep) $(srcdir)/cut.x ../src/cut.c
-date.1: $(common_dep) $(srcdir)/date.x ../src/date.c
-dd.1: $(common_dep) $(srcdir)/dd.x ../src/dd.c
-df.1: $(common_dep) $(srcdir)/df.x ../src/df.c
+arch.1: $(mandep) $(srcdir)/arch.x ../src/uname.c
+
+base64.1: $(mandep) $(srcdir)/base64.x ../src/base64.c
+basename.1: $(mandep) $(srcdir)/basename.x ../src/basename.c
+cat.1: $(mandep) $(srcdir)/cat.x ../src/cat.c
+chcon.1: $(mandep) $(srcdir)/chcon.x ../src/chcon.c
+chgrp.1: $(mandep) $(srcdir)/chgrp.x ../src/chgrp.c
+chmod.1: $(mandep) $(srcdir)/chmod.x ../src/chmod.c
+chown.1: $(mandep) $(srcdir)/chown.x ../src/chown.c
+chroot.1: $(mandep) $(srcdir)/chroot.x ../src/chroot.c
+cksum.1: $(mandep) $(srcdir)/cksum.x ../src/cksum.c
+comm.1: $(mandep) $(srcdir)/comm.x ../src/comm.c
+cp.1: $(mandep) $(srcdir)/cp.x ../src/cp.c
+csplit.1: $(mandep) $(srcdir)/csplit.x ../src/csplit.c
+cut.1: $(mandep) $(srcdir)/cut.x ../src/cut.c
+date.1: $(mandep) $(srcdir)/date.x ../src/date.c
+dd.1: $(mandep) $(srcdir)/dd.x ../src/dd.c
+df.1: $(mandep) $(srcdir)/df.x ../src/df.c
# Note that dir depends on ls.c, since that's where it's --help text is.
-dir.1: $(common_dep) $(srcdir)/dir.x ../src/ls.c
-
-dircolors.1: $(common_dep) $(srcdir)/dircolors.x ../src/dircolors.c
-dirname.1: $(common_dep) $(srcdir)/dirname.x ../src/dirname.c
-du.1: $(common_dep) $(srcdir)/du.x ../src/du.c
-echo.1: $(common_dep) $(srcdir)/echo.x ../src/echo.c
-env.1: $(common_dep) $(srcdir)/env.x ../src/env.c
-expand.1: $(common_dep) $(srcdir)/expand.x ../src/expand.c
-expr.1: $(common_dep) $(srcdir)/expr.x ../src/expr.c
-factor.1: $(common_dep) $(srcdir)/factor.x ../src/factor.c
-false.1: $(common_dep) $(srcdir)/false.x ../src/false.c
-fmt.1: $(common_dep) $(srcdir)/fmt.x ../src/fmt.c
-fold.1: $(common_dep) $(srcdir)/fold.x ../src/fold.c
-groups.1: $(common_dep) $(srcdir)/groups.x ../src/groups.c
-head.1: $(common_dep) $(srcdir)/head.x ../src/head.c
-hostid.1: $(common_dep) $(srcdir)/hostid.x ../src/hostid.c
-hostname.1: $(common_dep) $(srcdir)/hostname.x ../src/hostname.c
-id.1: $(common_dep) $(srcdir)/id.x ../src/id.c
-install.1: $(common_dep) $(srcdir)/install.x ../src/install.c
-join.1: $(common_dep) $(srcdir)/join.x ../src/join.c
-kill.1: $(common_dep) $(srcdir)/kill.x ../src/kill.c
-link.1: $(common_dep) $(srcdir)/link.x ../src/link.c
-ln.1: $(common_dep) $(srcdir)/ln.x ../src/ln.c
-logname.1: $(common_dep) $(srcdir)/logname.x ../src/logname.c
-ls.1: $(common_dep) $(srcdir)/ls.x ../src/ls.c
-md5sum.1: $(common_dep) $(srcdir)/md5sum.x ../src/md5sum.c
-mkdir.1: $(common_dep) $(srcdir)/mkdir.x ../src/mkdir.c
-mkfifo.1: $(common_dep) $(srcdir)/mkfifo.x ../src/mkfifo.c
-mknod.1: $(common_dep) $(srcdir)/mknod.x ../src/mknod.c
-mktemp.1: $(common_dep) $(srcdir)/mktemp.x ../src/mktemp.c
-mv.1: $(common_dep) $(srcdir)/mv.x ../src/mv.c
-nice.1: $(common_dep) $(srcdir)/nice.x ../src/nice.c
-nl.1: $(common_dep) $(srcdir)/nl.x ../src/nl.c
-nohup.1: $(common_dep) $(srcdir)/nohup.x ../src/nohup.c
-nproc.1: $(common_dep) $(srcdir)/nproc.x ../src/nproc.c
-od.1: $(common_dep) $(srcdir)/od.x ../src/od.c
-paste.1: $(common_dep) $(srcdir)/paste.x ../src/paste.c
-pathchk.1: $(common_dep) $(srcdir)/pathchk.x ../src/pathchk.c
-pinky.1: $(common_dep) $(srcdir)/pinky.x ../src/pinky.c
-pr.1: $(common_dep) $(srcdir)/pr.x ../src/pr.c
-printenv.1: $(common_dep) $(srcdir)/printenv.x ../src/printenv.c
-printf.1: $(common_dep) $(srcdir)/printf.x ../src/printf.c
-ptx.1: $(common_dep) $(srcdir)/ptx.x ../src/ptx.c
-pwd.1: $(common_dep) $(srcdir)/pwd.x ../src/pwd.c
-readlink.1: $(common_dep) $(srcdir)/readlink.x ../src/readlink.c
-realpath.1: $(common_dep) $(srcdir)/realpath.x ../src/realpath.c
-rm.1: $(common_dep) $(srcdir)/rm.x ../src/rm.c
-rmdir.1: $(common_dep) $(srcdir)/rmdir.x ../src/rmdir.c
-runcon.1: $(common_dep) $(srcdir)/runcon.x ../src/runcon.c
-seq.1: $(common_dep) $(srcdir)/seq.x ../src/seq.c
-sha1sum.1: $(common_dep) $(srcdir)/sha1sum.x ../src/md5sum.c
-sha224sum.1: $(common_dep) $(srcdir)/sha224sum.x ../src/md5sum.c
-sha256sum.1: $(common_dep) $(srcdir)/sha256sum.x ../src/md5sum.c
-sha384sum.1: $(common_dep) $(srcdir)/sha384sum.x ../src/md5sum.c
-sha512sum.1: $(common_dep) $(srcdir)/sha512sum.x ../src/md5sum.c
-shred.1: $(common_dep) $(srcdir)/shred.x ../src/shred.c
-shuf.1: $(common_dep) $(srcdir)/shuf.x ../src/shuf.c
-sleep.1: $(common_dep) $(srcdir)/sleep.x ../src/sleep.c
-sort.1: $(common_dep) $(srcdir)/sort.x ../src/sort.c
-split.1: $(common_dep) $(srcdir)/split.x ../src/split.c
-stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c
-stdbuf.1: $(common_dep) $(srcdir)/stdbuf.x ../src/stdbuf.c
-stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c
-sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c
-sync.1: $(common_dep) $(srcdir)/sync.x ../src/sync.c
-tac.1: $(common_dep) $(srcdir)/tac.x ../src/tac.c
-tail.1: $(common_dep) $(srcdir)/tail.x ../src/tail.c
-tee.1: $(common_dep) $(srcdir)/tee.x ../src/tee.c
-test.1: $(common_dep) $(srcdir)/test.x ../src/test.c
-timeout.1: $(common_dep) $(srcdir)/timeout.x ../src/timeout.c
-touch.1: $(common_dep) $(srcdir)/touch.x ../src/touch.c
-tr.1: $(common_dep) $(srcdir)/tr.x ../src/tr.c
-true.1: $(common_dep) $(srcdir)/true.x ../src/true.c
-truncate.1: $(common_dep) $(srcdir)/truncate.x ../src/truncate.c
-tsort.1: $(common_dep) $(srcdir)/tsort.x ../src/tsort.c
-tty.1: $(common_dep) $(srcdir)/tty.x ../src/tty.c
-uname.1: $(common_dep) $(srcdir)/uname.x ../src/uname.c
-unexpand.1: $(common_dep) $(srcdir)/unexpand.x ../src/unexpand.c
-uniq.1: $(common_dep) $(srcdir)/uniq.x ../src/uniq.c
-unlink.1: $(common_dep) $(srcdir)/unlink.x ../src/unlink.c
-uptime.1: $(common_dep) $(srcdir)/uptime.x ../src/uptime.c
-users.1: $(common_dep) $(srcdir)/users.x ../src/users.c
-vdir.1: $(common_dep) $(srcdir)/vdir.x ../src/ls.c
-wc.1: $(common_dep) $(srcdir)/wc.x ../src/wc.c
-who.1: $(common_dep) $(srcdir)/who.x ../src/who.c
-whoami.1: $(common_dep) $(srcdir)/whoami.x ../src/whoami.c
-yes.1: $(common_dep) $(srcdir)/yes.x ../src/yes.c
+dir.1: $(mandep) $(srcdir)/dir.x ../src/ls.c
+
+dircolors.1: $(mandep) $(srcdir)/dircolors.x ../src/dircolors.c
+dirname.1: $(mandep) $(srcdir)/dirname.x ../src/dirname.c
+du.1: $(mandep) $(srcdir)/du.x ../src/du.c
+echo.1: $(mandep) $(srcdir)/echo.x ../src/echo.c
+env.1: $(mandep) $(srcdir)/env.x ../src/env.c
+expand.1: $(mandep) $(srcdir)/expand.x ../src/expand.c
+expr.1: $(mandep) $(srcdir)/expr.x ../src/expr.c
+factor.1: $(mandep) $(srcdir)/factor.x ../src/factor.c
+false.1: $(mandep) $(srcdir)/false.x ../src/false.c
+fmt.1: $(mandep) $(srcdir)/fmt.x ../src/fmt.c
+fold.1: $(mandep) $(srcdir)/fold.x ../src/fold.c
+groups.1: $(mandep) $(srcdir)/groups.x ../src/groups.c
+head.1: $(mandep) $(srcdir)/head.x ../src/head.c
+hostid.1: $(mandep) $(srcdir)/hostid.x ../src/hostid.c
+hostname.1: $(mandep) $(srcdir)/hostname.x ../src/hostname.c
+id.1: $(mandep) $(srcdir)/id.x ../src/id.c
+install.1: $(mandep) $(srcdir)/install.x ../src/install.c
+join.1: $(mandep) $(srcdir)/join.x ../src/join.c
+kill.1: $(mandep) $(srcdir)/kill.x ../src/kill.c
+link.1: $(mandep) $(srcdir)/link.x ../src/link.c
+ln.1: $(mandep) $(srcdir)/ln.x ../src/ln.c
+logname.1: $(mandep) $(srcdir)/logname.x ../src/logname.c
+ls.1: $(mandep) $(srcdir)/ls.x ../src/ls.c
+md5sum.1: $(mandep) $(srcdir)/md5sum.x ../src/md5sum.c
+mkdir.1: $(mandep) $(srcdir)/mkdir.x ../src/mkdir.c
+mkfifo.1: $(mandep) $(srcdir)/mkfifo.x ../src/mkfifo.c
+mknod.1: $(mandep) $(srcdir)/mknod.x ../src/mknod.c
+mktemp.1: $(mandep) $(srcdir)/mktemp.x ../src/mktemp.c
+mv.1: $(mandep) $(srcdir)/mv.x ../src/mv.c
+nice.1: $(mandep) $(srcdir)/nice.x ../src/nice.c
+nl.1: $(mandep) $(srcdir)/nl.x ../src/nl.c
+nohup.1: $(mandep) $(srcdir)/nohup.x ../src/nohup.c
+nproc.1: $(mandep) $(srcdir)/nproc.x ../src/nproc.c
+od.1: $(mandep) $(srcdir)/od.x ../src/od.c
+paste.1: $(mandep) $(srcdir)/paste.x ../src/paste.c
+pathchk.1: $(mandep) $(srcdir)/pathchk.x ../src/pathchk.c
+pinky.1: $(mandep) $(srcdir)/pinky.x ../src/pinky.c
+pr.1: $(mandep) $(srcdir)/pr.x ../src/pr.c
+printenv.1: $(mandep) $(srcdir)/printenv.x ../src/printenv.c
+printf.1: $(mandep) $(srcdir)/printf.x ../src/printf.c
+ptx.1: $(mandep) $(srcdir)/ptx.x ../src/ptx.c
+pwd.1: $(mandep) $(srcdir)/pwd.x ../src/pwd.c
+readlink.1: $(mandep) $(srcdir)/readlink.x ../src/readlink.c
+realpath.1: $(mandep) $(srcdir)/realpath.x ../src/realpath.c
+rm.1: $(mandep) $(srcdir)/rm.x ../src/rm.c
+rmdir.1: $(mandep) $(srcdir)/rmdir.x ../src/rmdir.c
+runcon.1: $(mandep) $(srcdir)/runcon.x ../src/runcon.c
+seq.1: $(mandep) $(srcdir)/seq.x ../src/seq.c
+sha1sum.1: $(mandep) $(srcdir)/sha1sum.x ../src/md5sum.c
+sha224sum.1: $(mandep) $(srcdir)/sha224sum.x ../src/md5sum.c
+sha256sum.1: $(mandep) $(srcdir)/sha256sum.x ../src/md5sum.c
+sha384sum.1: $(mandep) $(srcdir)/sha384sum.x ../src/md5sum.c
+sha512sum.1: $(mandep) $(srcdir)/sha512sum.x ../src/md5sum.c
+shred.1: $(mandep) $(srcdir)/shred.x ../src/shred.c
+shuf.1: $(mandep) $(srcdir)/shuf.x ../src/shuf.c
+sleep.1: $(mandep) $(srcdir)/sleep.x ../src/sleep.c
+sort.1: $(mandep) $(srcdir)/sort.x ../src/sort.c
+split.1: $(mandep) $(srcdir)/split.x ../src/split.c
+stat.1: $(mandep) $(srcdir)/stat.x ../src/stat.c
+stdbuf.1: $(mandep) $(srcdir)/stdbuf.x ../src/stdbuf.c
+stty.1: $(mandep) $(srcdir)/stty.x ../src/stty.c
+sum.1: $(mandep) $(srcdir)/sum.x ../src/sum.c
+sync.1: $(mandep) $(srcdir)/sync.x ../src/sync.c
+tac.1: $(mandep) $(srcdir)/tac.x ../src/tac.c
+tail.1: $(mandep) $(srcdir)/tail.x ../src/tail.c
+tee.1: $(mandep) $(srcdir)/tee.x ../src/tee.c
+test.1: $(mandep) $(srcdir)/test.x ../src/test.c
+timeout.1: $(mandep) $(srcdir)/timeout.x ../src/timeout.c
+touch.1: $(mandep) $(srcdir)/touch.x ../src/touch.c
+tr.1: $(mandep) $(srcdir)/tr.x ../src/tr.c
+true.1: $(mandep) $(srcdir)/true.x ../src/true.c
+truncate.1: $(mandep) $(srcdir)/truncate.x ../src/truncate.c
+tsort.1: $(mandep) $(srcdir)/tsort.x ../src/tsort.c
+tty.1: $(mandep) $(srcdir)/tty.x ../src/tty.c
+uname.1: $(mandep) $(srcdir)/uname.x ../src/uname.c
+unexpand.1: $(mandep) $(srcdir)/unexpand.x ../src/unexpand.c
+uniq.1: $(mandep) $(srcdir)/uniq.x ../src/uniq.c
+unlink.1: $(mandep) $(srcdir)/unlink.x ../src/unlink.c
+uptime.1: $(mandep) $(srcdir)/uptime.x ../src/uptime.c
+users.1: $(mandep) $(srcdir)/users.x ../src/users.c
+vdir.1: $(mandep) $(srcdir)/vdir.x ../src/ls.c
+wc.1: $(mandep) $(srcdir)/wc.x ../src/wc.c
+who.1: $(mandep) $(srcdir)/who.x ../src/who.c
+whoami.1: $(mandep) $(srcdir)/whoami.x ../src/whoami.c
+yes.1: $(mandep) $(srcdir)/yes.x ../src/yes.c
# This is required so that changes to e.g., emit_bug_reporting_address
# provoke regeneration of all $(MAN) files.
--
1.7.12
>From 60e298e85ed0369035c0b4a4af63ae5622d082f8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 15:57:22 +0200
Subject: [PATCH 12/22] maint: typofix: s/it's/its/
* man/Makefile.am: Here.
---
man/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index ef0fbd9..ff8b01e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -55,7 +55,7 @@ date.1: $(mandep) $(srcdir)/date.x
../src/date.c
dd.1: $(mandep) $(srcdir)/dd.x ../src/dd.c
df.1: $(mandep) $(srcdir)/df.x ../src/df.c
-# Note that dir depends on ls.c, since that's where it's --help text is.
+# Note that dir depends on ls.c, since that's where its --help text is.
dir.1: $(mandep) $(srcdir)/dir.x ../src/ls.c
dircolors.1: $(mandep) $(srcdir)/dircolors.x ../src/dircolors.c
--
1.7.12
>From 9d8e0181458196781b6d4396c1e9649b97322ff8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 16:13:35 +0200
Subject: [PATCH 13/22] build: rely on VPATH capabilities in man/Makefile
* man/Makefile.am: In all the 'foo.1' targets, no need to depend
explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care
of that automatically.
---
man/Makefile.am | 210 ++++++++++++++++++++++++++++----------------------------
1 file changed, 105 insertions(+), 105 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index ff8b01e..3d6a963 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -36,113 +36,113 @@ EXTRA_DIST += \
mandep = ../.version
# Note that arch depends on uname.c
-arch.1: $(mandep) $(srcdir)/arch.x ../src/uname.c
-
-base64.1: $(mandep) $(srcdir)/base64.x ../src/base64.c
-basename.1: $(mandep) $(srcdir)/basename.x ../src/basename.c
-cat.1: $(mandep) $(srcdir)/cat.x ../src/cat.c
-chcon.1: $(mandep) $(srcdir)/chcon.x ../src/chcon.c
-chgrp.1: $(mandep) $(srcdir)/chgrp.x ../src/chgrp.c
-chmod.1: $(mandep) $(srcdir)/chmod.x ../src/chmod.c
-chown.1: $(mandep) $(srcdir)/chown.x ../src/chown.c
-chroot.1: $(mandep) $(srcdir)/chroot.x ../src/chroot.c
-cksum.1: $(mandep) $(srcdir)/cksum.x ../src/cksum.c
-comm.1: $(mandep) $(srcdir)/comm.x ../src/comm.c
-cp.1: $(mandep) $(srcdir)/cp.x ../src/cp.c
-csplit.1: $(mandep) $(srcdir)/csplit.x ../src/csplit.c
-cut.1: $(mandep) $(srcdir)/cut.x ../src/cut.c
-date.1: $(mandep) $(srcdir)/date.x ../src/date.c
-dd.1: $(mandep) $(srcdir)/dd.x ../src/dd.c
-df.1: $(mandep) $(srcdir)/df.x ../src/df.c
+arch.1: $(mandep) ../src/uname.c
+
+base64.1: $(mandep) ../src/base64.c
+basename.1: $(mandep) ../src/basename.c
+cat.1: $(mandep) ../src/cat.c
+chcon.1: $(mandep) ../src/chcon.c
+chgrp.1: $(mandep) ../src/chgrp.c
+chmod.1: $(mandep) ../src/chmod.c
+chown.1: $(mandep) ../src/chown.c
+chroot.1: $(mandep) ../src/chroot.c
+cksum.1: $(mandep) ../src/cksum.c
+comm.1: $(mandep) ../src/comm.c
+cp.1: $(mandep) ../src/cp.c
+csplit.1: $(mandep) ../src/csplit.c
+cut.1: $(mandep) ../src/cut.c
+date.1: $(mandep) ../src/date.c
+dd.1: $(mandep) ../src/dd.c
+df.1: $(mandep) ../src/df.c
# Note that dir depends on ls.c, since that's where its --help text is.
-dir.1: $(mandep) $(srcdir)/dir.x ../src/ls.c
-
-dircolors.1: $(mandep) $(srcdir)/dircolors.x ../src/dircolors.c
-dirname.1: $(mandep) $(srcdir)/dirname.x ../src/dirname.c
-du.1: $(mandep) $(srcdir)/du.x ../src/du.c
-echo.1: $(mandep) $(srcdir)/echo.x ../src/echo.c
-env.1: $(mandep) $(srcdir)/env.x ../src/env.c
-expand.1: $(mandep) $(srcdir)/expand.x ../src/expand.c
-expr.1: $(mandep) $(srcdir)/expr.x ../src/expr.c
-factor.1: $(mandep) $(srcdir)/factor.x ../src/factor.c
-false.1: $(mandep) $(srcdir)/false.x ../src/false.c
-fmt.1: $(mandep) $(srcdir)/fmt.x ../src/fmt.c
-fold.1: $(mandep) $(srcdir)/fold.x ../src/fold.c
-groups.1: $(mandep) $(srcdir)/groups.x ../src/groups.c
-head.1: $(mandep) $(srcdir)/head.x ../src/head.c
-hostid.1: $(mandep) $(srcdir)/hostid.x ../src/hostid.c
-hostname.1: $(mandep) $(srcdir)/hostname.x ../src/hostname.c
-id.1: $(mandep) $(srcdir)/id.x ../src/id.c
-install.1: $(mandep) $(srcdir)/install.x ../src/install.c
-join.1: $(mandep) $(srcdir)/join.x ../src/join.c
-kill.1: $(mandep) $(srcdir)/kill.x ../src/kill.c
-link.1: $(mandep) $(srcdir)/link.x ../src/link.c
-ln.1: $(mandep) $(srcdir)/ln.x ../src/ln.c
-logname.1: $(mandep) $(srcdir)/logname.x ../src/logname.c
-ls.1: $(mandep) $(srcdir)/ls.x ../src/ls.c
-md5sum.1: $(mandep) $(srcdir)/md5sum.x ../src/md5sum.c
-mkdir.1: $(mandep) $(srcdir)/mkdir.x ../src/mkdir.c
-mkfifo.1: $(mandep) $(srcdir)/mkfifo.x ../src/mkfifo.c
-mknod.1: $(mandep) $(srcdir)/mknod.x ../src/mknod.c
-mktemp.1: $(mandep) $(srcdir)/mktemp.x ../src/mktemp.c
-mv.1: $(mandep) $(srcdir)/mv.x ../src/mv.c
-nice.1: $(mandep) $(srcdir)/nice.x ../src/nice.c
-nl.1: $(mandep) $(srcdir)/nl.x ../src/nl.c
-nohup.1: $(mandep) $(srcdir)/nohup.x ../src/nohup.c
-nproc.1: $(mandep) $(srcdir)/nproc.x ../src/nproc.c
-od.1: $(mandep) $(srcdir)/od.x ../src/od.c
-paste.1: $(mandep) $(srcdir)/paste.x ../src/paste.c
-pathchk.1: $(mandep) $(srcdir)/pathchk.x ../src/pathchk.c
-pinky.1: $(mandep) $(srcdir)/pinky.x ../src/pinky.c
-pr.1: $(mandep) $(srcdir)/pr.x ../src/pr.c
-printenv.1: $(mandep) $(srcdir)/printenv.x ../src/printenv.c
-printf.1: $(mandep) $(srcdir)/printf.x ../src/printf.c
-ptx.1: $(mandep) $(srcdir)/ptx.x ../src/ptx.c
-pwd.1: $(mandep) $(srcdir)/pwd.x ../src/pwd.c
-readlink.1: $(mandep) $(srcdir)/readlink.x ../src/readlink.c
-realpath.1: $(mandep) $(srcdir)/realpath.x ../src/realpath.c
-rm.1: $(mandep) $(srcdir)/rm.x ../src/rm.c
-rmdir.1: $(mandep) $(srcdir)/rmdir.x ../src/rmdir.c
-runcon.1: $(mandep) $(srcdir)/runcon.x ../src/runcon.c
-seq.1: $(mandep) $(srcdir)/seq.x ../src/seq.c
-sha1sum.1: $(mandep) $(srcdir)/sha1sum.x ../src/md5sum.c
-sha224sum.1: $(mandep) $(srcdir)/sha224sum.x ../src/md5sum.c
-sha256sum.1: $(mandep) $(srcdir)/sha256sum.x ../src/md5sum.c
-sha384sum.1: $(mandep) $(srcdir)/sha384sum.x ../src/md5sum.c
-sha512sum.1: $(mandep) $(srcdir)/sha512sum.x ../src/md5sum.c
-shred.1: $(mandep) $(srcdir)/shred.x ../src/shred.c
-shuf.1: $(mandep) $(srcdir)/shuf.x ../src/shuf.c
-sleep.1: $(mandep) $(srcdir)/sleep.x ../src/sleep.c
-sort.1: $(mandep) $(srcdir)/sort.x ../src/sort.c
-split.1: $(mandep) $(srcdir)/split.x ../src/split.c
-stat.1: $(mandep) $(srcdir)/stat.x ../src/stat.c
-stdbuf.1: $(mandep) $(srcdir)/stdbuf.x ../src/stdbuf.c
-stty.1: $(mandep) $(srcdir)/stty.x ../src/stty.c
-sum.1: $(mandep) $(srcdir)/sum.x ../src/sum.c
-sync.1: $(mandep) $(srcdir)/sync.x ../src/sync.c
-tac.1: $(mandep) $(srcdir)/tac.x ../src/tac.c
-tail.1: $(mandep) $(srcdir)/tail.x ../src/tail.c
-tee.1: $(mandep) $(srcdir)/tee.x ../src/tee.c
-test.1: $(mandep) $(srcdir)/test.x ../src/test.c
-timeout.1: $(mandep) $(srcdir)/timeout.x ../src/timeout.c
-touch.1: $(mandep) $(srcdir)/touch.x ../src/touch.c
-tr.1: $(mandep) $(srcdir)/tr.x ../src/tr.c
-true.1: $(mandep) $(srcdir)/true.x ../src/true.c
-truncate.1: $(mandep) $(srcdir)/truncate.x ../src/truncate.c
-tsort.1: $(mandep) $(srcdir)/tsort.x ../src/tsort.c
-tty.1: $(mandep) $(srcdir)/tty.x ../src/tty.c
-uname.1: $(mandep) $(srcdir)/uname.x ../src/uname.c
-unexpand.1: $(mandep) $(srcdir)/unexpand.x ../src/unexpand.c
-uniq.1: $(mandep) $(srcdir)/uniq.x ../src/uniq.c
-unlink.1: $(mandep) $(srcdir)/unlink.x ../src/unlink.c
-uptime.1: $(mandep) $(srcdir)/uptime.x ../src/uptime.c
-users.1: $(mandep) $(srcdir)/users.x ../src/users.c
-vdir.1: $(mandep) $(srcdir)/vdir.x ../src/ls.c
-wc.1: $(mandep) $(srcdir)/wc.x ../src/wc.c
-who.1: $(mandep) $(srcdir)/who.x ../src/who.c
-whoami.1: $(mandep) $(srcdir)/whoami.x ../src/whoami.c
-yes.1: $(mandep) $(srcdir)/yes.x ../src/yes.c
+dir.1: $(mandep) ../src/ls.c
+
+dircolors.1: $(mandep) ../src/dircolors.c
+dirname.1: $(mandep) ../src/dirname.c
+du.1: $(mandep) ../src/du.c
+echo.1: $(mandep) ../src/echo.c
+env.1: $(mandep) ../src/env.c
+expand.1: $(mandep) ../src/expand.c
+expr.1: $(mandep) ../src/expr.c
+factor.1: $(mandep) ../src/factor.c
+false.1: $(mandep) ../src/false.c
+fmt.1: $(mandep) ../src/fmt.c
+fold.1: $(mandep) ../src/fold.c
+groups.1: $(mandep) ../src/groups.c
+head.1: $(mandep) ../src/head.c
+hostid.1: $(mandep) ../src/hostid.c
+hostname.1: $(mandep) ../src/hostname.c
+id.1: $(mandep) ../src/id.c
+install.1: $(mandep) ../src/install.c
+join.1: $(mandep) ../src/join.c
+kill.1: $(mandep) ../src/kill.c
+link.1: $(mandep) ../src/link.c
+ln.1: $(mandep) ../src/ln.c
+logname.1: $(mandep) ../src/logname.c
+ls.1: $(mandep) ../src/ls.c
+md5sum.1: $(mandep) ../src/md5sum.c
+mkdir.1: $(mandep) ../src/mkdir.c
+mkfifo.1: $(mandep) ../src/mkfifo.c
+mknod.1: $(mandep) ../src/mknod.c
+mktemp.1: $(mandep) ../src/mktemp.c
+mv.1: $(mandep) ../src/mv.c
+nice.1: $(mandep) ../src/nice.c
+nl.1: $(mandep) ../src/nl.c
+nohup.1: $(mandep) ../src/nohup.c
+nproc.1: $(mandep) ../src/nproc.c
+od.1: $(mandep) ../src/od.c
+paste.1: $(mandep) ../src/paste.c
+pathchk.1: $(mandep) ../src/pathchk.c
+pinky.1: $(mandep) ../src/pinky.c
+pr.1: $(mandep) ../src/pr.c
+printenv.1: $(mandep) ../src/printenv.c
+printf.1: $(mandep) ../src/printf.c
+ptx.1: $(mandep) ../src/ptx.c
+pwd.1: $(mandep) ../src/pwd.c
+readlink.1: $(mandep) ../src/readlink.c
+realpath.1: $(mandep) ../src/realpath.c
+rm.1: $(mandep) ../src/rm.c
+rmdir.1: $(mandep) ../src/rmdir.c
+runcon.1: $(mandep) ../src/runcon.c
+seq.1: $(mandep) ../src/seq.c
+sha1sum.1: $(mandep) ../src/md5sum.c
+sha224sum.1: $(mandep) ../src/md5sum.c
+sha256sum.1: $(mandep) ../src/md5sum.c
+sha384sum.1: $(mandep) ../src/md5sum.c
+sha512sum.1: $(mandep) ../src/md5sum.c
+shred.1: $(mandep) ../src/shred.c
+shuf.1: $(mandep) ../src/shuf.c
+sleep.1: $(mandep) ../src/sleep.c
+sort.1: $(mandep) ../src/sort.c
+split.1: $(mandep) ../src/split.c
+stat.1: $(mandep) ../src/stat.c
+stdbuf.1: $(mandep) ../src/stdbuf.c
+stty.1: $(mandep) ../src/stty.c
+sum.1: $(mandep) ../src/sum.c
+sync.1: $(mandep) ../src/sync.c
+tac.1: $(mandep) ../src/tac.c
+tail.1: $(mandep) ../src/tail.c
+tee.1: $(mandep) ../src/tee.c
+test.1: $(mandep) ../src/test.c
+timeout.1: $(mandep) ../src/timeout.c
+touch.1: $(mandep) ../src/touch.c
+tr.1: $(mandep) ../src/tr.c
+true.1: $(mandep) ../src/true.c
+truncate.1: $(mandep) ../src/truncate.c
+tsort.1: $(mandep) ../src/tsort.c
+tty.1: $(mandep) ../src/tty.c
+uname.1: $(mandep) ../src/uname.c
+unexpand.1: $(mandep) ../src/unexpand.c
+uniq.1: $(mandep) ../src/uniq.c
+unlink.1: $(mandep) ../src/unlink.c
+uptime.1: $(mandep) ../src/uptime.c
+users.1: $(mandep) ../src/users.c
+vdir.1: $(mandep) ../src/ls.c
+wc.1: $(mandep) ../src/wc.c
+who.1: $(mandep) ../src/who.c
+whoami.1: $(mandep) ../src/whoami.c
+yes.1: $(mandep) ../src/yes.c
# This is required so that changes to e.g., emit_bug_reporting_address
# provoke regeneration of all $(MAN) files.
--
1.7.12
>From b3c7490bd4b69f6907b440586016f40a49c8ab8d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 16:22:38 +0200
Subject: [PATCH 14/22] build: make a rule less dependent on exact source tree
layout
This is mostly a preparatory change in view of future ones.
* man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access
the 'src' directory.
---
man/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index 3d6a963..ff1c1ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -168,7 +168,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/;
s/^test$$/[/'`
&& { \
rm -rf $t; \
mkdir $t; \
- (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+ (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
$(PERL) -- $(srcdir)/help2man \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$*.x \
--
1.7.12
>From 88efe23e17882a42c167b9524858bb0883e18e70 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 16:57:41 +0200
Subject: [PATCH 15/22] build: provide convenience target 'all_programs' also
at top-level
This will be mostly useful in future changes.
* Makefile.am (all_programs): New, simply the work delegating to
the same-named target in the 'src/' subdirectory.
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
(sc_man_file_correlation): Likewise.
---
Makefile.am | 4 ++++
cfg.mk | 6 ++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0446e43..f80c4a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,4 +170,8 @@ check-git-hook-script-sync:
rm -rf $$t; \
test $$fail = 0
+.PHONY: all_programs
+all_programs:
+ @cd ./src && $(MAKE) -s $@
+
include $(top_srcdir)/doc/local.mk
diff --git a/cfg.mk b/cfg.mk
index 9244225..e6e0828 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -171,14 +171,12 @@ sc_long_lines:
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
# but that would miss descriptions not on the same line as the -option.
ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase:
- @$(MAKE) -s -C src all_programs
+sc_option_desc_uppercase: all_programs
@$(MAKE) -s -C man $@
# Ensure all man/*.[1x] files are present
ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation:
- @$(MAKE) -s -C src all_programs
+sc_man_file_correlation: all_programs
@$(MAKE) -s -C man $@
# Ensure that the end of each release's section is marked by two empty lines.
--
1.7.12
>From 56a914537bd732b6c38ea64ec25c7e0477fbb890 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 21:31:57 +0200
Subject: [PATCH 16/22] build: rework some recipes in man/Makefile.am, for
future changes
This change is merely required to make future changes easier.
In particular, since we are going to merge the contents of
'man/Makefile.am' in the top-level Makefile, we need to avoid
conflicts with the rules and variables in 'dist-check.mk', and
to prepare for changes in the value of the '$*' variable in the
recipe of the '.x -> .1' suffix rule.
* man/Makefile.am (t, mapped_name): Delete, inlining their use ...
(.1.x): ... in the recipe of this suffix rule. Other adjustments
to prepare to changes in the value of the '$*' automatic variable.
While at it, made more resilient about unlikely but possible failure.
Adjust and reorder few comments.
---
man/Makefile.am | 54 +++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/man/Makefile.am b/man/Makefile.am
index ff1c1ab..f7db996 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -148,38 +148,38 @@ yes.1: $(mandep) ../src/yes.c
# provoke regeneration of all $(MAN) files.
$(MAN): $(top_srcdir)/src/system.h
-# Ensure that help2man runs the ../src/ginstall binary as
-# 'install' when creating install.1.
-# Similarly, ensure that it uses the ../src/[ binary to create test.1.
-t = $*.td
-mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
-
-# Note the use of $t/$*, rather than just '$*' as in other packages.
-# That is necessary to avoid failures for programs that are also shell built-in
-# functions like echo, false, printf, pwd.
.x.1:
$(AM_V_GEN)case '$(PERL)' in \
*"/missing "*) \
echo 'WARNING: cannot update man page $@ since perl is missing' \
'or inadequate' 1>&2 \
- ;; \
- *) \
- rm -f $@ $@-t \
- && { \
- rm -rf $t; \
- mkdir $t; \
- (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
- $(PERL) -- $(srcdir)/help2man \
- --source='$(PACKAGE_STRING)' \
- --include=$(srcdir)/$*.x \
- --output=$t/$@ $t/$*; \
- } \
- && sed 's|$*\.td/||g' $t/$@ > $@-t \
- && rm -rf $t \
- && chmod -w $@-t \
- && mv $@-t $@ \
- ;; \
- esac
+ exit 0;; \
+ esac; \
+ name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1; \
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'. Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+ case $$name in \
+ install) prog='ginstall';; \
+ test) prog='[';; \
+ *) prog=$$name;; \
+ esac; \
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+ rm -f $@ $@-t \
+ && t=$*.td \
+ && rm -rf $$t \
+ && mkdir $$t \
+ && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name) \
+ && $(PERL) -- $(srcdir)/help2man \
+ --source='$(PACKAGE_STRING)' \
+ --include=$(srcdir)/$$name.x \
+ --output=$$t/$$name.1 $$t/$$name \
+ && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t \
+ && rm -rf $$t \
+ && chmod -w $@-t \
+ && mv $@-t $@
# Option descriptions should not start with a capital letter
.PHONY: sc_option_desc_uppercase
--
1.7.12
>From f6696dd246d96ce3449119c4d2f2365bac156de1 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 16:37:24 +0200
Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
subdirectory
* Makefile.am: Include 'man/local.mk'.
(SUBDIRS): Remove 'man'.
* configure.ac ($MAN): Adjust to have a leading 'man/' component.
(AC_CONFIG_FILES): Remove 'man/Makefile'.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this. With further adjustments: each 'foo.1'
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'. Also ...
(mandep): Adjust, removing the leading '../' component.
Several whitespace adjustments wile at it.
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
the associated recipes, they are now directly available from the
included 'man/local.mk'. Actually, the other changes in this commit
have made these recipes instable and not completely correct, bu that
will be fixed in later changes.
---
Makefile.am | 3 +-
cfg.mk | 2 -
configure.ac | 3 +-
man/Makefile.am | 226 --------------------------------------------------------
man/local.mk | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 226 insertions(+), 231 deletions(-)
delete mode 100644 man/Makefile.am
create mode 100644 man/local.mk
diff --git a/Makefile.am b/Makefile.am
index f80c4a6..d14bf88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
ALL_RECURSIVE_TARGETS =
-SUBDIRS = lib src man po tests gnulib-tests
+SUBDIRS = lib src po tests gnulib-tests
changelog_etc = \
ChangeLog-2005 \
@@ -175,3 +175,4 @@ all_programs:
@cd ./src && $(MAKE) -s $@
include $(top_srcdir)/doc/local.mk
+include $(top_srcdir)/man/local.mk
diff --git a/cfg.mk b/cfg.mk
index e6e0828..5f7193e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -172,12 +172,10 @@ sc_long_lines:
# but that would miss descriptions not on the same line as the -option.
ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
sc_option_desc_uppercase: all_programs
- @$(MAKE) -s -C man $@
# Ensure all man/*.[1x] files are present
ALL_RECURSIVE_TARGETS += sc_man_file_correlation
sc_man_file_correlation: all_programs
- @$(MAKE) -s -C man $@
# Ensure that the end of each release's section is marked by two empty lines.
sc_NEWS_two_empty_lines:
diff --git a/configure.ac b/configure.ac
index bc7520d..ce8ebc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,7 +465,7 @@ MAN=`
dnl Use the autoconf-provided quadrigraph to represent "[",
dnl otherwise we will incur in dreadful quoting issues.
test x$p = x'@<:@' && continue
- echo "$p.1"
+ echo "man/$p.1"
done`
# Normalize whitespace.
MAN=`echo $MAN`
@@ -496,7 +496,6 @@ gt_LOCALE_FR
AC_CONFIG_FILES(
Makefile
lib/Makefile
- man/Makefile
po/Makefile.in
src/Makefile
tests/Makefile
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index f7db996..0000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,226 +0,0 @@
-# Make coreutils man pages. -*-Makefile-*-
-
-# Copyright (C) 2002-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 3 of the License, 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/>.
-
-dist_man1_MANS = $(MAN)
-
-man_aux = $(dist_man1_MANS:.1=.x)
-
-EXTRA_DIST = $(man_aux) help2man
-MAINTAINERCLEANFILES = $(dist_man1_MANS)
-
-# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
-# practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make). In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
- $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
- $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-
-# Depend on ../.version to get version number changes.
-mandep = ../.version
-
-# Note that arch depends on uname.c
-arch.1: $(mandep) ../src/uname.c
-
-base64.1: $(mandep) ../src/base64.c
-basename.1: $(mandep) ../src/basename.c
-cat.1: $(mandep) ../src/cat.c
-chcon.1: $(mandep) ../src/chcon.c
-chgrp.1: $(mandep) ../src/chgrp.c
-chmod.1: $(mandep) ../src/chmod.c
-chown.1: $(mandep) ../src/chown.c
-chroot.1: $(mandep) ../src/chroot.c
-cksum.1: $(mandep) ../src/cksum.c
-comm.1: $(mandep) ../src/comm.c
-cp.1: $(mandep) ../src/cp.c
-csplit.1: $(mandep) ../src/csplit.c
-cut.1: $(mandep) ../src/cut.c
-date.1: $(mandep) ../src/date.c
-dd.1: $(mandep) ../src/dd.c
-df.1: $(mandep) ../src/df.c
-
-# Note that dir depends on ls.c, since that's where its --help text is.
-dir.1: $(mandep) ../src/ls.c
-
-dircolors.1: $(mandep) ../src/dircolors.c
-dirname.1: $(mandep) ../src/dirname.c
-du.1: $(mandep) ../src/du.c
-echo.1: $(mandep) ../src/echo.c
-env.1: $(mandep) ../src/env.c
-expand.1: $(mandep) ../src/expand.c
-expr.1: $(mandep) ../src/expr.c
-factor.1: $(mandep) ../src/factor.c
-false.1: $(mandep) ../src/false.c
-fmt.1: $(mandep) ../src/fmt.c
-fold.1: $(mandep) ../src/fold.c
-groups.1: $(mandep) ../src/groups.c
-head.1: $(mandep) ../src/head.c
-hostid.1: $(mandep) ../src/hostid.c
-hostname.1: $(mandep) ../src/hostname.c
-id.1: $(mandep) ../src/id.c
-install.1: $(mandep) ../src/install.c
-join.1: $(mandep) ../src/join.c
-kill.1: $(mandep) ../src/kill.c
-link.1: $(mandep) ../src/link.c
-ln.1: $(mandep) ../src/ln.c
-logname.1: $(mandep) ../src/logname.c
-ls.1: $(mandep) ../src/ls.c
-md5sum.1: $(mandep) ../src/md5sum.c
-mkdir.1: $(mandep) ../src/mkdir.c
-mkfifo.1: $(mandep) ../src/mkfifo.c
-mknod.1: $(mandep) ../src/mknod.c
-mktemp.1: $(mandep) ../src/mktemp.c
-mv.1: $(mandep) ../src/mv.c
-nice.1: $(mandep) ../src/nice.c
-nl.1: $(mandep) ../src/nl.c
-nohup.1: $(mandep) ../src/nohup.c
-nproc.1: $(mandep) ../src/nproc.c
-od.1: $(mandep) ../src/od.c
-paste.1: $(mandep) ../src/paste.c
-pathchk.1: $(mandep) ../src/pathchk.c
-pinky.1: $(mandep) ../src/pinky.c
-pr.1: $(mandep) ../src/pr.c
-printenv.1: $(mandep) ../src/printenv.c
-printf.1: $(mandep) ../src/printf.c
-ptx.1: $(mandep) ../src/ptx.c
-pwd.1: $(mandep) ../src/pwd.c
-readlink.1: $(mandep) ../src/readlink.c
-realpath.1: $(mandep) ../src/realpath.c
-rm.1: $(mandep) ../src/rm.c
-rmdir.1: $(mandep) ../src/rmdir.c
-runcon.1: $(mandep) ../src/runcon.c
-seq.1: $(mandep) ../src/seq.c
-sha1sum.1: $(mandep) ../src/md5sum.c
-sha224sum.1: $(mandep) ../src/md5sum.c
-sha256sum.1: $(mandep) ../src/md5sum.c
-sha384sum.1: $(mandep) ../src/md5sum.c
-sha512sum.1: $(mandep) ../src/md5sum.c
-shred.1: $(mandep) ../src/shred.c
-shuf.1: $(mandep) ../src/shuf.c
-sleep.1: $(mandep) ../src/sleep.c
-sort.1: $(mandep) ../src/sort.c
-split.1: $(mandep) ../src/split.c
-stat.1: $(mandep) ../src/stat.c
-stdbuf.1: $(mandep) ../src/stdbuf.c
-stty.1: $(mandep) ../src/stty.c
-sum.1: $(mandep) ../src/sum.c
-sync.1: $(mandep) ../src/sync.c
-tac.1: $(mandep) ../src/tac.c
-tail.1: $(mandep) ../src/tail.c
-tee.1: $(mandep) ../src/tee.c
-test.1: $(mandep) ../src/test.c
-timeout.1: $(mandep) ../src/timeout.c
-touch.1: $(mandep) ../src/touch.c
-tr.1: $(mandep) ../src/tr.c
-true.1: $(mandep) ../src/true.c
-truncate.1: $(mandep) ../src/truncate.c
-tsort.1: $(mandep) ../src/tsort.c
-tty.1: $(mandep) ../src/tty.c
-uname.1: $(mandep) ../src/uname.c
-unexpand.1: $(mandep) ../src/unexpand.c
-uniq.1: $(mandep) ../src/uniq.c
-unlink.1: $(mandep) ../src/unlink.c
-uptime.1: $(mandep) ../src/uptime.c
-users.1: $(mandep) ../src/users.c
-vdir.1: $(mandep) ../src/ls.c
-wc.1: $(mandep) ../src/wc.c
-who.1: $(mandep) ../src/who.c
-whoami.1: $(mandep) ../src/whoami.c
-yes.1: $(mandep) ../src/yes.c
-
-# This is required so that changes to e.g., emit_bug_reporting_address
-# provoke regeneration of all $(MAN) files.
-$(MAN): $(top_srcdir)/src/system.h
-
-.x.1:
- $(AM_V_GEN)case '$(PERL)' in \
- *"/missing "*) \
- echo 'WARNING: cannot update man page $@ since perl is missing' \
- 'or inadequate' 1>&2 \
- exit 0;; \
- esac; \
- name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1; \
-## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
-## creating 'install.1'. Similarly, ensure that it uses the 'src/[' binary
-## to create 'test.1'.
- case $$name in \
- install) prog='ginstall';; \
- test) prog='[';; \
- *) prog=$$name;; \
- esac; \
-## Note the use of $$t/$*, rather than just '$*' as in other packages.
-## That is necessary to avoid failures for programs that are also shell
-## built-in functions like echo, false, printf, pwd.
- rm -f $@ $@-t \
- && t=$*.td \
- && rm -rf $$t \
- && mkdir $$t \
- && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name) \
- && $(PERL) -- $(srcdir)/help2man \
- --source='$(PACKAGE_STRING)' \
- --include=$(srcdir)/$$name.x \
- --output=$$t/$$name.1 $$t/$$name \
- && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t \
- && rm -rf $$t \
- && chmod -w $@-t \
- && mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
- @grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
- { echo 1>&2 '$@: found initial capitals in --help'; \
- exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
- @PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
- t=$@-t; \
- (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
- | tr -s ' ' '\n' | sed 's/\.1$$//') \
- | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
- rm $$t
-
-all_programs = \
- (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
- | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
- @status=0; \
- for p in dummy `$(all_programs)`; do \
- test $$p = dummy && continue; \
- test $$p = ginstall && p=install || : ; \
- test -f $(srcdir)/$$p.x \
- || { echo missing $$p.x 1>&2; status=1; }; \
- done; \
- exit $$status
diff --git a/man/local.mk b/man/local.mk
new file mode 100644
index 0000000..20bdeb6
--- /dev/null
+++ b/man/local.mk
@@ -0,0 +1,223 @@
+# Make coreutils man pages. -*-Makefile-*-
+# This is included by the top-level Makefile.am.
+
+# Copyright (C) 2002-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 3 of the License, 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/>.
+
+dist_man1_MANS = $(MAN)
+
+man_aux = $(dist_man1_MANS:.1=.x)
+
+EXTRA_DIST += $(man_aux) man/help2man
+MAINTAINERCLEANFILES += $(dist_man1_MANS)
+
+# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make). In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+ $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
+ $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+# Depend on this to get version number changes.
+mandep = .version
+
+# Note that arch depends on uname.c
+man/arch.1: $(mandep) src/uname.c
+
+man/base64.1: $(mandep) src/base64.c
+man/basename.1: $(mandep) src/basename.c
+man/cat.1: $(mandep) src/cat.c
+man/chcon.1: $(mandep) src/chcon.c
+man/chgrp.1: $(mandep) src/chgrp.c
+man/chmod.1: $(mandep) src/chmod.c
+man/chown.1: $(mandep) src/chown.c
+man/chroot.1: $(mandep) src/chroot.c
+man/cksum.1: $(mandep) src/cksum.c
+man/comm.1: $(mandep) src/comm.c
+man/cp.1: $(mandep) src/cp.c
+man/csplit.1: $(mandep) src/csplit.c
+man/cut.1: $(mandep) src/cut.c
+man/date.1: $(mandep) src/date.c
+man/dd.1: $(mandep) src/dd.c
+man/df.1: $(mandep) src/df.c
+
+# Note that dir depends on ls.c, since that's where its --help text is.
+man/dir.1: $(mandep) src/ls.c
+
+man/dircolors.1: $(mandep) src/dircolors.c
+man/dirname.1: $(mandep) src/dirname.c
+man/du.1: $(mandep) src/du.c
+man/echo.1: $(mandep) src/echo.c
+man/env.1: $(mandep) src/env.c
+man/expand.1: $(mandep) src/expand.c
+man/expr.1: $(mandep) src/expr.c
+man/factor.1: $(mandep) src/factor.c
+man/false.1: $(mandep) src/false.c
+man/fmt.1: $(mandep) src/fmt.c
+man/fold.1: $(mandep) src/fold.c
+man/groups.1: $(mandep) src/groups.c
+man/head.1: $(mandep) src/head.c
+man/hostid.1: $(mandep) src/hostid.c
+man/hostname.1: $(mandep) src/hostname.c
+man/id.1: $(mandep) src/id.c
+man/install.1: $(mandep) src/install.c
+man/join.1: $(mandep) src/join.c
+man/kill.1: $(mandep) src/kill.c
+man/link.1: $(mandep) src/link.c
+man/ln.1: $(mandep) src/ln.c
+man/logname.1: $(mandep) src/logname.c
+man/ls.1: $(mandep) src/ls.c
+man/md5sum.1: $(mandep) src/md5sum.c
+man/mkdir.1: $(mandep) src/mkdir.c
+man/mkfifo.1: $(mandep) src/mkfifo.c
+man/mknod.1: $(mandep) src/mknod.c
+man/mktemp.1: $(mandep) src/mktemp.c
+man/mv.1: $(mandep) src/mv.c
+man/nice.1: $(mandep) src/nice.c
+man/nl.1: $(mandep) src/nl.c
+man/nohup.1: $(mandep) src/nohup.c
+man/nproc.1: $(mandep) src/nproc.c
+man/od.1: $(mandep) src/od.c
+man/paste.1: $(mandep) src/paste.c
+man/pathchk.1: $(mandep) src/pathchk.c
+man/pinky.1: $(mandep) src/pinky.c
+man/pr.1: $(mandep) src/pr.c
+man/printenv.1: $(mandep) src/printenv.c
+man/printf.1: $(mandep) src/printf.c
+man/ptx.1: $(mandep) src/ptx.c
+man/pwd.1: $(mandep) src/pwd.c
+man/readlink.1: $(mandep) src/readlink.c
+man/realpath.1: $(mandep) src/realpath.c
+man/rm.1: $(mandep) src/rm.c
+man/rmdir.1: $(mandep) src/rmdir.c
+man/runcon.1: $(mandep) src/runcon.c
+man/seq.1: $(mandep) src/seq.c
+man/sha1sum.1: $(mandep) src/md5sum.c
+man/sha224sum.1: $(mandep) src/md5sum.c
+man/sha256sum.1: $(mandep) src/md5sum.c
+man/sha384sum.1: $(mandep) src/md5sum.c
+man/sha512sum.1: $(mandep) src/md5sum.c
+man/shred.1: $(mandep) src/shred.c
+man/shuf.1: $(mandep) src/shuf.c
+man/sleep.1: $(mandep) src/sleep.c
+man/sort.1: $(mandep) src/sort.c
+man/split.1: $(mandep) src/split.c
+man/stat.1: $(mandep) src/stat.c
+man/stdbuf.1: $(mandep) src/stdbuf.c
+man/stty.1: $(mandep) src/stty.c
+man/sum.1: $(mandep) src/sum.c
+man/sync.1: $(mandep) src/sync.c
+man/tac.1: $(mandep) src/tac.c
+man/tail.1: $(mandep) src/tail.c
+man/tee.1: $(mandep) src/tee.c
+man/test.1: $(mandep) src/test.c
+man/timeout.1: $(mandep) src/timeout.c
+man/touch.1: $(mandep) src/touch.c
+man/tr.1: $(mandep) src/tr.c
+man/true.1: $(mandep) src/true.c
+man/truncate.1: $(mandep) src/truncate.c
+man/tsort.1: $(mandep) src/tsort.c
+man/tty.1: $(mandep) src/tty.c
+man/uname.1: $(mandep) src/uname.c
+man/unexpand.1: $(mandep) src/unexpand.c
+man/uniq.1: $(mandep) src/uniq.c
+man/unlink.1: $(mandep) src/unlink.c
+man/uptime.1: $(mandep) src/uptime.c
+man/users.1: $(mandep) src/users.c
+man/vdir.1: $(mandep) src/ls.c
+man/wc.1: $(mandep) src/wc.c
+man/who.1: $(mandep) src/who.c
+man/whoami.1: $(mandep) src/whoami.c
+man/yes.1: $(mandep) src/yes.c
+
+# This is required so that changes to e.g., emit_bug_reporting_address
+# provoke regeneration of all $(MAN) files.
+$(MAN): $(top_srcdir)/src/system.h
+
+.x.1:
+ $(AM_V_GEN)case '$(PERL)' in \
+ *"/missing "*) \
+ echo 'WARNING: cannot update man page $@ since perl is missing' \
+ 'or inadequate' 1>&2 \
+ exit 0;; \
+ esac; \
+ name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1; \
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'. Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+ case $$name in \
+ install) prog='ginstall';; \
+ test) prog='[';; \
+ *) prog=$$name;; \
+ esac; \
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+ rm -f $@ $@-t \
+ && t=$*.td \
+ && rm -rf $$t \
+ && mkdir $$t \
+ && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name) \
+ && $(PERL) -- $(srcdir)/man/help2man \
+ --source='$(PACKAGE_STRING)' \
+ --include=$(srcdir)/man/$$name.x \
+ --output=$$t/$$name.1 $$t/$$name \
+ && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t \
+ && rm -rf $$t \
+ && chmod -w $@-t \
+ && mv $@-t $@
+
+# Option descriptions should not start with a capital letter
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+ @grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+ { echo 1>&2 '$@: found initial capitals in --help'; \
+ exit 1; } || :;
+
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in this directory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS) above.
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+ @PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ t=$@-t; \
+ (cd $(srcdir)/man && ls -1 *.x) \
+ | sed 's/\.x$$//' | $(ASSORT) > $$t; \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ | tr -s ' ' '\n' | sed 's/\.1$$//') \
+ | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
+ rm $$t
+
+all_programs = \
+ (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
+ | grep -v '\['
+
+.PHONY: check-programs-vs-x
+check-programs-vs-x:
+ @status=0; \
+ for p in dummy `$(all_programs)`; do \
+ test $$p = dummy && continue; \
+ test $$p = ginstall && p=install || : ; \
+ test -f $(srcdir)/man/$$p.x \
+ || { echo missing $$p.x 1>&2; status=1; }; \
+ done; \
+ exit $$status
--
1.7.12
>From aaa9d080a4d0d60a6d5498cb01204115c8fc9b7d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 17:37:35 +0200
Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk
This is more natural, now that the top-level Makefile has access to
all the variables and rules once defined only in 'man/Makefile.am'
(that was before the previous commit).
* man/local.mk (all_programs, sc_option_desc_uppercase,
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
from here ...
* cfg.mk: ... to here. Adjust some comments in the process.
---
cfg.mk | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
man/local.mk | 40 ----------------------------------------
2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 5f7193e..9da6afa 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,16 +166,56 @@ sc_long_lines:
sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)'; \
done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
-# Option descriptions should not start with a capital letter
+# Option descriptions should not start with a capital letter.
# One could grep source directly as follows:
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
# but that would miss descriptions not on the same line as the -option.
ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase: all_programs
-
-# Ensure all man/*.[1x] files are present
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase:
+ @grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+ { echo 1>&2 '$@: found initial capitals in --help'; \
+ exit 1; } || :;
+sc_option_desc_uppercase: $(dist_man1_MANS) \
+ $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+ all_programs
+
+# Ensure all man/*.[1x] files are present.
ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation: all_programs
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS).
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+ @PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ t=$@-t; \
+ (cd $(srcdir)/man && ls -1 *.x) \
+ | sed 's/\.x$$//' | $(ASSORT) > $$t; \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ | tr -s ' ' '\n' | sed 's/\.1$$//') \
+ | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
+ rm $$t
+
+all_programs = \
+ (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
+ | grep -v '\['
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding coreutils program.
+.PHONY: check-programs-vs-x
+check-programs-vs-x: all_programs
+ @status=0; \
+ for p in dummy `$(all_programs)`; do \
+ test $$p = dummy && continue; \
+ test $$p = ginstall && p=install || : ; \
+ test -f $(srcdir)/man/$$p.x \
+ || { echo missing $$p.x 1>&2; status=1; }; \
+ done; \
+ exit $$status
# Ensure that the end of each release's section is marked by two empty lines.
sc_NEWS_two_empty_lines:
diff --git a/man/local.mk b/man/local.mk
index 20bdeb6..d42c982 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -181,43 +181,3 @@ $(MAN): $(top_srcdir)/src/system.h
&& rm -rf $$t \
&& chmod -w $@-t \
&& mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
- @grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
- { echo 1>&2 '$@: found initial capitals in --help'; \
- exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
- @PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH; \
- t=$@-t; \
- (cd $(srcdir)/man && ls -1 *.x) \
- | sed 's/\.x$$//' | $(ASSORT) > $$t; \
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
- | tr -s ' ' '\n' | sed 's/\.1$$//') \
- | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
- rm $$t
-
-all_programs = \
- (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
- | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
- @status=0; \
- for p in dummy `$(all_programs)`; do \
- test $$p = dummy && continue; \
- test $$p = ginstall && p=install || : ; \
- test -f $(srcdir)/man/$$p.x \
- || { echo missing $$p.x 1>&2; status=1; }; \
- done; \
- exit $$status
--
1.7.12
>From 936801e29c154dc873a5ab7cfc3b859aae61bc4c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 17:50:34 +0200
Subject: [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1'
* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from
$(dist_man1_MANS) entries before comparing them with the list of
expected programs.
---
cfg.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cfg.mk b/cfg.mk
index 9da6afa..5b0f1fc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -195,7 +195,8 @@ check-x-vs-1:
t=$@-t; \
(cd $(srcdir)/man && ls -1 *.x) \
| sed 's/\.x$$//' | $(ASSORT) > $$t; \
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(patsubst man/%,%,$(dist_man1_MANS)) \
+ $(NO_INSTALL_PROGS_DEFAULT) \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
--
1.7.12
>From 963dc11f81e569b971fda7eb73ffed91ef18a7ec Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 17:57:45 +0200
Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'
* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
and listed as prerequisites for this rule.
---
cfg.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cfg.mk b/cfg.mk
index 5b0f1fc..50fb13e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -177,7 +177,7 @@ sc_option_desc_uppercase:
{ echo 1>&2 '$@: found initial capitals in --help'; \
exit 1; } || :;
sc_option_desc_uppercase: $(dist_man1_MANS) \
- $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+ $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
all_programs
# Ensure all man/*.[1x] files are present.
--
1.7.12
>From 0aec09e9850fb107fc939c782642d33c8b91f188 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 17:59:48 +0200
Subject: [PATCH 21/22] build: factor out a little more re list of *.texi
files
We may well want to switch from checking all *.texi to
checking only version-controlled .texi files, so encapsulate
this concept in one place.
* doc/local.mk (doc_srcdir): Delete. Use this instead:
(texi_files): Define. All usages adjusted.
---
doc/local.mk | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/local.mk b/doc/local.mk
index 665dd21..585faf0 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -24,8 +24,6 @@ doc_coreutils_TEXINFOS = \
doc/constants.texi \
doc/fdl.texi
-doc_srcdir = $(top_srcdir)/doc
-
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
# then this is necessary even if the package name is 7 characters long.
@@ -62,26 +60,28 @@ syntax_checks = \
sc-lower-case-var \
sc-use-small-caps-NUL
+texi_files = $(srcdir)/doc/*.texi
+
.PHONY: $(syntax_checks) check-texinfo
# List words/regexps here that should not appear in the texinfo documentation.
check-texinfo: $(syntax_checks)
$(AM_V_GEN)fail=0; \
- grep '@url{' $(doc_srcdir)/*.texi && fail=1; \
- grep '\$$@"' $(doc_srcdir)/*.texi && fail=1; \
- grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1; \
- grep -n filename $(doc_srcdir)/*.texi \
+ grep '@url{' $(texi_files) && fail=1; \
+ grep '\$$@"' $(texi_files) && fail=1; \
+ grep -n '[^[:punct:]]@footnote' $(texi_files) && fail=1; \
+ grep -n filename $(texi_files) \
| $(EGREP) -v 'setfilename|[{]filename[}]' \
&& fail=1; \
exit $$fail
sc-avoid-builtin:
- $(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
+ $(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(texi_files) \
&& exit 1 || :
sc-avoid-path:
$(AM_V_GEN)fail=0; \
- $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi \
+ $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(texi_files) \
| $(EGREP) -v \
'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]' \
&& fail=1; \
@@ -89,28 +89,28 @@ sc-avoid-path:
# Use "time zone", not "timezone".
sc-avoid-timezone:
- $(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) timezone $(texi_files) && exit 1 || :
# Check for insufficient exponent grouping, e.g.,
# @math{2^64} should be @math{2^{64}}.
sc-exponent-grouping:
- $(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1
|| :
+ $(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(texi_files) && exit 1 || :
# E.g., use @sc{nul}, not NUL.
sc-use-small-caps-NUL:
- $(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(texi_files) && exit 1 || :
# Say I/O, not IO.
sc-avoid-io:
- $(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(texi_files) && exit 1 || :
# I prefer nonzero over non-zero.
sc-avoid-non-zero:
- $(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
+ $(AM_V_GEN)$(EGREP) non-zero $(texi_files) && exit 1 || :
# Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
sc-avoid-zeroes:
- $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
+ $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(texi_files) \
&& exit 1 || :
# The quantity inside @var{...} should not contain upper case letters.
@@ -126,6 +126,6 @@ find_upper_case_var = \
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
+ $(PERL) -lne $(find_upper_case_var) $(texi_files)
check-local: check-texinfo
--
1.7.12
>From 89983ffae9a2e22db12ed9f49b5f5c4c494fc31f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 29 Aug 2012 18:01:02 +0200
Subject: [PATCH 22/22] maint: update gitignore entries
* doc/.gitinore: Here, adding the '.dirstamp' file generated by
the Texinfo rules.
---
doc/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/doc/.gitignore b/doc/.gitignore
index ef55efd..e63c202 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -20,3 +20,4 @@
/parse-datetime.texi
/stamp-vti
/version.texi
+/.dirstamp
--
1.7.12
- [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1', (continued)
- [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1', Stefano Lattarini, 2012/08/29
- [PATCH 17/22] build: don't use recursive make to build the 'man' subdirectory, Stefano Lattarini, 2012/08/29
- [PATCH 22/22] maint: update gitignore entries, Stefano Lattarini, 2012/08/29
- [PATCH 21/22] build: remove redundant indirection with variable '$(doc_srcdir)', Stefano Lattarini, 2012/08/29
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Jim Meyering, 2012/08/29
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Jim Meyering, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?,
Jim Meyering <=
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Jim Meyering, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/30
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Bob Proulx, 2012/08/31
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/31
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Jim Meyering, 2012/08/31
- Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/31
Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?, Stefano Lattarini, 2012/08/30