8000 Fix binding-functions when building out of source by isaacbrodsky · Pull Request #188 · uber/h3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix binding-functions when building out of source #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ matrix:
- coveralls --lcov-file coverage.cleaned.info --verbose
- env: NAME="Mac OSX (Xcode 8)"
os: osx
- env: NAME="binding-functions target"
script:
- make binding-functions
# Check that the file exists and has contents
- test -s binding-functions

# Configure the build script, out of source.
before_script:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The public API of this library consists of the functions declared in file
[h3api.h.in](./src/h3lib/include/h3api.h.in).

## [Unreleased]
### Fixed
- `binding-functions` build target fixed when running the build out of source

## [3.4.0] - 2019-01-23
### Added
Expand Down
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ environment:
build_script:
- cmake "-G%GENERATOR%" -H. -Bbuild
- cmake --build build --config "%CONFIG%"
- cmake --build build --config "%CONFIG%" --target binding-functions

test_script:
- ps: cd build
- ctest -VV -C "%CONFIG%"
# Check that binding-functions was generated and has content
- ps: |
$ErrorActionPreference = "Stop"
if ((Get-Item "binding-functions").Length -lt 10) { $host.SetShouldExit(1) }
3 changes: 1 addition & 2 deletions scripts/binding_functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
# by bindings of the H3 library. It is invoked by the `binding-functions`
# make target and produces a file `binding-functions`.

$scriptDir = Split-Path -parent $PSCommandPath
Get-Content "$scriptDir/../src/h3lib/include/h3api.h" | Where-Object {$_ -match "@defgroup ([A-Za-z0-9_]*)"} | Foreach {$Matches[1]} > binding-functions
Get-Content "src/h3lib/include/h3api.h" | Where-Object {$_ -match "@defgroup ([A-Za-z0-9_]*)"} | Foreach {$Matches[1]} > binding-functions
5 changes: 3 additions & 2 deletions scripts/binding_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
# by bindings of the H3 library. It is invoked by the `binding-functions`
# make target and produces a file `binding-functions`.

SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
cat "$SCRIPT_DIR/../src/h3lib/include/h3api.h" | sed -n '/@defgroup/s/.*@defgroup \([A-Za-z0-9_]*\) .*/\1/gp' > binding-functions
set -eo pipefail

cat "src/h3lib/include/h3api.h" | sed -n '/@defgroup/s/.*@defgroup \([A-Za-z0-9_]*\) .*/\1/gp' > binding-functions
0