live-bootstrap/steps-guix/argp-standalone-1.4.1/pass1.sh
vxtls 0a922a219d steps-guix/argp-standalone: fix out-of-tree build include path for testsuite
argp-standalone pass1 builds in a separate build directory. Its testsuite
compiles sources that include <argp.h>, but without an explicit include path
the header in the source root is not found and build fails.

Set:
- CPPFLAGS=-I/Users/luoyanpan/CLionProjects/guix/live-bootstrap/..

in src_configure so testsuite objects can resolve argp.h during the normal
 phase.
2026-02-21 14:56:09 -05:00

36 lines
797 B
Bash

# SPDX-License-Identifier: GPL-3.0-or-later
# Build argp-standalone for the kernel toolchain sysroot. This is used by
# later kernel-side dependencies (for example elfutils).
: "${KERNEL_SYSROOT:=/kernel-toolchain}"
src_prepare() {
default
autoreconf -fi
}
src_configure() {
mkdir build
cd build
# argp-standalone's testsuite expects argp.h from source root even when
# building out-of-tree.
CPPFLAGS="-I${PWD}/.." \
CC=gcc \
AR=ar \
RANLIB=ranlib \
../configure \
--prefix="${KERNEL_SYSROOT}" \
--libdir="${KERNEL_SYSROOT}/lib"
}
src_compile() {
default_src_compile
}
src_install() {
make "${MAKEJOBS}" install \
DESTDIR="${DESTDIR}" \
prefix="${KERNEL_SYSROOT}" \
libdir="${KERNEL_SYSROOT}/lib"
}