mirror of
https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
synced 2024-11-14 14:33:50 +08:00
01bea70795
To make it a little bit more obvious that those should be updated as well... On Alpine it fails (as below), so we've disabled it for now. When gtkdoc-mkhtml calls xsltproc, the latter throws dozens of errors and fails to produce the libkmod.devhelp2 file. Which meson tries to move and fails. Error: no ID for constraint linkend: "int" Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/94 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
70 lines
1.7 KiB
Bash
Executable File
70 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
oldpwd=$(pwd)
|
|
topdir=$(dirname $0)
|
|
cd $topdir
|
|
|
|
gtkdocize --docdir libkmod/docs || touch libkmod/docs/gtk-doc.make
|
|
autoreconf --force --install --symlink
|
|
|
|
libdir() {
|
|
echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd)
|
|
}
|
|
|
|
args="\
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--libdir=$(libdir /usr/lib) \
|
|
"
|
|
|
|
if [ -f "$topdir/.config.args" ]; then
|
|
args="$args $(cat $topdir/.config.args)"
|
|
fi
|
|
|
|
cd $oldpwd
|
|
|
|
hackargs="\
|
|
--enable-debug \
|
|
--enable-gtk-doc \
|
|
--with-zstd \
|
|
--with-xz \
|
|
--with-zlib \
|
|
--with-openssl \
|
|
"
|
|
|
|
if [ "x$1" = "xc" ]; then
|
|
shift
|
|
$topdir/configure CFLAGS='-g -O2' $args $hackargs "$@"
|
|
make clean
|
|
elif [ "x$1" = "xg" ]; then
|
|
shift
|
|
$topdir/configure CFLAGS='-g -Og' $args "$@"
|
|
make clean
|
|
elif [ "x$1" = "xl" ]; then
|
|
shift
|
|
$topdir/configure CC=clang CXX=clang++ $args "$@"
|
|
make clean
|
|
elif [ "x$1" = "xa" ]; then
|
|
shift
|
|
$topdir/configure CFLAGS='-g -O2 -Wsuggest-attribute=pure -Wsuggest-attribute=const' $args "$@"
|
|
make clean
|
|
elif [ "x$1" = "xs" ]; then
|
|
shift
|
|
scan-build $topdir/configure CFLAGS='-g -O0 -std=gnu11' $args "$@"
|
|
scan-build make
|
|
else
|
|
echo
|
|
echo "----------------------------------------------------------------"
|
|
echo "Initialized build system. For a common configuration please run:"
|
|
echo "----------------------------------------------------------------"
|
|
echo
|
|
echo "$topdir/configure CFLAGS='-g -O2' $args"
|
|
echo
|
|
echo If you are debugging or hacking on kmod, consider configuring
|
|
echo like below:
|
|
echo
|
|
echo "$topdir/configure CFLAGS='-g -O2' $args $hackargs"
|
|
fi
|