Article View: comp.unix.programmer
Article #3766Re: Makefile : .c.o and %.o: %.c
From: * Tong *
Date: Mon, 28 May 2001 17:51
Date: Mon, 28 May 2001 17:51
36 lines
2222 bytes
2222 bytes
"Paul D. Smith" <psmith@gnu.org> writes:
> [...]
>
> 3) The pattern form is much more flexible, which doesn't matter in this
> case as you've stated it but matters very much in other
> situations... like if you wanted the .o to go into a different
> directory for example.
Good point, I had always been wondering how this is being done, but
never succeeded doing so. Therefore my java makefile is really dumb,
like this:
${CLASSFDIR}/AdvReader.class: AdvReader.java
javac -d ${CLASSFDIR} AdvReader.java
${CLASSFDIR}/DbHandler.class: DbHandler.java
javac -d ${CLASSFDIR} DbHandler.java
${CLASSFDIR}/Token.class: Token.java
javac -d ${CLASSFDIR} Token.java
...
Can you show me how to do it with the pattern rule? thanks!
PS. I tried
${CLASSFDIR}/%.class: %.java
and it didn't seem to work. Can't remember why tho.
--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
http://members.xoom.com/suntong001/
- All free contribution & collection
Technical Details
Message-ID:
<sa8vgmls6pf.fsf@sun_tong_001.personal.yahoo.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!acadiau.ca!acadiau.ca!not-for-mailReferences:
<3B03B870.2168B36C@bigfoot.com> <p5lmnwukdf.fsf@lemming.engeast.baynetworks.com> <p5bsosui8e.fsf@lemming.engeast.baynetworks.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109f73,4f4561c76a5fff83 X-Google-Attributes: gid109f73,public X-Google-Thread: fc89c,4f4561c76a5fff83 X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 2001-05-28 10:51:21 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!acadiau.ca!acadiau.ca!not-for-mail From: * Tong * <sun_tong_001@yahoo.com> Newsgroups: comp.unix.programmer,gnu.utils.help Subject: Re: Makefile : .c.o and %.o: %.c Date: 28 May 2001 14:51:08 -0300 Organization: personal.yahoo.com Lines: 36 Message-ID: <sa8vgmls6pf.fsf@sun_tong_001.personal.yahoo.com> References: <3B03B870.2168B36C@bigfoot.com> <p5lmnwukdf.fsf@lemming.engeast.baynetworks.com> <p5bsosui8e.fsf@lemming.engeast.baynetworks.com> NNTP-Posting-Host: sunny.acadiau.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: poseidon.acadiau.ca 991072280 46659 131.162.161.46 (28 May 2001 17:51:20 GMT) X-Complaints-To: marc.fournier@acadiau.ca NNTP-Posting-Date: Mon, 28 May 2001 17:51:20 +0000 (UTC) User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7