Hi, On Wed, Mar 09, 2005 at 11:21:35PM +0200, Paul Pogonyshev wrote: > > And I'd like to suggest that you use SUFFIXES to handle the .list > > source. Please look at the following example: > > Well, my generator is even more non-standard, since I need to pass an > additional command-line parameter sometimes. So, `SUFFIXES' are not an > option, although I agree it would have been nicer to use them.
well, in the example I cited, I had several .list sources, but only one in each directory. Thus I was able to have different rules in different directories. This is not usable for you, but you can make the .list.h rule general: $(PARSE) `case "$*" in *this.list) echo "this options";; \ *that.list) echo "that opt";; *) echo "default opt";;esac` $< ($* is substituted by make) Or you can place the options at the first line of the .list source and grep for them. And if your generator creates *.c file after *.h file, you should define the dependency: foo.c: foo.h and vice versa if the generator creates .h after .c. That will make make happy and you won't observe repeated re-generation of the .c file. HTH, Stepan Kasal