On Fri, Mar 01, 2002 at 10:58:17PM -0800, Ossama Othman wrote: > Is there any way to achieve the following portably? > > source = test.foo # assume it exists > source_suffixes = bar baz > targets = \ > $(shell base=`echo $(source) | sed -e 's/\..*$$//'`; t= ; for p in >$(source_suffixes); do t="$$t $$base$$p"; done; echo $$t) > > $(targets): $(source) > $(SOME_COMMAND) $? > > The is to generate the following on-the-fly: > > testbar testbaz: test.foo > $(SOME_COMMAND) $?
To be clear, I mean generate on-the-fly at make-time. -Ossama -- Ossama Othman <[EMAIL PROTECTED]> Distributed Object Computing Laboratory, Univ. of California at Irvine 1024D/F7A394A8 - 84ED AA0B 1203 99E4 1068 70E6 5EB7 5E71 F7A3 94A8