File: prebuild_modules.sh

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (71 lines) | stat: -rwxr-xr-x 1,622 bytes parent folder | download | duplicates (2)
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
#! /usr/bin/env bash
##
## Copyright (C) by Argonne National Laboratory
##     See COPYRIGHT in top-level directory
##

# Prebuild modules into modules.tar.gz. Copy the tarball to a fresh git cloned repository,
# both autogen.sh and configure will skip them in the build process.
#
# This is to accelerate repeated CI testing.
#

git submodule update --init

make_it_lean () {
    rm -rf .git
    find . -name '*.o' | xargs rm -f
}

pushd modules/hwloc
extra_option=$HWLOC_EXTRA
./autogen.sh
./configure CFLAGS=-fvisibility=hidden \
    --enable-embedded-mode --enable-visibility=no \
    --disable-libxml2 --disable-nvml --disable-cuda --disable-opencl --disable-rsmi $extra_option
make
make_it_lean
popd

pushd modules/json-c
extra_option=$JSONC_EXTRA
./autogen.sh
./configure --enable-embedded --disable-werror $extra_option
make
make_it_lean
popd

pushd modules/yaksa
extra_option=$YAKSA_EXTRA
./autogen.sh
./configure --enable-embedded $extra_option
make
make_it_lean
popd

pushd modules/libfabric
extra_option=$LIBFABRIC_EXTRA
./autogen.sh
./configure --enable-embedded $extra_option
make
make_it_lean
popd

# ucx need make install to work, which need replace all hardcoded paths to work
pushd modules/ucx
extra_option=$UCX_EXTRA
./autogen.sh
if false ; then
    # skip for now
    ./configure --prefix=/MODPREFIX --disable-static $extra_option
    make
    find . -name '*.la' | xargs --verbose sed -i "s,$PWD,MODDIR,g"
fi
make_it_lean
popd

# Add a flag to mark modules as pre-built. Remove the flag file to allow configure
# reconfigure and rebuild modules.
touch modules/PREBUILT

tar czf modules.tar.gz modules