Detect stale octrees

Is there any way to automatically detect a stale octree so that I can rebuild it only when necessary? I’ve been using if [ $rad -nt $oct ]; then oconv $rad > $oct but this doesn’t notice modifications to instances or xformed files.

The rad program has the “objects” variable for specifying a list of files the octree also depend on. This is of course a manual method. You can build such a list automatically by running oconv once, then checking which files were accessed in the current directory, but this only works if you aren’t stowing things in other directories.