#C++ and MPW
3 messages in this thread
When I compile a C++ project in MPW, it always does it from scratch — it
compiles _all_ of the files, whether they have been modified or not.
It's as if CFront was not saving the object files…is there any way of getting
it to do this? I really don't want to do a full build every time a make a
change.
Thanks!
-kevin
Kevin,
Welcome to MPW, the development environment where _you_ provide the smarts.
You need to write a "make" file for your C++ project that includes the proper
"dependency rules." These rules can check file dates to see if a given object
file is "later" than its source file.
You then run MAKE on the makefile; this generates a series of commands you
highlight and execute to perform the actual build.
If you use MPW for any length of time you'll script all this stuff and put it
in a menu item or something. That's what I do; but then when I need to modify a
make file I have to drag out the MPW documentation again.
Kevin:
MPW's automatically built make files certainly do NOT behave as you describe.
It generates a separate dependency line for each c++ source file and only
compiles the ones that have changed. I just confirmed that again to make sure I
wasn't imagining it. That facility works perfectly for all the languages I
have.
Where did you get your make file, and how are you invoking it? If you invoke it
from the menu or using the command line option properly, you only get a full
build if you request it.
Mario
P.S. It is, however, annoying that it doesn't also figure out your .h file
dependencies (but that's harder to do automatically).