Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 7/7] gdb, gdbserver: create the dependency directories from the Makefiles
Date: Tue, 01 Sep 2026 10:47:45 -0600	[thread overview]
Message-ID: <87mru07wb2.fsf@tromey.com> (raw)
In-Reply-To: <20260831185300.572297-8-simon.marchi@efficios.com> (Simon Marchi's message of "Mon, 31 Aug 2026 14:51:46 -0400")

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> Note that this changes the command to create directories from "$(SHELL)
Simon> $(srcdir)/../install-sh -d" to "mkdir -p".  If there is a reason to use
Simon> install-sh to create directories in the build directory, I think it
Simon> should be documented, otherwise it just looks strange.

In the old days, 'mkdir -p' wasn't portable.  That's why mkinstalldirs
existed.  Not sure why this code used install-sh.

I don't know if 'mkdir -p' can be used today, though I tend to assume it
can; and anyway it's easy to switch to mkinstalldirs if need be.

Simon> @@ -2413,11 +2408,8 @@ clean mostlyclean: $(CONFIG_CLEAN)
Simon>  	rm -f gdb$(EXEEXT) core make.log
Simon>  	rm -f gdb[0-9]$(EXEEXT)
Simon>  	rm -f xml-builtin.c stamp-xml
Simon> -	rm -f $(DEPDIR)/*
Simon> -	for i in $(CONFIG_SRC_SUBDIR); do \
Simon> -		rm -f $$i/*.o;	\
Simon> -		rm -f $$i/$(DEPDIR)/*; \
Simon> -	done
Simon> +	rm -f $(addsuffix /*,$(ALL_DEPDIRS))
Simon> +	rm -f $(addsuffix /*.o,$(CONFIG_SRC_SUBDIR))
 
Simon>  # This used to depend on c-exp.c m2-exp.c TAGS
Simon>  # I believe this is wrong; the makefile standards for distclean just
Simon> @@ -2431,10 +2423,7 @@ distclean: clean
Simon>  	rm -f config.log config.cache
Simon>  	rm -f config.lt libtool
Simon>  	rm -f Makefile
Simon> -	rm -rf $(DEPDIR)
Simon> -	for i in $(CONFIG_SRC_SUBDIR); do \
Simon> -		if test -d $$i/$(DEPDIR); then rmdir $$i/$(DEPDIR); fi \
Simon> -	done
Simon> +	rm -rf $(ALL_DEPDIRS)

I don't think it should be necessary to update both 'clean' and
'distclean'.  The latter should depend on the former.

The old rule was "if configure made it, distclean removes it; if make
made it, clean removes it".  So I think the distclean change should be
dropped.

I'm unsure if this rule was ever really was discussed outside the
Automake list back in ancient times, I think François Pinard came up
with it.

Tom

  reply	other threads:[~2026-09-01 16:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 18:51 [PATCH 0/7] Some Makefile cleanups Simon Marchi
2026-08-31 18:51 ` [PATCH 1/7] gdb: update README about the GNU make requirement Simon Marchi
2026-09-01 12:26   ` Eli Zaretskii
2026-09-01 13:36     ` Simon Marchi
2026-08-31 18:51 ` [PATCH 2/7] gdb, gdbserver: require gcc-style dependency generation, drop the depcomp fallback Simon Marchi
2026-09-01 16:32   ` Tom Tromey
2026-09-01 20:16     ` Simon Marchi
2026-09-02  7:37       ` Rainer Orth
2026-09-02 12:26         ` Simon Marchi
2026-08-31 18:51 ` [PATCH 3/7] gdbserver: fix missing dependency tracking for gdbreplay.o Simon Marchi
2026-09-01 16:33   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 4/7] gdb, gdbserver: always use order-only prerequisites for generated files Simon Marchi
2026-09-01 16:34   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 5/7] gdb, gdbserver: remove the .NOEXPORT target Simon Marchi
2026-09-01 16:37   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 6/7] gdb: remove the explicit ada-exp.o rule Simon Marchi
2026-09-01 16:38   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 7/7] gdb, gdbserver: create the dependency directories from the Makefiles Simon Marchi
2026-09-01 16:47   ` Tom Tromey [this message]
2026-09-01 20:18     ` Simon Marchi
2026-09-01 20:37       ` Simon Marchi
2026-09-02 18:36         ` Tom Tromey
2026-09-03 13:45           ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mru07wb2.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox