I need to generate a Makefile to compile fortran code. I
generate a
Makefile.Depend which contains lines like
a.o: header.h file.mod
Certain compilers generate a "file.mod" while
others generate
"FILE.mod". When a.o depends on
"file.mod" and the compiler generates
"FILE.mod", gmake recompiles my whole project.
My proposed method for
handling this is to have Makefile.Depend contain lines like
a.o: header.h $(case file).mod
Also, I will have a Make variable "MODCASEUPPER"
set to 1 if I need
upper case and 0 if lower case. At this point I need to
define
$(case x)
which looks at MODCASEUPPER and if set to 1, return
uppercase version
of x, and returns lowercase version of x otherwise.
* Is there a gmake builtin function for case changes?
* How do I test for the existence of a Make variable, i.e.
if
MODCASEUPPER is not defined, I need it to make $(case x)
default to
lower case.
Other approach I considered:
* after every compilation create a "file.mod"
which symlinks to
"FILE.mod" (if FILE.mod exists and file.mod does
not) -- easily creates
too many files in the directory (which already has about 500
files)
- Murali
_______________________________________________
help-gnu-utils mailing list
help-gnu-utils gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils
|