[Tfug] Changing default suffix rules for "make"

Brian Murphy tfug@tfug.org
Thu Jul 11 19:41:01 2002


On Thu, Jul 11, 2002 at 05:31:15PM -0700, Curtis Cooper wrote:
> I've recently installed a Fortran 90/95 compiler on my work Linux 
> system.  I'm interested in creating a default suffix rule for it, such 
> as exists for C programs.  For example, if you have a C program 
> called myprog.c, and type "make myprog" while in the directory 
> containing myprog.c, make will automatically know to invoke the C 
> compiler and proceed to compile and link the program.  What I would 
> now like to do is to be able to compile myprog.f90 by using 'make 
> myprog' in an analagous way.  
> 
> I tried editing the file /usr/share/mk/sys.mk to add the new suffix 
> rules for the .f90 extension, but it didn't seem to change make's 
> behavior.  I'm running GNU Make on Redhat Linux 7.2.  Any advice 
> would be appreciated.

In addition to adding the suffix rules, did you remember to append
.f90 to the .SUFFIXES stanza?

Perhaps posting what you did would make it easier to see the problem.
The file isn't too big.

Brian