This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: PATCH: More Makefile cleanups


On Fri, 2003-08-29 at 19:57, DJ Delorie wrote:
> 
> > + $(genprogs:%=%$(buildextext)): \
> 
> I believe this is the type of textual obfuscation that we were worried
> about ;-)

I'm slightly confused by your and Nathanael's comments on this patch.

Why is this considered bad?

That idea allowed me to avoid writing the same list of gen* in two
separate places.  

Do you mean that you didn't like having this on the target side of the
rule?  

(Nathanael's revision broke the manipulation out into a separate
variable, which I don't see as clearly better, but I'm perfectly content
with either form.)

I do understand Nathanael's desire for comments, although I will note
that this code was totally uncommented before -- and a couple of the
proposed comments are incorrect.  (These are not *all* of the programs
that run on the build system, so this comment:

  # Dependencies shared by all the programs built to run on the 
  # build system

is false.  There are a couple that have different dependencies;
especially those that depend on BUILD_EARLY_SUPPORT.)

I don't understand why Nathanael suggested separating the dependencies
for these programs like so:

  $(genprogs): $(BUILD_RTL) $(BUILD_SUPPORT) $(BUILD_PRINT) \
               $(BUILD_ERRORS)  $(BUILD_LIBDEPS)

out of the static pattern rule.  

Why is it better to have multiple sets of dependencies?  By including
them in the static pattern rule, there are fewer places to look to see
what the dependencies are.

> It also contains an important typo.

Nathanael, what typo?  I couldn't see it looking at your proposed fix,
so I imagine I'm going blind.

I'm perfectly happy with Nathanael's version; I just want to understand
what the criteria being used are.  Both Nathanael's version and mind
remove immense amounts of duplicated code, which is *my* primary
criteria.
 
(I'd rather not be trying to iterate a lot on these patches; this is
purely volunteerism on my part, and my time for such projects is very
scarce; if I have to do iterations, I may just skip it.)

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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