I want to have a portion of my makefile similar to this:
   tests/%: tests/%.cpp tests/runner.cpp
   tests/test-x: x.cpp x.h

I have several targets in tests/ which all have similar core
dependencies, hence the pattern rule.
Some of them have additional dependencies, hence the second rule.

The pattern rule is overriding the implicit rule for building a file
from %.cpp source - but I still want to use the implicit rule's
command(s), just with the additional dependencies.
Is this possible, or is there some sort of workaround that can avoid
killing the implicit rule?

TIA,
--rob


Reply via email to