Article View: comp.unix.programmer
Article #3733Re: make (possible FAQ)
From: Ross Smith
Date: Sun, 25 Jan 2004 18:48
Date: Sun, 25 Jan 2004 18:48
25 lines
1809 bytes
1809 bytes
Ian Zimmerman 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.
Use an intermediate target that both targets depend on:
.PHONY: both
both:
command
target1 target2: both
--
Ross Smith ......... r-smith@ihug.co.nz ......... Auckland, New Zealand
"This world is like a burnt steak: small, tough, and the chips
are always stacked against you." -- Mike
Technical Details
Message-ID:
<bv132q$7uv$1@lust.ihug.co.nz>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!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:49:00 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!news.linkpendium.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Ross Smith <r-smith@ihug.co.nz> Newsgroups: comp.unix.programmer,gnu.utils.help Subject: Re: make (possible FAQ) Followup-To: comp.unix.programmer Date: Mon, 26 Jan 2004 07:48:45 +1300 Organization: Ihug Limited Lines: 25 Message-ID: <bv132q$7uv$1@lust.ihug.co.nz> References: <8765f1qkfi.fsf@newsguy.com> NNTP-Posting-Host: p4-apx1.akl.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: lust.ihug.co.nz 1075056539 8159 203.173.192.4 (25 Jan 2004 18:48:59 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Sun, 25 Jan 2004 18:48:59 +0000 (UTC) User-Agent: KNode/0.7.2