Skip to content

Commit

Permalink
Use Autoconf macros AC_PROG_MKDIR_P and MKDIR_P
Browse files Browse the repository at this point in the history
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_005fMKDIR_005fP-277

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
  • Loading branch information
ShaoHe Feng authored and alinefm committed Jan 29, 2014
1 parent 21f099f commit 9057ae1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion m4/po.m4
Expand Up @@ -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
Expand Down
21 changes: 9 additions & 12 deletions po/Makefile.in.in
Expand Up @@ -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 back
# 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@
Expand Down Expand Up @@ -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; \
Expand All @@ -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"; \
Expand Down Expand Up @@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit 9057ae1

Please sign in to comment.