automake
[Top][All Lists]
Advanced

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

Can a pattern rule enhance an implicit rule without overriding?


From: Rob Desbois
Subject: Can a pattern rule enhance an implicit rule without overriding?
Date: Tue, 12 Feb 2008 11:44:57 +0000

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

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