How to resolve a makefile override issue when its the same target

41 Views Asked by At
targets: abc xyz

define TAR

display:
        @echo "XXXXXXXXXX"    


$(1) : display xxx-$(1)


xxx-$(1):
         *do target specific action -- $(1) is input to a script*

endef

$(foreach x,$(targets),$(eval $(call TAR,$(x))))

This is the code i have which is causing an issue with the override when i added xyz as one of the targets. Is this approach wrong ?

the command i triggered on command line >> make abc

0

There are 0 best solutions below