Added header comment
[transsip.git] / src / gen_build_info.pl
blob6feab1de4e27abfe752d8cabee24638df0f87fcc
1 #!/usr/bin/perl
3 use warnings;
4 use strict;
6 use Config;
7 use POSIX qw(strftime);
9 die "No version string supplied!\n" if($#ARGV == -1);
11 my $build = strftime "%x,%I:%M%p", gmtime;
12 my $version = $ARGV[0];
14 open(FP, "> version.h") or die "Cannot create version.h! $!\n";
15 print FP <<EOF;
16 #ifndef VERSION_H
17 #define VERSION_H
19 #define PROGNAME_STRING "transsip"
20 #define VERSION_STRING "$version"
21 #define BUILD_STRING "$Config{archname}~$build"
23 #endif /* VERSION_H */
24 EOF
26 close(FP);