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$current_minus_age = 0; 10 11sub process_file 12{ 13 my $outfilename = shift; 14 my $infilename = $outfilename . ".in"; 15 16 open (INPUT, "< $infilename") || exit 1; 17 open (OUTPUT, "> $outfilename") || exit 1; 18 19 while (<INPUT>) { 20 s/\@GLIB_MAJOR_VERSION\@/$major/g; 21 s/\@GLIB_MINOR_VERSION\@/$minor/g; 22 s/\@GLIB_MICRO_VERSION\@/$micro/g; 23 s/\@GLIB_INTERFACE_AGE\@/$interface_age/g; 24 s/\@GLIB_BINARY_AGE\@/$binary_age/g; 25 s/\@GETTEXT_PACKAGE\@/$gettext_package/g; 26 s/\@LT_CURRENT_MINUS_AGE@/$current_minus_age/g; 27 print OUTPUT; 28 } 29} 30 31process_file ("config.h.win32"); 32process_file ("glibconfig.h.win32"); 33process_file ("glib/makefile.msc"); 34process_file ("glib/glib.rc"); 35process_file ("gmodule/makefile.msc"); 36process_file ("gmodule/gmodule.rc"); 37process_file ("gobject/makefile.msc"); 38process_file ("gobject/gobject.rc"); 39process_file ("gthread/makefile.msc"); 40process_file ("gthread/gthread.rc"); 41process_file ("tests/makefile.msc"); 42