On Wed, Jul 18, 2012 at 11:30 PM, Tom de Vries <tom_devr...@mentor.com> wrote: >>> +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) \ >>> + $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) \ >>> + $(TREE_INLINE_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ >>> + $(GIMPLE_H) $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) >>> output.h \ >>> + $(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) >> >> I think this list needs updating. >> > > I went over the list just now and all the elements appear in other makerules > as > well, so I don't see any obvious ones that should be removed. I think the > PARAMS_H is not necessary. Do you have concerns about anything else?
Why would the other make rules matter? You're adding new make rules for your new file. Make it depend only on what your new file needs. Makefile.in is a mess. One of these days, someone (hi, Tromey) will hopefully get annoyed enough with this again to finish some tool to auto-generate the dependences list. Until that time, let's try to avoid proliferating the messy rules from old files to new ones. > +#include "config.h" > +#include "system.h" > +#include "coretypes.h" > +#include "tm.h" Dearohdearohdear. You're going to look at target macros in this pass? Surely not. So, let's drop this header, > + > +#include "params.h" -ENONEEDFORTHIS > +#include "flags.h" You get flags.h for free from tree.h, but... > +#include "tree.h" > +#include "basic-block.h" > +#include "tree-ssa-operands.h" You get these if you be a nice GIMPLE pass and include gimple.h instead of these three headers. > +#include "tree-flow.h" > +#include "tree-flow-inline.h" You don't need tree-flow-inline.h. tree-flow.h includes it already for you. > +#include "diagnostic.h" I don't think you're emitting diagnostics. Except maybe: "warning: trying to out-smart developer if I do this without profile info" :-) > +#include "tree-pass.h" > +#include "tree-dump.h" You don't need tree-dump.h > +#include "timevar.h" You don't need timevar.h, either. > +#include "tree-pretty-print.h" You want gimple-pretty-print.h in a GIMPLE pass. So you're left with: +#include "config.h" +#include "system.h" +#include "coretypes.h" + +#include "gimple.h" +#include "gimple-pretty-print.h" +#include "tree-flow.h" +#include "tree-pass.h" and +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(TREE_PASS_H) Looks a lot nicer to me. Please do feel free to join my headless header-hunt and help clean up all those other files that have needlessly complex #includes and correspondingly silly Makefile.in rules! Ciao! Steven