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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60776 in the body.
You can then email your comments to 60776 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Fri, 13 Jan 2023 09:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mike Frysinger <vapier <at> gentoo.org>
:
New bug report received and forwarded. Copy sent to
automake-patches <at> gnu.org
.
(Fri, 13 Jan 2023 09:08:02 GMT)
Full text and
rfc822 format available.
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
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Fri, 13 Jan 2023 22:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60776 <at> debbugs.gnu.org (full text, mbox):
- test -d "$(distdir)" || mkdir "$(distdir)"
+ $(AM_V_at)$(MKDIR_P) "$(distdir)"
Ok by me, but why the AM_V_at for this particular command?
I don't see it used anywhere else in distdir.am.
- test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
+ $(MKDIR_P) "$$am__dir" || exit 1; \
Sure. Thanks. -k
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Sat, 14 Jan 2023 04:48:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 60776 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 13 Jan 2023 15:36, Karl Berry wrote:
> - test -d "$(distdir)" || mkdir "$(distdir)"
> + $(AM_V_at)$(MKDIR_P) "$(distdir)"
>
> Ok by me, but why the AM_V_at for this particular command?
> I don't see it used anywhere else in distdir.am.
this is certainly true, and it's something i want to fix ... at some point.
imo we overly rely on explicit @ in many places which can make debugging
failures painful. i imagine the current state is due to the silent-rules
work focusing on the most common paths (compile/rebuilds) and leaving the
rest to "one day". so if we ever get to that day, we'd use $(AM_V_at) in
this location. i figured making the change while i was here means we have
a slightly higher chance of this code eventually being silent-rules compat
vs finding the time to convert it all at once.
-mike
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Sat, 14 Jan 2023 22:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 60776 <at> debbugs.gnu.org (full text, mbox):
imo we overly rely on explicit @ in many places which can make debugging
failures painful.
FWIW, I agree. Although I see no @ here.
if we ever get to that day, we'd use $(AM_V_at) in
this location.
Ok by me. --thanks, karl.
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Sat, 14 Jan 2023 23:45:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 60776 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 14 Jan 2023 15:17, Karl Berry wrote:
> imo we overly rely on explicit @ in many places which can make debugging
> failures painful.
>
> FWIW, I agree. Although I see no @ here.
most of the code directly preceding & following this line use @.
i.e. the vast majority of the current distdir logic.
-mike
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Sun, 15 Jan 2023 00:06:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 60776 <at> debbugs.gnu.org (full text, mbox):
most of the code directly preceding & following this line use @.
i.e. the vast majority of the current distdir logic.
Yeah.
If you feel like changing those @'s to AM_v_at while we're here, sounds
good to me ... -k
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60776
; Package
automake-patches
.
(Sun, 15 Jan 2023 00:25:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 60776 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 14 Jan 2023 17:05, Karl Berry wrote:
> most of the code directly preceding & following this line use @.
> i.e. the vast majority of the current distdir logic.
>
> Yeah.
>
> If you feel like changing those @'s to AM_v_at while we're here, sounds
> good to me ... -k
i'd like to give it a bit more thought as to what the output should look
like in general in a non-verbose build, so i'll do it in a follow up
-mike
[signature.asc (application/pgp-signature, inline)]
bug closed, send any further explanations to
60776 <at> debbugs.gnu.org and Mike Frysinger <vapier <at> gentoo.org>
Request was from
Mike Frysinger <vapier <at> gentoo.org>
to
control <at> debbugs.gnu.org
.
(Sun, 15 Jan 2023 21:51:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 13 Feb 2023 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.