mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 11:52:52 +00:00
Add 8.52 - Build ninja
This commit is contained in:
parent
0f1572658e
commit
7e096227d4
2 changed files with 43 additions and 0 deletions
31
scripts/chapter8/8.52-ninja.sh
Normal file
31
scripts/chapter8/8.52-ninja.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/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
|
|
@ -1162,3 +1162,15 @@ then
|
|||
stop_script "chapter8/8.51-wheel.sh"
|
||||
fi
|
||||
|
||||
# Chapter 8.52
|
||||
# ============
|
||||
echo "Building ninja"
|
||||
su -c "bash $SCRIPT/chapter8/8.52-ninja.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter8/8.52-ninja.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue