In article <54401@palm-dev-forum>, [EMAIL PROTECTED] says...
>
> Thomee Wright wrote:
>
> > Dunno if you've tried this and it didn't do what you want, but what I do
> > is in the dependancies, instead of depending on the .bin files, I depend
> > on a bin.stamp file, i.e.
> > myapp.prc: myapp bin.stamp
> > <build application>
> > and then bin.stamp depends on the .rcp file, and is touched when the
> > resources are rebuilt:
> > bin.stamp: myapp.rcp
> > pilrc myapp.rcp
> > touch bin.stamp
> > I've had no problems with this solution, and the cygwin tools include a
> > touch program, so it'll work on MS platforms as well as unix/linux.
>
> Very interesting way of doing that, can you reasonably guarantee though that
> it'll work for all systems like your's?
First, as Aaron pointed out (and I didn't know), there's a new version of
PilRC that makes this irrelevant, but for the sake of completeness, I'll
answer anyway. The short answer is that I'm quite confident that it will
work most anywhere.
The long answer / explanation is: GNU make (and I would assume other
versions as well, but I don't know) relies on file timestamps when
determining what to rebuild. When it tries to build a target, it checks
if its up to date, and if it is, it does nothing. To make sure a target
is up to date, it first makes sure that everything it depends on is up to
date, then if any of those dependancies are newer than the target, it
executes the build rule for the target. In this case, when you ask for
myapp.prc, it will first check that myapp and bin.stamp are up to date.
When checking if bin.stamp is up to date, it will check if myapp.rcp is up
to date. Because there is no build rule for myapp.rcp, it assumes it is a
source file, and is by definition up to date. It then compares the
timestamp on myapp.rcp and bin.stamp. If myapp.rcp is newer, it'll run
the build rules for bin.stamp, which will recompile all the .bin files,
then touch bin.stamp, which just sets the timestamp to the current time.
Then it'll see that bin.stamp is newer than myapp.prc and proceed to
rebuild myapp.prc. I don't see why this would fail on any system that has
a half sane file timestamping system.
Talk to you later,
-Thomee Wright-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/