mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Add custom build to Ruby for scanner library
This commit is contained in:
parent
40b5c0c3ba
commit
e0d363ebd0
@ -1,2 +1,13 @@
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
import Distribution.PackageDescription
|
||||
import Distribution.Simple.Setup
|
||||
import Distribution.Simple.Utils
|
||||
main = defaultMainWithHooks simpleUserHooks { preConf = makeScannerLib }
|
||||
|
||||
makeScannerLib :: Args -> ConfigFlags -> IO HookedBuildInfo
|
||||
makeScannerLib _ flags = do
|
||||
let verbosity = fromFlag $ configVerbosity flags
|
||||
rawSystemExit verbosity "env" ["mkdir", "-p", "lib"]
|
||||
rawSystemExit verbosity "env" ["gcc", "-std=c++11", "-Ivendor/tree-sitter-ruby/src/", "-fPIC", "vendor/tree-sitter-ruby/src/scanner.cc", "-c", "-o", "lib/scanner.o"]
|
||||
rawSystemExit verbosity "env" ["ar", "rcvs", "lib/libscanner.a", "lib/scanner.o"]
|
||||
pure emptyHookedBuildInfo
|
||||
|
@ -7,7 +7,7 @@ author: semantic-code
|
||||
maintainer: tclem@github.com
|
||||
copyright: 2017 GitHub
|
||||
category: Web
|
||||
build-type: Simple
|
||||
build-type: Custom
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user