public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Tom Tromey <tromey@redhat.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: Patch: automatic dependencies for gcc
Date: Sun, 09 Mar 2008 14:40:00 -0000	[thread overview]
Message-ID: <20080309143941.GJ6280@ins.uni-bonn.de> (raw)
In-Reply-To: <m3hcfh125o.fsf@fleche.redhat.com>

* Tom Tromey wrote on Sat, Mar 08, 2008 at 07:49:55PM CET:
> 
> I'll re-bootstrap on the compile farm with something like this.

Thanks.  I haven't found obvious issues with it yet.  Well, if someone
inadvertently deletes some .deps files, things won't be rebuilt.  

> >>>>> "Ralf" == Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> Ralf> -COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Po
> Ralf> +COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(dir $*)/$(DEPDIR)/$(notdir $*).Po
> 
> I think I will change this to use $(*D) and $(*F).

Sure.

> Ralf> --include $(patsubst %.o, $(DEPDIR)/%.Po, $(ALL_HOST_OBJS))
> Ralf> +DEPFILES = $(foreach obj, $(ALL_HOST_OBJS), \
> Ralf> +	     $(dir $(obj))$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj))))
> 
> This makes it tempting to change depcomp instead  :)

Fair enough.  Well, the one-time complexity of the above should be
weighed against losing sync with upstream (hmm, not too dynamic ATM ;-).

The reason I see against my proposal that IMVHO carries real weight
would be if you were to require up to date deps files.  I would not know
how to easily reformulate
  %.o $(DEPDIR)/%.d: %.c

rules into the subdir/$(DEPDIR) scheme.  Why aren't you using this BTW?
It would already be a bit safer than what you currently have, even if
you don't go all the way and make $(DEPFILES) a prerequisite of 'all'.

> Ralf>  AC_CONFIG_COMMANDS([gccdepdir],[
> Ralf> -  ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $DEPDIR/build
> Ralf> +  ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR
> Ralf>    for lang in $subdirs
> Ralf>    do
> Ralf> -      ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $DEPDIR/$lang
> Ralf> +      ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
> Ralf>    done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
>  
> In Quagmire I create necessary directories in the Makefile.  I wonder
> whether we should just do that here as well.  I'll take a look.

That would just be sensible.  Automake only creates them at
config.status time because it requires all dep files to be present (as
stubs at least) at make time.  IIRC, the .dirstamp semantics otherwise
used by Automake code are due to some non-GNU make implementations not
liking directories as targets.

Cheers,
Ralf

  reply	other threads:[~2008-03-09 14:40 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07 21:15 Tom Tromey
2008-03-07 23:20 ` Joseph S. Myers
2008-03-07 23:28   ` Tom Tromey
2008-03-08  0:37 ` Ralf Wildenhues
2008-03-08  0:42   ` Tom Tromey
2008-03-08 14:33 ` Ralf Wildenhues
2008-03-08 16:20   ` Tom Tromey
2008-03-08 16:36     ` Ralf Wildenhues
2008-03-08 18:41       ` Ralf Wildenhues
2008-03-08 19:42         ` Tom Tromey
2008-03-09 14:40           ` Ralf Wildenhues [this message]
2008-03-09 15:07             ` Ralf Wildenhues
2008-03-09 16:02             ` Tom Tromey
2008-03-09 16:36               ` Ralf Wildenhues
2008-03-09 16:55                 ` Tom Tromey
2008-03-11  0:01               ` Ben Elliston
2008-03-11  0:11                 ` Tom Tromey
2008-03-18 14:35               ` Paolo Bonzini
2008-03-21 13:43                 ` Tom Tromey
2008-03-21 17:43                   ` Paolo Bonzini
2008-03-24 20:34                     ` Tom Tromey
2008-03-25  8:33                       ` Tom Tromey
2008-03-25  8:42                         ` Paolo Bonzini
2008-03-25 15:43                           ` Tom Tromey
2008-03-25 16:32                             ` Paolo Bonzini
2008-03-25 17:27                               ` Tom Tromey
2008-03-25 17:28                                 ` Tom Tromey
2008-03-25 17:29                                   ` Paolo Bonzini
2008-03-25 17:39                                     ` Tom Tromey
2008-03-25 18:00                                     ` Tom Tromey
2008-03-25 20:41                                 ` Ralf Wildenhues
2008-03-25 20:51                                   ` Tom Tromey
2008-03-25 21:03                                     ` Ralf Wildenhues
2008-03-26  2:08                                       ` Tom Tromey
2008-03-25 22:26                                     ` Andreas Tobler
2008-03-26  3:26                                       ` Tom Tromey
2008-03-26 13:16                                         ` Richard Guenther
2008-03-26 13:17                                           ` Tom Tromey
2008-03-26 13:21                                             ` Richard Guenther
2008-03-26 13:53                                           ` Tom Tromey
2008-03-26 15:05                                             ` Basile STARYNKEVITCH
2008-03-26 15:27                                               ` Tom Tromey
2008-03-26 16:47                                                 ` Basile STARYNKEVITCH
2008-03-27 12:02                                             ` Richard Guenther
2008-03-27 15:45                                               ` Tom Tromey
2008-03-27 16:40                                                 ` Tom Tromey
2008-03-27 17:14                                                 ` Richard Guenther
2008-03-27 17:41                                                   ` Tom Tromey
2008-03-27 18:34                                                     ` Mark Mitchell
2008-03-27 19:39                                                       ` Tom Tromey
2008-03-27 19:45                                                         ` Diego Novillo
2008-03-27 20:07                                                           ` Tom Tromey
2008-03-27 20:16                                                             ` Diego Novillo
2008-03-27 20:31                                                               ` Paolo Bonzini
2008-03-27 20:20                                                             ` David Daney
2008-03-27 21:42                                                               ` Tom Tromey
2008-03-27 22:43                                                                 ` Ralf Wildenhues
2008-03-27 22:47                                                                   ` Tom Tromey
2008-03-27 19:21                                                     ` Paolo Bonzini
2008-03-25 21:00                                   ` Tom Tromey
2008-03-25 21:07                                     ` Ralf Wildenhues
2008-03-25 21:44                                   ` Tom Tromey
2008-03-20 16:54             ` Tom Tromey
2008-03-27 16:41 Dominique Dhumieres

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=20080309143941.GJ6280@ins.uni-bonn.de \
    --to=ralf.wildenhues@gmx.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tromey@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).