[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Antwort: Re: Feature request: meta files & wildcards (once again)
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Antwort: Re: Feature request: meta files & wildcards (once again) |
Date: |
Tue, 07 May 2002 18:46:43 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
>>> "Alex" == Alex Hornby <address@hidden> writes:
[...]
Alex> Certainly would. The problem I had with suffix rules, was that one
Alex> invocation of the idl compiler on one .idl file expands into many .h and
Alex> .cpp files, therefore I needed a suffix rule for each product. So far so
Alex> good, but when I do a parallel build the rules then race each other and
Alex> overwrite each others products (as the compiler always writes all
Alex> files), which can be bad if the compiler is reading one of those files
Alex> at the time..
This issue isn't really related to suffix rules, is it? It's
just that Make doesn't well support rules that output many
files.
Alex> My solution is to wrap a locking script around the suffix rules so that
Alex> any one .idl file only has the idl compiler run on it once.
Do you mean something like this?
| SUFFIXES = _stub.c _skel.c _stub.h _skel.h .idl
|
| .idl_stub.c:
| $(locker) $(idl) $<
|
| .idl_stub.h:
| $(locker) $(idl) $<
|
| .idl_skel.c:
| $(locker) $(idl) $<
|
| .idl_skel.h:
| $(locker) $(idl) $<
Can't this be rewritten as follows?
| .SUFFIXES: _stub.c _skel.c _stub.h _skel.h .idl
|
| .idl_stub.c:
| $(idl) $<
|
| _stub.c_stub.h:
| @:
|
| _stub.c_skel.c:
| @:
|
| _stub.c_skel.h:
| @:
--
Alexandre Duret-Lutz