Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Make: Determining if a rule exists

2 views
Skip to first unread message

Stephen Rasku

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Is there a way to determine if a rule exists in GNU make?

I would like to have a default rule defined but only if the rule hasn't
already previously been defined. Is this possible in GNU make?

--
Stephen Rasku E-mail: ste...@tgivan.com
Senior Software Engineer Phone: (604) 872-6676
TGI Technologies Web: http://www.tgivan.com/


Sent via Deja.com http://www.deja.com/
Before you buy.

Paul D. Smith

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
%% Stephen Rasku <ste...@tgivan.com> writes:

sr> Is there a way to determine if a rule exists in GNU make?
sr> I would like to have a default rule defined but only if the rule hasn't
sr> already previously been defined. Is this possible in GNU make?

No, I can't think of any way.

However, it's not even clear what "a rule exists" means; for example, a
target can be defined with prerequisites, but there's no way to know if
any rule can be found to create the target until make is well into its
processing, since an implicit rule could exist that would create the
target.

Maybe you can describe more generally what you're trying to do, and we
can give you some suggestions.

--
-------------------------------------------------------------------------------
Paul D. Smith <psm...@baynetworks.com> Network Management Development
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.

0 new messages