>>>>> "Basile" == Basile Starynkevitch <bas...@starynkevitch.net> writes:
Basile> I want to merge the current trunk into the MELT branch, and I Basile> have some trouble understanding how one should add new files Basile> into GCC (i.e. into a branch) Nothing much has changed there. You just don't need to list any discoverable dependencies. Basile> MELT_H= $(srcdir)/melt/generated/meltrunsup.h \ Basile> $(srcdir)/melt-runtime.h \ Basile> melt-predef.h You can drop this. Basile> melt-runtime.args: $(MELT_RUNTIME_C) melt-run-md5.h melt-runtime-params-inc.c $(C_COMMON_H) \ Basile> $(CONFIG_H) $(SYSTEM_H) $(TIMEVAR_H) $(TM_H) $(TREE_H) \ Basile> $(GGC_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(CFGLOOP_H) \ Basile> tree-pass.h $(MELT_H) \ Basile> $(srcdir)/melt/generated/meltrunsup.h \ Basile> $(srcdir)/melt/generated/meltrunsup-inc.cc \ Basile> gt-melt-runtime.h $(PLUGIN_H) $(TOPLEV_H) $(VERSION_H) \ Basile> Makefile I don't understand why this .args file has all these dependencies. Surely they are dependencies for melt-runtime.o, not for this file. That is, if tree-pass.h changes, there is no need for melt-runtime.args to change. I think you can drop most of these dependencies, which is good because probably (I didn't look) some of those *_H variables have been deleted. Basile> melt-runtime.o: $(MELT_RUNTIME_C) melt-run-md5.h melt-runtime-params-inc.c $(C_COMMON_H) \ Basile> $(CONFIG_H) $(SYSTEM_H) $(TIMEVAR_H) $(TM_H) $(TREE_H) \ Basile> $(GGC_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(CFGLOOP_H) \ Basile> tree-pass.h $(MELT_H) \ Basile> $(srcdir)/melt/generated/meltrunsup.h \ Basile> $(srcdir)/melt/generated/meltrunsup-inc.cc \ Basile> gt-melt-runtime.h $(PLUGIN_H) $(TOPLEV_H) $(VERSION_H) \ Basile> | melt-runtime.args Basile> ls -l melt-runtime.args Basile> $(COMPILER) -c $(shell cat melt-runtime.args) $(OUTPUT_OPTION) I think this can be reduced to: melt-runtime.o: $(MELT_RUNTIME_C) melt-runtime-params-inc.c | melt-runtime.args CFLAGS-melt-runtime.o = $(shell cat melt-runtime.args) Maybe you need more explicit dependencies in there, it depends on which files are generated. You have to make sure your new .o is in ALL_HOST_OBJS. That is how the dependencies are found by make; see the final paragraph in gcc/Makefile.in. Basile> Do you have any insights, in particular hints generic enough to Basile> be valuable for other branches? Not really. The change really just affects dependencies that can be discovered by the C or C++ compiler. It doesn't affect most other things. Basile> Perhaps adding a comment in the trunk's Makefile.in might be Basile> helpful too.... I am happy to add comments, but I'm probably the wrong person to come up with which specific ones are useful. That is, I already added all the comments I thought were necessary. Tom