clawpack / clawutil

General utility programs
BSD 3-Clause "New" or "Revised" License
10 stars 31 forks source link

WIP: Refactor Check Source Module #97

Closed mandli closed 7 years ago

mandli commented 8 years ago

This PR modifies checkSource to utilize built-in modules and simplify the code.

rjleveque commented 7 years ago

@mandli: This seems to work if I merge by hand (deleting the old checkSources.py).

Ok to merge?

mandli commented 7 years ago

Yeah, I think it should be ok although I have not exactly tested this extensively.

rjleveque commented 7 years ago

Ok, I'll test some more as I work through other updates...

rjleveque commented 7 years ago

This doesn't work for me. If I have both qinit.f and qinit.f90 in a directory then the .f90 file gets used in compilation but the src_list at line 32 of this latest check_src only contains the .f file and doesn't report a conflict.

But I don't think we should spend time on this now, it's not urgent.

mandli commented 7 years ago

As implemented it only checks if you do make debug. If that does not work then something is wrong.

rjleveque commented 7 years ago

I was testing make debug and not see what I expected, but I just tested again now and it seems to work.

I notice it prints out the message

Possible source conflicts - Please see the documentation at
   www.clawpack.org/makefiles.html
for additional information and solutions.

even if there aren't any source conflicts. Maybe we should change Makefile.common as follows?

    @echo 'Possible source conflicts:'
    @echo $(SOURCE_CONFLICTS)
    @echo $(MODULES_CONFLICTS)
    @echo 'If conflicts are listed, see the documentation at'  
    @echo '    www.clawpack.org/makefiles.html'
    @echo 'for additional information and solutions.'
mandli commented 7 years ago

That would probably be a better idea. I also wrote a blurb for the docs for some explanation and suggested fixes (clawpack/docs#137).