File: gumbo.rake

package info (click to toggle)
ruby-nokogiri 1.13.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,416 kB
  • sloc: ansic: 38,198; xml: 28,086; ruby: 22,271; java: 15,517; cpp: 7,037; yacc: 244; sh: 148; makefile: 136
file content (34 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

namespace "gumbo" do
  gtest_pkg = "gumbo-parser/googletest"
  gtest_lib = File.join(gtest_pkg, "make/gtest_main.a")

  file gtest_lib => gtest_pkg do
    sh("make -C gumbo-parser/googletest/make gtest_main.a")
  end

  file gtest_pkg do
    sh(<<~EOF)
      curl -L https://github.com/google/googletest/archive/release-1.8.0.tar.gz | \
        tar zxf - --strip-components 1 -C gumbo-parser googletest-release-1.8.0/googletest
    EOF
  end

  desc "Run the gumbo parser test suite"
  task "test" => gtest_lib do
    sh("make -j2 -C gumbo-parser")
  end

  desc "Clean up after the gumbo parser test suite"
  task "clean" do
    sh("make -j2 -C gumbo-parser clean")
  end

  CLOBBER.add(gtest_pkg)
end

desc "Run the gumbo parser test suite"
task "gumbo" => "gumbo:test"

task "clean" => "gumbo:clean" # rubocop:disable Rake/Desc