| Eli, the generated file you're looking for is LLDB_vers.c, a file generated by Apple Generic Versioning, which is described in more detail here: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/agvtool.8.html. A properly-built LLDB_vers.c looks like this: – const unsigned char LLDBVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:LLDB PROJECT:lldb-24" "\n"; const double LLDBVersionNumber __attribute__ ((used)) = (double)24.; – I've attached a simple Perl script that generates the above code given the location of the .pbxproj as input. Sean |
#!/usr/bin/perl
sub usage()
{
print "Usage: generate-vers.pl /path/toproject.pbxproj";
exit(0);
}
(scalar @ARGV == 1) or usage();
open $pbxproj, $ARGV[0] or die "Couldn't open ".$ARGV[0];
$current_project_version = None;
$product_name = None;
while ($line = <$pbxproj>)
{
chomp ($line);
if ($current_project_version == None &&
$line =~ /CURRENT_PROJECT_VERSION = ([0-9]+)/)
{
$current_project_version = $1;
}
if ($product_name == None &&
$line =~ /productName = ([^;]+)/)
{
$product_name = $1;
}
}
if (!$product_name || !$current_project_version)
{
print "Couldn't get needed information from the .pbxproj";
exit(-1);
}
$uppercase_name = uc $product_name;
$lowercase_name = lc $product_name;
close $pbxproj;
$file_string = " const unsigned char ".$uppercase_name."VersionString[] __attribute__ ((used)) = \"@(#)PROGRAM:".$uppercase_name." PROJECT:".$lowercase_name."-".$current_project_version."\" \"\\n\"; const double ".$uppercase_name."VersionNumber __attribute__ ((used)) = (double)".$current_project_version.".;\n";
print $file_string;On Jul 2, 2010, at 12:50 PM, Eli Friedman wrote:
|
_______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
