[PATCH] Use Autoconf macros AC_PROG_MKDIR_P and MKDIR_P

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> configure complains AM_PROG_MKDIR_P and MKDIR_P are obsolete. configure.ac:44: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:44: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:44: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. Automake manual says:
From Automake 1.8 to 1.9.6 AM_PROG_MKDIR_P used to define the output variable mkdir_p to one of mkdir -p, install-sh -d, or mkinstalldirs
Nowadays Autoconf provides a similar functionality with AC_PROG_MKDIR_P. Automake manual advises to switch ASAP to the more modern Autoconf-provided interface instead; both the macro and the variable might be removed in a future major Automake release. AC_PROG_MKDIR_P will set output variable MKDIR_P. And kimchi already contains install-sh under build-aux. REF: http://www.gnu.org/software/automake/manual/automake.html#Obsolete-Macros http://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fPROG_... Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- m4/po.m4 | 2 +- po/Makefile.in.in | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/m4/po.m4 b/m4/po.m4 index 47f36a4..8bc921d 100644 --- a/m4/po.m4 +++ b/m4/po.m4 @@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl defined by autoconf AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that diff --git a/po/Makefile.in.in b/po/Makefile.in.in index c2e9c1b..f7c1611 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -32,17 +32,14 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -# We use $(mkdir_p). -# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as -# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, -# @install_sh@ does not start with $(SHELL), so we add it. -# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined -# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake -# versions, $(mkinstalldirs) and $(install_sh) are unused. +# We use $(MKDIR_P). +# This macro uses the 'mkdir -p' command if possible. Otherwise, it falls ba +# on invoking install-sh with the -d option, so your package should contain +# install-sh as described under AC_PROG_INSTALL. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ -mkdir_p = @mkdir_p@ +MKDIR_P = @MKDIR_P@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ @@ -168,7 +165,7 @@ install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ @@ -186,7 +183,7 @@ install-data-yes: all cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ + $(MKDIR_P) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ @@ -226,7 +223,7 @@ installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi @@ -237,7 +234,7 @@ installdirs-data-yes: cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ + $(MKDIR_P) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ -- 1.8.4.2

On 01/28/2014 05:22 AM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
configure complains AM_PROG_MKDIR_P and MKDIR_P are obsolete. configure.ac:44: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:44: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:44: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
Automake manual says: From Automake 1.8 to 1.9.6 AM_PROG_MKDIR_P used to define the output variable mkdir_p to one of mkdir -p, install-sh -d, or mkinstalldirs
Nowadays Autoconf provides a similar functionality with AC_PROG_MKDIR_P. Automake manual advises to switch ASAP to the more modern Autoconf-provided interface instead; both the macro and the variable might be removed in a future major Automake release.
AC_PROG_MKDIR_P will set output variable MKDIR_P.
And kimchi already contains install-sh under build-aux.
REF: http://www.gnu.org/software/automake/manual/automake.html#Obsolete-Macros http://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fPROG_...
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- m4/po.m4 | 2 +- po/Makefile.in.in | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/m4/po.m4 b/m4/po.m4 index 47f36a4..8bc921d 100644 --- a/m4/po.m4 +++ b/m4/po.m4 @@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl defined by autoconf AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that diff --git a/po/Makefile.in.in b/po/Makefile.in.in index c2e9c1b..f7c1611 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -32,17 +32,14 @@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@
-# We use $(mkdir_p). -# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as -# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, -# @install_sh@ does not start with $(SHELL), so we add it. -# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined -# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake -# versions, $(mkinstalldirs) and $(install_sh) are unused. +# We use $(MKDIR_P). +# This macro uses the 'mkdir -p' command if possible. Otherwise, it falls ba
typo: falls ba I think it should be "falls back" I can fix it before merging
+# on invoking install-sh with the -d option, so your package should contain +# install-sh as described under AC_PROG_INSTALL. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ -mkdir_p = @mkdir_p@ +MKDIR_P = @MKDIR_P@
GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ @@ -168,7 +165,7 @@ install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ @@ -186,7 +183,7 @@ install-data-yes: all cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ + $(MKDIR_P) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ @@ -226,7 +223,7 @@ installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi @@ -237,7 +234,7 @@ installdirs-data-yes: cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ + $(MKDIR_P) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
participants (2)
-
Aline Manera
-
shaohef@linux.vnet.ibm.com