Thank you very much, Satish. Thank you very much, Brock Palen. I am clear about it now.
Jarunan Quoting Satish Balay <balay at mcs.anl.gov>: > The reason we delete the .o files and force a recompile each time for > examples is: not all dependencies are captured in our makefiles. For > eg: when switching PETSC_ARCH, or [as developers] - if PETSc sources > are changed for the same PETSC_ARCH. [examples don't have dependencies > that would force a recompile] > > So its easier for us just to do recompile of examples each time - than > keeping track of the above changes [which happen constantly for us > developers] > > As users the above issue might not matter [as most use a single > PETSC_ARCH, and the PETSC install hardly changes]. So - you can save > this time by not deleting .o files - and doing 'make clean' - when > you really need to reset. > > Satish > > > On Fri, 9 Oct 2009, Brock Palen wrote: > >> >> >> >> On Oct 9, 2009, at 7:05 AM, jarunan at ascomp.ch wrote: >> >> > Hello >> > >> > After the compilation, is it compulsory to delete .o file? >> > Actually, once I found that .o file do not update unless I delete >> it before >> > recompiling. I might misunderstand. if not, I would like to know >> some reason >> > behind. >> >> Make only recompiles files where the source file is newer than the resulting >> file (the .o file). Thus if you have not modified the source file for a .o >> file, it will not be recompiled and will be relinked as is. If you wish to >> force everything to recompile (maybe new compiler options etc) >> then you need >> to delete all your old .o .a .so and .mod files. So they are recreated with >> the new options. >> >> This is a feature of make, that is really helpful, it keeps you >> from having to >> wait to recompile code that has already been compiled once, if it will not >> change. >> >> Brock Palen >> www.umich.edu/~brockp >> Center for Advanced Computing >> brockp at umich.edu >> (734)936-1985 >> >> > >> > >> > Thank you >> > Jarunan >> > >> > >> > -- >> > Jarunan Panyasantisuk >> > Development Engineer >> > ASCOMP GmbH, Technoparkstr. 1 >> > CH-8005 Zurich, Switzerland >> > Phone : +41 44 445 4072 >> > Fax : +41 44 445 4075 >> > E-mail: jarunan at ascomp.ch >> > www.ascomp.ch >> > >> > >> > >> > > -- Jarunan Panyasantisuk Development Engineer ASCOMP GmbH, Technoparkstr. 1 CH-8005 Zurich, Switzerland Phone : +41 44 445 4072 Fax : +41 44 445 4075 E-mail: jarunan at ascomp.ch www.ascomp.ch
