Um do you include your d files into the make you have to you know? Ken -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler Littlefield Sent: Sunday, April 18, 2010 10:24 PM To: programmingblind@xxxxxxxxxxxxx Subject: Re: a way around make clean;make? I use gcc -m and -mm and that, but it doesn't seem to do what I want. I get the .d files, but typing make after I alter code in a cpp file doesn't solve much, it just uses the existing .o and links. Thanks, Tyler Littlefield http://tds-solutions.net Twitter: sorressean On Apr 18, 2010, at 8:20 PM, Ken Perry wrote: > > Ok what you are looking for is making depends for each file. You can do > this the hard way and that is each time you add a file you add all the files > that it depends on. That or you can run gcc and make it create the depends > for you. I could write a long mail on how to do this but it might be better > to read the Makefile manual for this now that you have a little experience > with make files. Note these depends are one reason I go with jamfiles when > I can because you never have to worry about them with them but that is > another bear in the woods. Ok here is the web page for the make file > manual: > > http://www.gnu.org/software/make/manual/make.html > > Two other things to search for on Google would be makedepends which is a > command to auto create depends or if you look through Gcc's options you will > find an option to create depends I can't remember if it is mm or Mm or what > but if you search the man pages you can find them. I still suggest though > if you have made a few simple Makefile read the Make manual and see what you > know and don't. > > Ken > > -----Original Message----- > From: programmingblind-bounce@xxxxxxxxxxxxx > [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler > Littlefield > Sent: Sunday, April 18, 2010 6:41 PM > To: programmingblind@xxxxxxxxxxxxx > Subject: a way around make clean;make? > > hello all, > I have a quick question: when I run my makefile, I want it to check to see > what files were modified and then work based off of that modification. So, > for example. If I modify file 2 and 8, I want it to recompile 2.cpp and > 8.cpp and link. Right now, i have to make clean, then make for the new > changes, or just delete the object files myself. Does anyone have a > workaround? It'd be really helpful. > > Thanks, > Tyler Littlefield > http://tds-solutions.net > Twitter: sorressean > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind