help-make
[Top][All Lists]
Advanced

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

Re: problem with yacc implicit rule


From: Paul D. Smith
Subject: Re: problem with yacc implicit rule
Date: Mon, 26 Nov 2001 10:19:27 -0500

%% Crni Gorac <address@hidden> writes:

  cg> Am working on library foo that is using yacc for parsing; got
  cg> foo.y file in project, however I have also unrelated foo.c file in
  cg> project. So I have rules in my makefile to create y.tab.c file
  cg> from foo.y, as well as library from y.tab.c and foo.c files.
  cg> However, henever foo.y is newer from foo.c, make is trying to
  cg> regenerate foo.c from foo.y. Now, I understand that this is
  cg> because of implicit make rule for .y files, but I'm wondering what
  cg> is proper way to avoid this behavior.

Remove the default implicit rule.

See the GNU make manual, section "Canceling Implicit Rules".

You can see a complete catalog of default rules by running this command
(on UNIX, anyway):

  $ make -pf/dev/null

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

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