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

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to