Skip to content

Commit 9057ae1

Browse files
ShaoHe Fengalinefm
ShaoHe Feng
authored andcommitted
Use Autoconf macros AC_PROG_MKDIR_P and MKDIR_P
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 <[email protected]>
1 parent 21f099f commit 9057ae1

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

m4/po.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
2424
[
2525
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2626
AC_REQUIRE([AC_PROG_INSTALL])dnl
27-
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
27+
AC_REQUIRE([AC_PROG_MKDIR_P])dnl defined by autoconf
2828
AC_REQUIRE([AM_NLS])dnl
2929
3030
dnl Release version of the gettext macros. This is used to ensure that

po/Makefile.in.in

+9-12
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,14 @@ gettextsrcdir = $(datadir)/gettext/po
3232
INSTALL = @INSTALL@
3333
INSTALL_DATA = @INSTALL_DATA@
3434

35-
# We use $(mkdir_p).
36-
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
37-
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
38-
# @install_sh@ does not start with $(SHELL), so we add it.
39-
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
40-
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
41-
# versions, $(mkinstalldirs) and $(install_sh) are unused.
35+
# We use $(MKDIR_P).
36+
# This macro uses the 'mkdir -p' command if possible. Otherwise, it falls back
37+
# on invoking install-sh with the -d option, so your package should contain
38+
# install-sh as described under AC_PROG_INSTALL.
4239
mkinstalldirs = $(SHELL) @install_sh@ -d
4340
install_sh = $(SHELL) @install_sh@
4441
MKDIR_P = @MKDIR_P@
45-
mkdir_p = @mkdir_p@
42+
MKDIR_P = @MKDIR_P@
4643

4744
GMSGFMT_ = @GMSGFMT@
4845
GMSGFMT_no = @GMSGFMT@
@@ -168,7 +165,7 @@ install: install-exec install-data
168165
install-exec:
169166
install-data: install-data-@USE_NLS@
170167
if test "$(PACKAGE)" = "gettext-tools"; then \
171-
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
168+
$(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
172169
for file in $(DISTFILES.common) Makevars.template; do \
173170
$(INSTALL_DATA) $(srcdir)/$$file \
174171
$(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -186,7 +183,7 @@ install-data-yes: all
186183
cat=`basename $$cat`; \
187184
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
188185
dir=$(localedir)/$$lang/LC_MESSAGES; \
189-
$(mkdir_p) $(DESTDIR)$$dir; \
186+
$(MKDIR_P) $(DESTDIR)$$dir; \
190187
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
191188
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
192189
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -226,7 +223,7 @@ installdirs: installdirs-exec installdirs-data
226223
installdirs-exec:
227224
installdirs-data: installdirs-data-@USE_NLS@
228225
if test "$(PACKAGE)" = "gettext-tools"; then \
229-
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
226+
$(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
230227
else \
231228
: ; \
232229
fi
@@ -237,7 +234,7 @@ installdirs-data-yes:
237234
cat=`basename $$cat`; \
238235
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
239236
dir=$(localedir)/$$lang/LC_MESSAGES; \
240-
$(mkdir_p) $(DESTDIR)$$dir; \
237+
$(MKDIR_P) $(DESTDIR)$$dir; \
241238
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
242239
if test -n "$$lc"; then \
243240
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \

0 commit comments

Comments
 (0)