forked from osmocom/wireshark
From Peter Harris via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2981 :
Put the git version of mesa and xcbproto in the generated header files. From me: Don't use 'which' to find git--it wouldn't work on Windows. svn path=/trunk/; revision=29865
This commit is contained in:
parent
d764400291
commit
c6261aee41
|
@ -1042,12 +1042,29 @@ eot
|
||||||
push @register, $header;
|
push @register, $header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub find_version {
|
||||||
|
#my $git = `which git`;
|
||||||
|
#chomp($git);
|
||||||
|
#-x $git or return 'unknown';
|
||||||
|
|
||||||
|
my $lib = shift;
|
||||||
|
# this will generate an error on stderr if git isn't in our $PATH
|
||||||
|
# but that's OK. The version is still set to 'unknown' in that case
|
||||||
|
# and at least the operator could see it.
|
||||||
|
my $ver = `git --git-dir=$lib/.git describe`;
|
||||||
|
$ver //= 'unknown';
|
||||||
|
chomp $ver;
|
||||||
|
return $ver;
|
||||||
|
}
|
||||||
|
|
||||||
sub add_generated_header {
|
sub add_generated_header {
|
||||||
my ($out) = @_;
|
my ($out, $using) = @_;
|
||||||
|
my $ver = find_version($using);
|
||||||
|
|
||||||
print $out <<eot
|
print $out <<eot
|
||||||
/* Do not modify this file. */
|
/* Do not modify this file. */
|
||||||
/* It was automatically generated by $0. */
|
/* It was automatically generated by $0
|
||||||
|
using $using version $ver */
|
||||||
eot
|
eot
|
||||||
;
|
;
|
||||||
# Since this file is checked in, add its SVN revision
|
# Since this file is checked in, add its SVN revision
|
||||||
|
@ -1090,8 +1107,8 @@ $impl = new IO::File '> x11-extension-implementation.h'
|
||||||
$error = new IO::File '> x11-extension-errors.h'
|
$error = new IO::File '> x11-extension-errors.h'
|
||||||
or die ("Cannot open x11-extension-errors.h for writing\n");
|
or die ("Cannot open x11-extension-errors.h for writing\n");
|
||||||
|
|
||||||
add_generated_header($impl);
|
add_generated_header($impl, 'xcbproto');
|
||||||
add_generated_header($error);
|
add_generated_header($error, 'xcbproto');
|
||||||
|
|
||||||
# Open the files generated by process-x11-fields.pl for appending
|
# Open the files generated by process-x11-fields.pl for appending
|
||||||
$reg = new IO::File '>> x11-register-info.h'
|
$reg = new IO::File '>> x11-register-info.h'
|
||||||
|
@ -1106,7 +1123,7 @@ print $decl "\n/* Generated by $0 below this line */\n";
|
||||||
if (-e 'mesa/src/mesa/glapi/gl_API.xml') {
|
if (-e 'mesa/src/mesa/glapi/gl_API.xml') {
|
||||||
$enum = new IO::File '> x11-glx-render-enum.h'
|
$enum = new IO::File '> x11-glx-render-enum.h'
|
||||||
or die ("Cannot open x11-glx-render-enum.h for writing\n");
|
or die ("Cannot open x11-glx-render-enum.h for writing\n");
|
||||||
add_generated_header($enum);
|
add_generated_header($enum, 'mesa');
|
||||||
print $enum "static const value_string mesa_enum[] = {\n";
|
print $enum "static const value_string mesa_enum[] = {\n";
|
||||||
print $impl '#include "x11-glx-render-enum.h"'."\n\n";
|
print $impl '#include "x11-glx-render-enum.h"'."\n\n";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Do not modify this file. */
|
/* Do not modify this file. */
|
||||||
/* It was automatically generated by process-x11-xcb.pl. */
|
/* It was automatically generated by process-x11-xcb.pl
|
||||||
|
using xcbproto version 1.5-4-ga507629 */
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Do not modify this file. */
|
/* Do not modify this file. */
|
||||||
/* It was automatically generated by process-x11-xcb.pl. */
|
/* It was automatically generated by process-x11-xcb.pl
|
||||||
|
using xcbproto version 1.5-4-ga507629 */
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Do not modify this file. */
|
/* Do not modify this file. */
|
||||||
/* It was automatically generated by process-x11-xcb.pl. */
|
/* It was automatically generated by process-x11-xcb.pl
|
||||||
|
using mesa version mesa_7_5_1-3181-gd9dc4cb */
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue