summaryrefslogtreecommitdiffhomepage
path: root/buildenv
blob: c7f169634b2d627decbd33255e93a1f8b93dc865 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# zopen build configuration for zash.
#
# The source tree is the port: ZOPEN_TYPE=LOCAL builds this checkout instead
# of downloading a release, so `zopen build` and `make` see the same commit.
ZASH_VERSION="0.1.0"

export ZOPEN_PROJECT_NAME="zash"
export ZOPEN_BUILD_LINE="DEV"
export ZOPEN_TYPE="LOCAL"
export ZOPEN_DEV_DEPS="make"
export ZOPEN_STABLE_DEPS="make"
export ZOPEN_CATEGORIES="shell"
export ZOPEN_COMP="CLANG"
# zash uses only POSIX/POSIX-adjacent libc calls; zoslib would add a runtime
# dependency the package does not declare.
export ZOPEN_DONT_ADD_ZOSLIB_DEP="1"

# GNU make, no autotools.
export ZOPEN_CONFIGURE="skip"
export ZOPEN_CHECK="make"
export ZOPEN_CHECK_OPTS="check"

# The Makefile uses PREFIX, not the autotools prefix variable.
export ZOPEN_INSTALL_OPTS="install PREFIX=\$ZOPEN_INSTALL_DIR"

zopen_check_results()
{
  chk="$1/$2_check.log"

  # tests/run.sh prints one summary per pass; z/OS make check runs two
  # (ASCII and EBCDIC).  No summary means the suite did not run.
  awk '
    /^zash tests: / {
      passed += $3
      skipped += $5
      failed += $7
      seen = 1
    }
    END {
      total = passed + skipped + failed
      if (!seen || total == 0)
        failed = 1
      print "actualFailures:" failed + 0
      print "totalTests:" (total ? total : 1)
      print "expectedFailures:0"
    }
  ' "$chk"
}

zopen_get_version()
{
  echo "$ZASH_VERSION"
}