30.4. Platform-Dependent Files in Non-object-code Build Items

It's easy to fall into the trap of thinking that, just because a file is a text file or some other format that can be processed on any platform type, it is a platform-independent file. A plain text file that contains platform-specific information is, in fact, a platform-specific file. So if you have a build item that runs a platform-specific tool and caches platform-specific information, that build item should probably have platform type native rather than indep.

This is one reasons that abuild doesn't provide information about the current platform to the abuild interfaces for java and platform-independent build items. It would be a bug to have an interface variable have a different value in different contexts when it might influence a build that could be used on multiple platforms. For example, an indep build item could write out some value based on a platform variable and then that information could be wrong when the results of the build were used on a different platform.

Abuild itself actually breaks this rule for Java wrapper scripts. This is a known problem for which we don't have a ready solution. It just show that there may be instances in which you might break this rule, but be aware when you do that you are creating a situation in which a single built instance of build tree may not work properly when used across multiple platforms.