26 lines
640 B
Bash
26 lines
640 B
Bash
#!/usr/bin/env sh
|
|
|
|
baz_log 'setting up CC'
|
|
case "$CC" in
|
|
'' | cc | gcc | clang) export CC="${CC:-clang}" ;;
|
|
*) error 'failed to set CC -- invalid CC (gcc/clang)' ;;
|
|
esac
|
|
|
|
baz_log 'checking dependencies'
|
|
baz_use lua "$CC" pkg-config make strip nproc
|
|
|
|
if [ -f Makefile ]; then
|
|
baz_log 'cleaning up'
|
|
make clean
|
|
rm -- Makefile
|
|
fi
|
|
|
|
baz_log 'configuring'
|
|
chmod a+rx ./configure
|
|
./configure --use-warnings --use-"$CC" --use-lto --use-optimise --use-pedantic --use-werror \
|
|
--use-strip --use-extreme-strip --use-march
|
|
|
|
baz_log 'Installing'
|
|
make -j"$(nproc --all)"
|
|
mkdir -p -- "$BAZP_SRC/commands"
|
|
mv -- yafetch "$BAZP_SRC/commands"
|