help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awkward


From: Don Monticello
Subject: awkward
Date: Thu, 20 Jun 2002 16:27:39 -0400 (EDT)

Hi,

Right now to get my Makefile to work I have to put in the target twice, for
example:

gmake MACH=killeen killeen

or

gmake MACH=dec_alpha dec_alpha

This is because I would like to use different rules that are dependant on
the input target name, but I can not get a hold of the target name and use
it to create the variable DIRSTORE in the following example of a Makefile: 

     DIRSTORE=F90_$(MACH)


     F90_dec_alpha/%.f90 : %.rat
             gm4 -P aadefs_hert_allocate_check_gm4.macro $< > junk_store
             mv junk_store F90_dec_alpha/$*.f90

     F90_killeen/%.f90 : %.rat
             gm4 -P aadefs_hert_allocate_check_gm4.macro $< > junk_store
             mv junk_store F90_killeen/$*.f90

     # list of .f90 files derived from .rat

     f90 :=\
       $(DIRSTORE)/junk1.f90\
       $(DIRSTORE)/junk2.f90

     # targets.

     dec_alpha: $(f90)

     killeen: $(f90)


Is there a way for me to get around having to put the target in twice?

Thank you,

Don



reply via email to

[Prev in Thread] Current Thread [Next in Thread]