Article View: comp.unix.programmer
Article #3732Re: make (possible FAQ)
From: mike burrell
Date: Sun, 25 Jan 2004 18:47
Date: Sun, 25 Jan 2004 18:47
26 lines
2248 bytes
2248 bytes
In gnu.utils.help Ian Zimmerman <bayard@newsguy.com> wrote: > So, how does one handle, in plain make, the situation where multiple > outputs depend on the same input, and the same command updates both > outputs? > > The GNU make manual says if both outputs are listed as targets of the > same rule, the command will be run twice, once for each target --- which > isn't what I want. I remember the real situation was more complex with GNU > make, it tried to optimize this, but it was undocumented and impossible > to figure out. I would just make one output file depend on the other. e.g., I recall doing something like this once or twice: y.tab.h: y.tab.c y.tab.c: foo.y yacc -d foo.y Where yacc creates two output files for one input file. It's perhaps not the cleanest way of doing things.... -- /"\ m i k e b u r r e l l \ / ASCII RIBBON CAMPAIGN mikpos@shaw.ca X AGAINST HTML MAIL, / \ AND NEWS TOO, dammit
Technical Details
Message-ID:
<ibUQb.266390$X%5.257113@pd7tw2no>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!pd7tw2no.POSTED!53ab2750!not-for-mailReferences:
<8765f1qkfi.fsf@newsguy.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109f73,8351a0d0234ee903
X-Google-Attributes: gid109f73,public
X-Google-Thread: fc89c,8351a0d0234ee903
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2004-01-25 10:47:42 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!pd7tw2no.POSTED!53ab2750!not-for-mail
X-Trace-PostClient-IP: 68.144.209.254
Sender: mike burrell <mikpos@pillo.mikpos.dyndns.org>
From: mike burrell <mikpos@shaw.ca>
Subject: Re: make (possible FAQ)
Newsgroups: comp.unix.programmer,gnu.utils.help
Followup-To: gnu.utils.help
References: <8765f1qkfi.fsf@newsguy.com>
User-Agent: tin/1.6.0-20030714 ("Vatersay") (UNIX) (Linux/2.6.0 (i686))
Lines: 26
Message-ID: <ibUQb.266390$X%5.257113@pd7tw2no>
Date: Sun, 25 Jan 2004 18:47:42 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse@shaw.ca
X-Trace: pd7tw2no 1075056462 24.71.223.147 (Sun, 25 Jan 2004 11:47:42 MST)
NNTP-Posting-Date: Sun, 25 Jan 2004 11:47:42 MST
Organization: Shaw Residential Internet