GNU bug report logs -
#60776
[PATCH] distdir/emacs: avoid `test -d` with MKDIR_P
Previous Next
Reported by: Mike Frysinger <vapier <at> gentoo.org>
Date: Fri, 13 Jan 2023 09:08:02 UTC
Severity: normal
Tags: patch
Done: Mike Frysinger <vapier <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 | 2 +-
lib/am/lisp.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 4cfc742ce23d..264713c332e6 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -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%
##
##
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index d5858f8661af..c96be2121656 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -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) \
--
2.39.0
This bug report was last modified 2 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.