gccxml_gem 0.9-x86-darwin-9 → 0.9.1-x86-darwin-9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/gccxml.rb +16 -3
  3. data/share/man/man1/gccxml.1 +1 -1
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake/rdoctask'
3
3
  require 'rake/gempackagetask'
4
4
 
5
5
  PROJECT_NAME = "gccxml_gem"
6
- GCCXML_VERSION = "0.9"
6
+ GCCXML_VERSION = "0.9.1"
7
7
  RUBYFORGE_USERNAME = "jameskilton"
8
8
 
9
9
  desc "Build gccxml for this system"
data/gccxml.rb CHANGED
@@ -7,6 +7,7 @@ class GCCXML
7
7
  def initialize()
8
8
  @exe = find_exe.strip.chomp
9
9
  @includes = []
10
+ @flags = []
10
11
  end
11
12
 
12
13
  # Add an include path for parsing
@@ -14,12 +15,18 @@ class GCCXML
14
15
  @includes << path
15
16
  end
16
17
 
18
+ # Add extra CXXFLAGS to the command line
19
+ def add_cxxflags(flags)
20
+ @flags << flags
21
+ end
22
+
17
23
  # Run gccxml on the header file(s), sending the output to the passed in
18
24
  # file.
19
25
  def parse(header_file, to_file)
20
26
  includes = @includes.flatten.uniq.map {|i| "-I#{i.chomp}"}.join(" ").chomp
21
- cmd = "#{@exe} #{includes} #{header_file} -fxml=#{to_file}"
22
- system(cmd)
27
+ flags = @flags.flatten.join(" ").chomp
28
+ cmd = "#{@exe} #{includes} #{flags} #{header_file} -fxml=#{to_file}"
29
+ raise "Error executing gccxml command line: #{cmd}" unless system(cmd)
23
30
  end
24
31
 
25
32
  private
@@ -35,7 +42,13 @@ class GCCXML
35
42
  path.chomp!
36
43
 
37
44
  if `#{path} --version 2>&1` !~ /GCC-XML/
38
- raise "Unable to find gccxml executable: #{path}"
45
+ if File.exists?(path)
46
+ # This is the Rubygems <= 1.1.1 bug of not setting file attributes properly
47
+ dir = File.expand_path(File.dirname(__FILE__))
48
+ raise "Unable to execute gccxml. Please run 'sudo chmod -R a+x #{dir}'"
49
+ else
50
+ raise "Unable to find gccxml executable: #{path}"
51
+ end
39
52
  end
40
53
 
41
54
  path
@@ -1,4 +1,4 @@
1
- .TH GCC-XML 1 "May 04, 2008" "GCC-XML 0.9.0"
1
+ .TH GCC-XML 1 "May 11, 2008" "GCC-XML 0.9.0"
2
2
  .SH NAME
3
3
  .TP
4
4
  .B gccxml
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gccxml_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.9"
4
+ version: 0.9.1
5
5
  platform: x86-darwin-9
6
6
  authors:
7
7
  - Jason Roelofs
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-04 00:00:00 -04:00
12
+ date: 2008-05-11 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15