portability fix
[platform/upstream/glib.git] / win32-fixup.pl
1 #!/usr/bin/perl
2
3 $major = 1;
4 $minor = 3;
5 $micro = 7;
6 $binary_age = 0;
7 $interface_age = 0;
8 $gettext_package = "glib20";
9
10 sub process_file
11 {
12         my $outfilename = shift;
13         my $infilename = $outfilename . ".in";
14         
15         open (INPUT, "< $infilename") || exit 1;
16         open (OUTPUT, "> $outfilename") || exit 1;
17         
18         while (<INPUT>) {
19             s/\@GLIB_MAJOR_VERSION\@/$major/g;
20             s/\@GLIB_MINOR_VERSION\@/$minor/g;
21             s/\@GLIB_MICRO_VERSION\@/$micro/g;
22             s/\@GLIB_INTERFACE_AGE\@/$interface_age/g;
23             s/\@GLIB_BINARY_AGE\@/$binary_age/g;
24             s/\@GETTEXT_PACKAGE\@/$gettext_package/g;
25             print OUTPUT;
26         }
27 }
28
29 process_file ("config.h.win32");
30 process_file ("glibconfig.h.win32");
31 process_file ("glib/makefile.msc");
32 process_file ("gmodule/makefile.msc");
33 process_file ("gobject/makefile.msc");
34 process_file ("gthread/makefile.msc");
35 process_file ("tests/makefile.msc");