>>> "Alex" == Alex Hornby <[EMAIL PROTECTED]> 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