+ } else {
+ $spi_new = clean_SPI($api);
+ if ($api_new ne $spi_new) {
+ if ((($stub_header) = ($api =~ /#ifdef\s+USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\s*.*?\n#include\s+<SystemConfiguration\/(.*?\.h)>\s*.*?\n/))) {
+ if ($api_header eq $stub_header) {
+ die "API & STUB header not unique: $api_header\n";
+ }
+ } else {
+ die "Header missing #ifdef/#else/#endif: $api_header\n";
+ }
+
+ printf "updating .../Headers/%s\n", $api_header;
+ open(API, ">", $api_path);
+ print API $spi_new;
+ close(API);
+
+ printf " adding .../PrivateHeaders/%s (stub)\n", $stub_header;
+ $stub_path = $SPI_BASE . "/" . $stub_header;
+ $stub_new = create_STUB($api_header);
+ open(STUB, ">", $stub_path);
+ print STUB $stub_new;
+ close(STUB);
+ }