mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-22 03:52:52 +00:00
31 lines
614 B
Bash
31 lines
614 B
Bash
#!/bin/bash
|
|
|
|
cd /sources
|
|
tar xf ninja-1.11.0.tar.gz
|
|
cd ninja-1.11.0
|
|
|
|
export NINJAJOBS=4
|
|
|
|
sed -i '/int Guess/a \
|
|
int j = 0;\
|
|
char* jobs = getenv( "NINJAJOBS" );\
|
|
if ( jobs != NULL ) j = atoi( jobs );\
|
|
if ( j > 0 ) return j;\
|
|
' src/ninja.cc
|
|
|
|
python3 configure.py --bootstrap
|
|
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1
|
|
fi
|
|
|
|
./ninja ninja_test
|
|
./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
|
|
|
|
install -vm755 ninja /usr/bin/
|
|
install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
|
|
install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja
|
|
|
|
cd /sources
|
|
rm -rf ninja-1.11.0
|