Closed rjleveque closed 7 years ago
I am worried this would cause havoc with all sorts of default rules that expect object files to always have the .o
suffix. What if we wrote a Makefile rule that checked to see if there were two sources with .f
and .f90
with the same base name and raised a warning?
Is there a way to do that? That would be the best solution.
— Marsha
On Dec 21, 2016, at 9:45 AM, Kyle Mandli notifications@github.com wrote:
I am worried this would cause havoc with all sorts of default rules that expect object files to always have the .o suffix. What if we wrote a Makefile rule that checked to see if there were two sources with .f and .f90 with the same base name and raised a warning?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Maybe we could add this check to the src/check_src.py
in #97?
Doing it in Python would be significantly easier for sure. I can play with it and see if I can get something working.
I just added some code to #97 that will check to see if there are source with the same base name but different extensions. I am not exactly sure where to put this so right now I implemented it as a debug check with a pointer to new documentation. Does this seems like a good compromise or should we try to do something every compilation?
This PR was determined to be a bad idea, so I'm closing it. See the alternative implemented in #97 and raise an issue if there is still something needed in this direction.
The way
Makefile.common
works now, if you have two files sayqinit.f
andqinit.f90
in your directory andqinit.f
is listed in theMakefile
, the fileqinit.f90
will be used instead (because the rule on line 127 that createsqinit.o
fromqinit.f90
is invoked first and then the rule on line 128 that would useqinit.f
is not invoked since the.o
is now up to date). Since we have a hodge podge of .f and .f90 files, users might possibly end up with two versions in the same directory (I have at times).Here is one proposed way to address this, by making
.o90
files from.f90
files that are distinct from.o
files, made only from.f
files.This is non-standard and perhaps too bizarre, so discussion of this is welcome. Or maybe someone knows a better way to address this?