File: compile_wrapper.sh

package info (click to toggle)
waypipe 0.10.5-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,080 kB
  • sloc: ansic: 15,809; xml: 9,436; python: 1,726; sh: 248; makefile: 28
file content (22 lines) | stat: -rw-r--r-- 699 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
#!/bin/sh

# This script is run by meson to make cargo build in a specific folder and produce a specific output file,
# because --artifact-dir is still nightly-only
set -e

if [ $# -ne 10 ] ; then
    echo "Incorrect number of arguments: $#"
    exit 1
fi

# This is a workaround for Rust having no simple and stable compile
# time conditional string concatenation; and meson not properly
# handling newlines or backslashes in custom targets
version="$6
features:
  lz4: $7
  zstd: $8
  dmabuf: $9
  video: ${10}"
env WAYPIPE_VERSION="$version" cargo build --frozen -v --bin waypipe --profile "$1" --manifest-path "$2" --no-default-features --target-dir "$3" --features "$4"
cp "$3/$1/waypipe" "$5"