This was quite easy once I looked into ant!
When I build the "base platform" I do this as the final ant target;
<target name ="install-as-platform-into-netbeans" depends="build-zip">
<unzip src="${basedir}/dist/${ant.project.name}.zip" dest="${basedir}/dist"/>
<propertyfile file="${user.properties.file}">
<entry key="nbplatform.${ant.project.name}.harness.dir" value="${nbplatform.default.harness.dir}"/>
<entry key="nbplatform.${ant.project.name}.label" value="${ant.project.name}"/>
<entry key="nbplatform.${ant.project.name}.netbeans.dest.dir" value="${basedir}/dist/${ant.project.name}"/>
<entry key="nbplatform.${ant.project.name}.sources" value="${basedir}"/>
</propertyfile>
And then I have to set this platform as the 'active platform' in the second build;
<target name="set-as-active-platform">
<propertyfile file="${basedir}/nbproject/platform.properties">
<entry key="nbplatform.active" value="NAME-OF-PREVIOUS-PLATFORM"/>
</propertyfile>
</target>
One obvious downside is that I have to have the name of the previous platform coded into NAME-OF-PREVIOUS-PLATFORM, but the name doesnt change very often so it's no big deal.