![]() |
Makefile timestamp check to make file rebuild
Ive searched google for this answer as well as the gnu makefile
documentation page and I cant seem to find what Im looking for. Im using gmake on solaris to build a project. I know that this would work for a single file: file.o: file.cpp CC -c file.cpp -o file.o But what I want to do is more general, since I have a list of OBJECTS I want OBJECTS to somehow check all their associated .cpp files and rebuild if one of them has been changed without having to list each file seperately as above. something like: $(OBJECTS): ($SOURCES) CC -c $*.cpp -o $@ How do I make this work? |
Re: Makefile timestamp check to make file rebuild
In article <0a833e6d-0951-4b48-9a17-59e1ea196d85@h11g2000prf.googlegroups.com>,
Jeff <jeep@rahul.net> wrote: >Ive searched google for this answer as well as the gnu makefile >documentation page and I cant seem to find what Im looking for. >Im using gmake on solaris to build a project. The details of gmake are not relevant to the C language. Please ask in a newsgroup that deals with your development environment. >But what I want to do is more general, since I have a list of OBJECTS >I want OBJECTS to somehow check all their associated .cpp files >and rebuild if one of them has been changed without having to >list each file seperately as above. >something like: >$(OBJECTS): ($SOURCES) > CC -c $*.cpp -o $@ >How do I make this work? [OT] Read the gmake documentation about "Inference rules". -- "To all, to each! a fair good-night, And pleasing dreams, and slumbers light" -- Sir Walter Scott |
Re: Makefile timestamp check to make file rebuild
"Jeff" <jeep@rahul.net> wrote: > (a question about gnu make) This is off-topic in this group as it has nothing to do with C. For help with gnu utils (such as make), ask in the following newsgroup: gnu.utils.help -- Cheers, Robbie Hatley lonewolf aatt well dott com www dott well dott com slant user slant lonewolf slant |
Re: Makefile timestamp check to make file rebuild
"Robbie Hatley" <lonewolf@well.com> writes:
> "Jeff" <jeep@rahul.net> wrote: > >> (a question about gnu make) > > This is off-topic in this group as it has nothing to do with C. > > For help with gnu utils (such as make), ask in the following > newsgroup: > > gnu.utils.help Aha. I thought so. One can always tell. |
Re: Makefile timestamp check to make file rebuild
In article <fqpbc4$7mv$1@canopus.cc.umanitoba.ca>,
Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> wrote: >In article <0a833e6d-0951-4b48-9a17-59e1ea196d85@h11g2000prf.googlegroups.com>, >Jeff <jeep@rahul.net> wrote: >>Ive searched google for this answer as well as the gnu makefile >>documentation page and I cant seem to find what Im looking for. > >>Im using gmake on solaris to build a project. > >The details of gmake are not relevant to the C language. Please >ask in a newsgroup that deals with your development environment. IOW, nobody here gives a **** about you or your problems. You may find some or all of the following links helpful in understanding why this is so: http://en.wikipedia.org/wiki/Aspergers http://en.wikipedia.org/wiki/Clique http://en.wikipedia.org/wiki/C_programming_language |
Re: Makefile timestamp check to make file rebuild
gazelle@xmission.xmission.com (Kenny McCormack) writes:
> In article <fqpbc4$7mv$1@canopus.cc.umanitoba.ca>, > Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> wrote: >>In article <0a833e6d-0951-4b48-9a17-59e1ea196d85@h11g2000prf.googlegroups.com>, >>Jeff <jeep@rahul.net> wrote: >>The details of gmake are not relevant to the C language. Please >>ask in a newsgroup that deals with your development environment. > > IOW, nobody here gives a **** about you or your problems. Said in response to a message which, unlike yours, actually gave the poster advice on where to find the answer. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ |
Re: Makefile timestamp check to make file rebuild
In article <87abla4do7.fsf@micah.cowan.name>,
Micah Cowan <micah@cowan.name> wrote: >gazelle@xmission.xmission.com (Kenny McCormack) writes: > >> In article <fqpbc4$7mv$1@canopus.cc.umanitoba.ca>, >> Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> wrote: >>>In article ><0a833e6d-0951-4b48-9a17-59e1ea196d85@h11g2000prf.googlegroups.com>, >>>Jeff <jeep@rahul.net> wrote: >>>The details of gmake are not relevant to the C language. Please >>>ask in a newsgroup that deals with your development environment. >> >> IOW, nobody here gives a **** about you or your problems. > >Said in response to a message which, unlike yours, actually gave the >poster advice on where to find the answer. It did? Show me where. (Unless you've clipped something relevant, the above looks like "Not here - try someplace else") |
Re: Makefile timestamp check to make file rebuild
Kenny McCormack wrote:
> In article <87abla4do7.fsf@micah.cowan.name>, > Micah Cowan <micah@cowan.name> wrote: >>gazelle@xmission.xmission.com (Kenny McCormack) writes: >> >>> In article <fqpbc4$7mv$1@canopus.cc.umanitoba.ca>, >>> Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> wrote: >>>>In article >><0a833e6d-0951-4b48-9a17-59e1ea196d85@h11g2000prf.googlegroups.com>, >>>>Jeff <jeep@rahul.net> wrote: >>>>The details of gmake are not relevant to the C language. Please >>>>ask in a newsgroup that deals with your development environment. >>> >>> IOW, nobody here gives a **** about you or your problems. >> >>Said in response to a message which, unlike yours, actually gave the >>poster advice on where to find the answer. > > It did? Show me where. > > (Unless you've clipped something relevant, the above looks like "Not > here - try someplace else") *You* clipped the following from Walter's reply to the OP: >>>> >But what I want to do is more general, since I have a list of OBJECTS >I want OBJECTS to somehow check all their associated .cpp files >and rebuild if one of them has been changed without having to >list each file seperately as above. >something like: >$(OBJECTS): ($SOURCES) > * *CC -c $*.cpp -o $@ >How do I make this work? [OT] Read the gmake documentation about "Inference rules". <<<< So not only did Walter give a suggestion as to which group to post to, he also gave a hint as to where to look in gmake's documentation. |
| All times are GMT. The time now is 02:14 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.