From 8447866a022498024808322b54af81e6f8c8c002 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 16 Jun 2022 15:07:51 +1000 Subject: Re arrange sledjchisl build script, so the json stuff is done right. --- src/BuildIt.sh | 67 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/src/BuildIt.sh b/src/BuildIt.sh index 883aa3b..448fe21 100755 --- a/src/BuildIt.sh +++ b/src/BuildIt.sh @@ -25,35 +25,6 @@ if [ ! -d build/fcgi2 ]; then make popd >/dev/null fi - -echo "" -echo "" - -if [ ! -d git-sub-modules/json-builder ]; then - pushd git-sub-modules >/dev/null - git clone https://github.com/json-parser/json-builder.git - popd >/dev/null -else - pushd git-sub-modules/json-builder >/dev/null - echo "Updating json-builder." -# git pull - popd >/dev/null -fi - -echo "" -echo "" - -if [ ! -d git-sub-modules/json-parser ]; then - pushd git-sub-modules >/dev/null - git clone https://github.com/json-parser/json-parser.git - popd >/dev/null -else - pushd git-sub-modules/json-parser >/dev/null - echo "Updating json-parser." -# git pull - popd >/dev/null -fi - echo "" echo "" @@ -136,14 +107,9 @@ if [ ! -d build/toybox ]; then ln -fs ../toys/sledjchisl/fcgi_SC.h build/toybox/lib ln -fs ../toys/boxes/handlekeys.c build/toybox/lib ln -fs ../toys/boxes/handlekeys.h build/toybox/lib - ln -fs ../../../git-sub-modules/json-builder/json-builder.c build/toybox/lib - ln -fs ../../../git-sub-modules/json-builder/json-builder.h build/toybox/lib - ln -fs ../../../git-sub-modules/json-parser/json.c build/toybox/lib - ln -fs ../../../git-sub-modules/json-parser/json.h build/toybox/lib pushd build/toybox >/dev/null sed -e "s/strend(/tb_strend(/g" -i lib/lib.h - sed -e 's//"json.h"/g' -i lib/json-builder.h find ./ -type f -name "*.c" -exec sed -e "s/strend(/tb_strend(/g" -i {} \; make clean #make defconfig @@ -155,6 +121,39 @@ fi echo "" echo "" +if [ ! -d git-sub-modules/json-builder ]; then + pushd git-sub-modules >/dev/null + git clone https://github.com/json-parser/json-builder.git + popd >/dev/null + sed -e 's//"json.h"/g' -i git-sub-modules/json-builder/json-builder.h + ln -fs ../../../git-sub-modules/json-builder/json-builder.c build/toybox/lib + ln -fs ../../../git-sub-modules/json-builder/json-builder.h build/toybox/lib +else + pushd git-sub-modules/json-builder >/dev/null + echo "Updating json-builder." +# git pull + popd >/dev/null +fi + +echo "" +echo "" + +if [ ! -d git-sub-modules/json-parser ]; then + pushd git-sub-modules >/dev/null + git clone https://github.com/json-parser/json-parser.git + popd >/dev/null + ln -fs ../../../git-sub-modules/json-parser/json.c build/toybox/lib + ln -fs ../../../git-sub-modules/json-parser/json.h build/toybox/lib +else + pushd git-sub-modules/json-parser >/dev/null + echo "Updating json-parser." +# git pull + popd >/dev/null +fi + +echo "" +echo "" + pushd build/toybox >/dev/null export CFLAGS="-I../luajit/src -I../fcgi2 -I../fcgi2/include -I../qlibc/include/qlibc $(mysql_config --cflags) -g3" export LDFLAGS="-L../luajit/src -L../fcgi2/libfcgi/.libs -L../qlibc/lib $(mysql_config --libs) -Wl,-E -l:libluajit.a -l:libqlibcext.a -l:libfcgi.a -l:libqlibc.a -lcrypto -luuid -lpthread -ldl" -- cgit v1.1