chiark / gitweb /
Fix edit menu (and simplify its implementation a bit).
[disorder] / scripts / make-version-string
CommitLineData
a05e4467
RK
1#! /usr/bin/perl -w
2use strict;
3sub output {
4 print @_ or die "$0: stdout: $!\n";
5}
6my @csv = `../config.status --version`;
7my $version;
8my $options;
9my $cc;
10my $compiler;
11for(@csv) {
12 chomp;
13 if(/disorder config\.status (\S+)/) {
14 $version = $1;
15 }
16 if(/with options \"(.*)\"/) {
17 $options = $1;
18 }
19}
20if(exists $ENV{CC}) {
21 $cc = $ENV{CC};
22 $cc =~ s/\s+/ /g;
23 my @cv = `$cc --version`;
24 $compiler = $cv[0];
25}
26die "no version found\n" unless defined $version;
3fbdc96d 27output("%s (DisOrder) $version\n");
3fbdc96d
RK
28output("Copyright (C) 2003-2008 Richard Kettlewell et al\n");
29output("License GPLv2+: GNU GPL version 2 or later:\n");
30output(" http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n");
31output("This is free software: you are free to change and redistribute it.\n");
32output("There is NO WARRANTY, to the extent permitted by law.\n");
240f4b16 33output("WARNING: -Werror not used in this build\n") if $cc !~ /-Werror/;
3fbdc96d 34
a05e4467 35close STDOUT or die "$0: stdout: $!\n";