Noel David Torres Taño writes: > Gracias, Alberto, but I'm not talking about writing the dependences, but > avoiding unnecesary work. My Makefile depends on source code files, 'cos the > dependences are auto-extracted, thus I want to avoid as much $(MAKE) calls as > possible. > > What I'm doing just now to avoid those cascades is: > > %.mod : %.F95 > @echo $(MAKE) $*.o > @(export temp=`mktemp` ;\ > touch -r $*.F95 $$temp ;\ > touch $*.F95 ;\ > $(MAKE) $*.o ;\ > touch -r $$temp $*.F95 ;\ > rm $$temp) > > What do you think about that?
I really don't understand what is the purpose of that code, because every time the .F95 is updated, the .mod file is also touched, even when its contents are the same -- when no recompilation of the objects depending on that module is needed. Therefore you should get an unnecessary recompilation of all the objects depending on that module. IMHO, the real solution would be to address the relationship between a .F95 file and the modules it depends on, avoiding the recompilation if the interface has not been changed. This is what the paper addresses through several methods. Un saludo, -- Alberto _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
