This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: makefile dependency revamp


Hello Alan,

* Alan Modra wrote on Tue, May 26, 2009 at 05:38:37AM CEST:
> The aim of this patch is to consistently generate dependencies despite
> the fact that various versions of gcc differ in -MM output. 

I'm sure I must be missing something blatantly obvious, but:
why is bintuils generating dependencies in trees that use automake
anyway?  Is there anything wrong with automatic dependency tracking?
Why is the only directory in src that uses automatice dependency
tracking (gdb) the one that does not use automake?

Note that it's the 'cygnus' option that turns off dep tracking; see
<http://www.gnu.org/software/automake/manual/html_node/Cygnus.html>
for all the things it changes (but which could mostly be had with other
automake options, too).

Thanks for enlightening me, and please Cc: me on replies,
Ralf

PS: see a couple of bugs below; also, I intend to prepare patches to
update the src/GCC trees to recent Autoconf and Automake, sometime soon.

> --- bfd/dep-in.sed	29 Oct 2005 23:47:42 -0000	1.7
> +++ bfd/dep-in.sed	25 May 2009 13:40:58 -0000

> @@ -21,12 +20,8 @@ s! \$(INCDIR)/ansidecl\.h!!g
>  s! \$(INCDIR)/symcat\.h!!g
>  s! \.\./intl/libintl\.h!!g
>  
> -s/\\\n */ /g
> -
>  s/ *$//
>  s/  */ /g
> -s/ *:/:/g
> -/:$/d
> -
> -s/\(.\{50\}[^ ]*\) /\1 \\\
> -  /g
> +s/^ */A/
> +s/ / \\\nB/g

BTW, \n is only portable in sed script in the BRE part (left hand side
of s command), but not in the replacement part.  There, you should use
a literal newline escaped with a backslash.  Several instances of this.


> --- bfd/Makefile.am	22 May 2009 09:33:14 -0000	1.227
> +++ bfd/Makefile.am	25 May 2009 13:40:59 -0000

> +	  sed -e '1s/.*: //' -f dep.sed < DEPA | LC_ALL=C sort | uniq | \

Not setting LC_ALL to the same value for uniq as for sort as is asking
for trouble.  Several instances of this, too.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]