]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
distdir/emacs: avoid `test -d` with MKDIR_P
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2023 09:02:57 +0000 (04:02 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 15 Jan 2023 00:18:44 +0000 (19:18 -0500)
We don't need to do the `test -d ... || mkdir ...` dance when we
have the MKDIR_P helper, so simplify this code a bit.

* lib/am/distdir.am: Use $(MKDIR_P).
* lib/am/lisp.am: Drop redundant `test -d`.

lib/am/distdir.am
lib/am/lisp.am

index 4cfc742ce23d7580cb719dab238b7e68fa7628d7..264713c332e611b9e71df96ee4be422b3b22ef0b 100644 (file)
@@ -103,7 +103,7 @@ endif %?TOPDIR_P%
 ##
 if %?TOPDIR_P%
        $(am__remove_distdir)
-       test -d "$(distdir)" || mkdir "$(distdir)"
+       $(AM_V_at)$(MKDIR_P) "$(distdir)"
 endif %?TOPDIR_P%
 ##
 ##
index d5858f8661af845114b3f6483a7a1ca916fec6d2..c96be2121656226035c51a0a15b26a0ea68c50ef 100644 (file)
@@ -37,7 +37,7 @@ endif %?INSTALL%
            am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
          esac; \
 ## Emacs byte-compilation won't create this automatically, sadly.
-         test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
+         $(MKDIR_P) "$$am__dir" || exit 1; \
          $(EMACS) --batch --no-site-file \
            $(AM_ELCFLAGS) $(ELCFLAGS) \
            $$am__subdir_includes -L $(builddir) -L $(srcdir) \