I am using file names to encode parameter vaules of how the are
generated. for example one run the command
cmd param <name.ext1 >name-param.ext2
I chain many such phases to end up with a file named
name-param1-..-paramN.extN
ie each stage is identified by a unique extension and
the final file name contains all the parameter values used along the
way.
I have the whole process written in a monolithic bash script,
but would like to brak it up into a makefile
What is the best way to encode such rule?
Is there a way to have 2 wildcards in a rule?
I could imagine something like
%-&.ext2 : %.ext1
cmd $& < $? > $@
where & acts as a second wildcard character
and $& refers to whatever & matched.
I see nothing like that in the docs and would run into the problem
of people wanting 2,3, ... parametric parts of target
Maybe something like
%.ext2 : $(patsubst ...)
but I am not sure hoa that sould actually be done.
My initial experiment was
%.a : $(subst x,y,%.c)
: $@ : $?
%.c :
: $@
but I get
bash-2.04$ make x.a
: x.c
: x.a : x.c
instead of
bash-2.04$ make x.a
: y.c
: x.a : y.c
[ie the $(subst ..) does not seem to be kicking in]
thanks
Daniel
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make