aboutsummaryrefslogtreecommitdiff
path: root/extra/libelf/build
blob: ab7be6a092c32942d8b2cef451fbe34f8fa8bb71 (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
#!/bin/sh -e

# Build sometimes forces -Werror.
export CFLAGS="$CFLAGS -Wno-error"

# Disable configure error for missing argp, fts, and obstack.
clsed 's/as_fn_error.*argp/: "/g'    configure
clsed 's/as_fn_error.*fts/: "/g'     configure
clsed 's/as_fn_error.*obstack/: "/g' configure

# Don't compile unrelated C files which require argp.
#
# False positive, we are not trying to expand anything
# shellcheck disable=2016
{
    clsed 's/color.*printversion../#/g' lib/Makefile.in
    clsed 's/error.*printversion../#/g' lib/Makefile.in
    clsed 's/color\.\$(OBJ/#/g'         lib/Makefile.in
}

./configure \
    --prefix=/usr \
    --disable-symbol-versioning \
    --disable-debuginfod \
    --disable-nls

# Skip the default make target and build only what we need.
make -C lib
make -C libelf
make -C libelf DESTDIR="$1" install