Subj : Re: External translator always runs, even when the target is up-to-date To : borland.public.cpp.borlandcpp From : "Dennis Jones" Date : Tue Apr 13 2004 10:33 am "Jeff Kish" wrote in message news:jeon709jgg129qtcu60hon83ksoepcrrrr@4ax.com... > On Fri, 9 Apr 2004 08:36:55 -0700, "Dennis Jones" > wrote: > > >In the Borland C++ 5.0x IDE, I have a translator tool defined for .SQC > >(embedded SQL) files that preprocesses them into .CPP files. However, I > >have noticed that the translator ALWAYS gets invoked, regardless of whether > >or not the target .CPP file is up-to-date. Is there a way to have the > >translator invoked only when the target is out of date, as one would expect? > > > >Thank you, > > > >- Dennis > > > I don't have the slightest idea, but perhaps the onus is on the > translator tool you defined, i.e. since you have the flexibility to > define a tool, it might be considered difficult for the ide to know > the rules for invoking the tool (maybe it might look for other > information besides dates, etc to trigger a build), so the ide always > invokes it. > > just a theory Thanks for the idea Jeff, but your theory is incorrect because the onus on knowing the rules for invoking the tool is on MAKE, not the tool itself (that would otherwise be a circular problem that could not be solved). But you did get me thinking about the makefile rules and that helped me find the problem. My tool definition looked like this: -d -o WINNT -s 800 $EDNAME $NAME($OUTNAME)$EXT($OUTNAME) and the generated makefile had dependency rules for the CPP files that looked like this: ...\DEBUG\OBJ\somefile.cpp : somefile.sqc $(PreprocessSQCFile) -d -o WINNT -s 800 T:\source\somefile.sqc somefile.cpp The problem here is, the CPP files are being written to the current source directory (because $NAME and $EXT were stripping off the output path), while the dependency rule is looking for them in ..\debug\obj! I changed the preprocess rule to: -d -o WINNT -s 800 $EDNAME $OUTNAME ....which causes the output CPP files to go to the ..\debug\obj directory (not ideal, but acceptable), and then added "..\debug\obj" to my source path. And voila...it worked! - Dennis .