tech-toolchain archive

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

Re: bsd.lib.mk question



>>> [...] - working around the fact that make has no syntax for having
>>> one set of commands generate 2 files.

>> file1 file2: sources
>>      commands

> PROG= test
> SRCS= a.c b.c
> 
> a.c b.c:
>       echo 'int foo;' > ${.TARGET}

> If you run that, you will see two calls for echo.

But your commands don't (well, your command doesn't) build two files;
it builds only one.  Naturally make has to run it again for the other.

Try, instead,

a.c b.c:
        echo 'int foo;' > a.c
        echo 'int foo;' > b.c

You'll find - well, I find, at least - that it runs the command set
only once.

                                        Mouse


Home | Main Index | Thread Index | Old Index