autobuild 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ == Version 1.2.6
2
+ * really fix the dependency problem
3
+ * add documentation support in autotools
4
+
1
5
  == Version 1.2.5
2
6
  * really fix the git fetch phase
3
7
  * fix a dependency issue between code generation and CMake configuration
@@ -40,8 +40,8 @@ begin
40
40
  targets = ['doc']
41
41
  else
42
42
  targets = ['import']
43
- targets << 'doc' if Autobuild.do_doc
44
43
  targets += ['prepare', 'build'] if Autobuild.do_build
44
+ targets << 'doc' if Autobuild.do_doc
45
45
  end
46
46
  targets.each do |phase|
47
47
  packages = Autobuild.packages
@@ -3,6 +3,6 @@ require 'autobuild/reporting'
3
3
  require 'autobuild/package'
4
4
 
5
5
  module Autobuild
6
- VERSION = "1.2.5" unless defined? Autobuild::VERSION
6
+ VERSION = "1.2.6" unless defined? Autobuild::VERSION
7
7
  end
8
8
 
@@ -47,6 +47,22 @@ module Autobuild
47
47
  def initialize(options)
48
48
  super
49
49
 
50
+ Autobuild.update_environment(prefix)
51
+ end
52
+
53
+ def depends_on(*packages)
54
+ super
55
+ stamps = packages.collect { |p| Package[p.to_s].installstamp }
56
+ file configurestamp => stamps
57
+ end
58
+
59
+ def ensure_dependencies_installed
60
+ dependencies.each do |pkg|
61
+ Rake::Task[Package[pkg].installstamp].invoke
62
+ end
63
+ end
64
+
65
+ def prepare
50
66
  file configurestamp do
51
67
  ensure_dependencies_installed
52
68
  configure
@@ -67,23 +83,6 @@ module Autobuild
67
83
  install
68
84
  Autobuild.update_environment(prefix)
69
85
  end
70
-
71
- Autobuild.update_environment(prefix)
72
- end
73
-
74
- def depends_on(*packages)
75
- super
76
- stamps = packages.collect { |p| Package[p.to_s].installstamp }
77
- file configurestamp => stamps
78
- end
79
-
80
- def ensure_dependencies_installed
81
- dependencies.each do |pkg|
82
- Rake::Task[Package[pkg].installstamp].invoke
83
- end
84
- end
85
-
86
- def prepare
87
86
  end
88
87
 
89
88
  # Configure the builddir directory before starting make
@@ -73,9 +73,6 @@ module Autobuild
73
73
  Autobuild.apply_post_install(name, @post_install)
74
74
  end
75
75
  end
76
- task "#{name}-build" => installstamp
77
- task :build => "#{name}-build"
78
-
79
76
  # Add dependencies declared in spec
80
77
  depends_on *depends if depends
81
78
 
@@ -84,9 +81,12 @@ module Autobuild
84
81
  task :import => "#{name}-import"
85
82
 
86
83
  # Define the prepare task
87
- task "#{name}-prepare" do prepare end
84
+ task "#{name}-prepare" => "#{name}-import" do prepare end
88
85
  task :prepare => "#{name}-prepare"
89
86
 
87
+ task "#{name}-build" => ["#{name}-prepare", installstamp]
88
+ task :build => "#{name}-build"
89
+
90
90
  task(name) do
91
91
  Rake::Task["#{name}-import"].invoke
92
92
  Rake::Task["#{name}-prepare"].invoke
@@ -44,7 +44,7 @@ module Autobuild
44
44
  # Build stamp
45
45
  # This returns the name of the file which marks when the package has been
46
46
  # successfully built for the last time. The path is absolute
47
- def buildstamp; "#{builddir}/#{name}-#{STAMPFILE}" end
47
+ def buildstamp; "#{builddir}/#{STAMPFILE}" end
48
48
 
49
49
  def initialize(options)
50
50
  @using = Hash.new
@@ -54,6 +54,20 @@ module Autobuild
54
54
 
55
55
  Autobuild.update_environment(prefix)
56
56
  end
57
+
58
+ def install_doc(relative_to = builddir)
59
+ super(relative_to)
60
+ end
61
+
62
+ # Declare that the given target can be used to generate documentation
63
+ def with_doc(target = 'doc')
64
+ doc_task do
65
+ Dir.chdir(builddir) do
66
+ Subprocess.run(name, 'doc', Autobuild.tool(:make), target)
67
+ yield if block_given?
68
+ end
69
+ end
70
+ end
57
71
 
58
72
  # Overrides the default behaviour w.r.t. autotools script generation
59
73
  #
@@ -139,6 +153,7 @@ module Autobuild
139
153
  ensure_dependencies_installed
140
154
  build
141
155
  end
156
+ task "#{name}-build" => installstamp
142
157
 
143
158
  file installstamp => buildstamp do
144
159
  install
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-16 00:00:00 +02:00
12
+ date: 2008-10-17 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency