0

I want to replace a string like this OntVeip -> ManagedObjects/OntVeip/OntVeipConfigDef.xml so logically to me this is like :

% -> ManagedObjects/%/%ConfigDef.xml

If I try to do this with pathsubst, the % is only replaced once ie

ManagedObjects := OntVeip OntMoca
XMLSOURCES := $(patsubst %,ManagedObjects/%/%ConfigDef.xml,$(ManagedObjects))

does not work as I was hoping for.

How can I achieve the result I am after ?

Philip Stuyck
  • 7,344
  • 3
  • 28
  • 39

1 Answers1

1

Liberally stolen adapted from here

XMLSOURCES := $(foreach obj,$(ManagedObjects),ManagedObjects/$(obj)/$(obj)ConfigDef.xml)
Community
  • 1
  • 1
user657267
  • 20,568
  • 5
  • 58
  • 77