File: job-3-mingw.sh

package info (click to toggle)
mpich 4.3.0%2Breally4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 419,120 kB
  • sloc: ansic: 1,215,557; cpp: 74,755; javascript: 40,763; f90: 20,649; sh: 18,463; xml: 14,418; python: 14,397; perl: 13,772; makefile: 9,279; fortran: 8,063; java: 4,553; asm: 324; ruby: 176; lisp: 19; php: 8; sed: 4
file content (88 lines) | stat: -rw-r--r-- 1,877 bytes parent folder | download | duplicates (4)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/sh
#
# Copyright © 2012-2021 Inria.  All rights reserved.
# See COPYING in top-level directory.
#

echo "############################"
echo "Running on:"
uname -a
echo "Options: $0"
echo "############################"

set -e
set -x

tarball="$1"
arch="$2"

if test "x$arch" = "x32"; then
  # check the mingw shell
  if test "x$MINGW_CHOST" != xi686-w64-mingw32; then
    echo "MINGW_CHOST is $MINGW_CHOST instead of i686-w64-mingw32."
    exit 1
  fi
  # for MS 'lib' program
  export PATH=$PATH:$MSLIB32_PATH
else if test "x$arch" = "x64"; then
  # check the mingw shell
  if test "x$MINGW_CHOST" != xx86_64-w64-mingw32; then
    echo "MINGW_CHOST is $MINGW_CHOST instead of x86_64-w64-mingw32."
    exit 1
  fi
  # for MS 'lib' program
  export PATH=$PATH:$MSLIB64_PATH
else
  echo "Architecture parameter must be 32 or 64."
  exit 1
fi
fi

# check that we have a lib.exe
if ! which lib.exe ; then
  echo "Couldn't find MSVC lib.exe"
  exit 1
fi

# remove previous artifacts so that they aren't exported again by this build
rm -f hwloc-win*-build-*.zip || true

# extract the tarball
if ! test -f "$tarball"; then
  echo "Invalid tarball parameter."
  exit 1
fi
basename=$(basename $tarball .tar.gz)
version=$(echo $basename | cut -d- -f2-)
test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
tar xfz $tarball

mkdir ${basename}/build || true
cd ${basename}/build

winball=hwloc-win${arch}-build-${version}
prefix=${PWD}/../${winball}
../configure --prefix=$prefix --enable-static CC="gcc -static-libgcc" $confopts

make

if test x$NO_CHECK != xtrue; then
  make check
fi

make install

cd ..

zip -r ../${winball}.zip ${winball}
test -f ${winball}/lib/libhwloc.lib || false

build/utils/lstopo/lstopo-no-graphics -v
build/utils/lstopo/lstopo-no-graphics --windows-processor-groups
build/utils/hwloc/hwloc-info --support

cd ..

rm -f $tarball

exit 0