www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/15/02:37:23

Date: Mon, 15 Apr 1996 08:29:19 +0200 (MET DST)
From: "Christoph P. Kukulies" <kuku AT gilberto DOT physik DOT rwth-aachen DOT de>
Subject: Re: problems with makefiles
In-reply-to: <Pine.SOL.3.91.960415004409.22714A-100000@sauron>
To: rsevilla AT upd DOT edu DOT ph (Rafael R. Sevilla)
Cc: djgpp AT delorie DOT com
Reply-to: Christoph Kukulies <kuku AT gilberto DOT physik DOT rwth-aachen DOT de>
Message-id: <199604150629.IAA28208@gilberto.physik.rwth-aachen.de>
MIME-version: 1.0

> 
> Hi. I've been using Bison for some time to build a small language, and it
> appears to give me lots of problems in conjunction with make. In order to
> make my lang.c file for example, my makefile has the following lines

Why not using make's built in rules for .y.c and
define YACC=bison in the makefile and taking out the extra bison line
in you lang.c rule? 

> 
> lang.c lang_tab.h: lang.y $(HEADERS)
> 	bison -y -d lang.y
> 	update y_tab.c lang.c
> 	update y_tab.h lang_tab.h
> 
> lang.o: lang.c
> 
> 	...
> 
> Trouble is, make does a lot of redundant work: it runs bison twice and
> consequently recompiles lang.c twice too, for some reason that escapes me.
> Make was invented in order to avoid redundant compiles, but it appears to 
> be adding to them here. What's going on? Is there something wrong with my 
> makefile?
> 
> -------------------------------------------------------------------------
> University of the Philippines                           Rafael R. Sevilla
> PABX/OVCA: Diliman Networking Project          rsevilla AT sauron DOT upd DOT edu DOT ph
> -------------------------------------------------------------------------
> 
> 

--Chris Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019