lib/autobuild/packages/autotools.rb in autobuild-1.2.5 vs lib/autobuild/packages/autotools.rb in autobuild-1.2.6

- old
+ new

@@ -42,21 +42,35 @@ def builddir; File.expand_path(@builddir || Autotools.builddir, srcdir) end # Build stamp # This returns the name of the file which marks when the package has been # successfully built for the last time. The path is absolute - def buildstamp; "#{builddir}/#{name}-#{STAMPFILE}" end + def buildstamp; "#{builddir}/#{STAMPFILE}" end def initialize(options) @using = Hash.new @configureflags = [] super Autobuild.update_environment(prefix) end + + def install_doc(relative_to = builddir) + super(relative_to) + end + # Declare that the given target can be used to generate documentation + def with_doc(target = 'doc') + doc_task do + Dir.chdir(builddir) do + Subprocess.run(name, 'doc', Autobuild.tool(:make), target) + yield if block_given? + end + end + end + # Overrides the default behaviour w.r.t. autotools script generation # # Use it like that: # * to force a generation step (skipping autodetection), do # pkg.use <program> => true @@ -137,9 +151,10 @@ end file buildstamp => [ srcdir, "#{builddir}/config.status" ] do ensure_dependencies_installed build end + task "#{name}-build" => installstamp file installstamp => buildstamp do install Autobuild.update_environment(prefix) end