A common trick with regular Makefiles, which you should be to able to adopt, is to:<br><br>generated.c: blah blah FORCE<br>        ./generate_it > $@.tmp<br>        if cmp generated.c generated.c.tmp; then<br>           mv $@.tmp $@<br>
        else<br>           rm -f $@.tmp<br><br>It's not really pretty, but I think a bit less hacky than mucking with mtime, and it's definitely safe. (I may have the cmp logic reversed, but you get the idea. Instead of .tmp, you could do a separate dir)<br>
<br>--Kai<br><br><br><div class="gmail_quote">On Mon, Oct 4, 2010 at 6:21 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Mon, Oct 4, 2010 at 23:26, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br>
</div><div class="im">> Hmm - if there is a file 'xxx.c' - then bfort generates ftn-auto/xxxf.c<br>
<br>
</div>It looks like generation of include/finclude/ftn-auto/*.h90 is much<br>
less direct.  The dependencies below also produce unused *.h90 files.<br>
What is bfort using to produce these f90module.f90 files?  Do you<br>
think it's feasible to get a list of files that each *.h90 depends on?<br>
 If not, I guess I'll just live with the few seconds to recompile<br>
these and relink even though nothing changed.<br>
<br>
Jed<br>
<br>
src/sys/plog/f90module.f90 -> include/finclude/ftn-auto/petscprofiling.h90<br>
src/sys/verbose/f90module.f90 -> include/finclude/ftn-auto/petscprofiling.h90<br>
src/mat/order/f90module.f90 -> include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/matfd/f90module.f90 -> include/finclude/ftn-auto/petscmatfd.h90<br>
src/mat/partition/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/partition/impls/party/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/partition/impls/chaco/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/partition/impls/jostle/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/partition/impls/pmetis/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/mat/partition/impls/scotch/f90module.f90 -><br>
include/finclude/ftn-auto/petscmatorderings.h90<br>
src/characteristic/interface/f90module.f90 -><br>
include/finclude/ftn-auto/petscsemilagrange.h90<br>
</blockquote></div><br><br clear="all"><br>-- <br>Kai Germaschewski<br>Assistant Professor, Dept of Physics / Space Science Center<br>University of New Hampshire, Durham, NH 03824<br>office: Morse Hall 245E<br>phone:  +1-603-862-2912<br>
fax: +1-603-862-2771<br><br>