]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: adjust new rule not to depend on bash-4.x
authorJim Meyering <meyering@fb.com>
Sun, 13 Jul 2014 17:24:33 +0000 (10:24 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 13 Jul 2014 17:30:24 +0000 (10:30 -0700)
* man/local.mk (man/dynamic-deps.mk): Use the same code to
derive FOO from man/FOO.1 as in the .x.1 rule below.
Using the more concise "name=$${man:4: -2}" is not portable enough.

man/local.mk

index 0f0b66e252c0312f093f74dbe80c6a9319c02bdc..a4117b110e7591acfd9ac5fd78eeb7de1c9cfd8f 100644 (file)
@@ -61,7 +61,7 @@ CLEANFILES += man/dynamic-deps.mk
 man/dynamic-deps.mk: Makefile
        $(AM_V_GEN)rm -f $@ $@-t
        $(AM_V_at)for man in $(ALL_MANS); do                            \
-               name=$${man:4: -2} ; # Space is important               \
+               name=`echo "$$man"|sed 's|.*/||; s|\.1$$||'` || exit 1; \
                case $$name in                                          \
                     arch) prog='uname';;                               \
                  install) prog='ginstall';;                            \