[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: builddir vs. srcdir

From: Stepan Kasal
Subject: Re: builddir vs. srcdir
Date: Thu, 10 Mar 2005 10:25:37 +0100
User-agent: Mutt/1.4.1i


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

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.

        Stepan Kasal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]