46 lines
1.7 KiB
Bash
Executable File
46 lines
1.7 KiB
Bash
Executable File
#!/bin/rc
|
|
|
|
rfork e
|
|
|
|
root=/sys/src/inbe
|
|
kroot=/sys/src/kryon
|
|
list=$root/build/plan9/generated-c-files.txt
|
|
tmp=/tmp/inbe-plan9-check.$pid
|
|
|
|
if(! test -f $list){
|
|
echo 'missing '^$list^'; run scripts/prepare-plan9-generated-c.py on the host first' >[1=2]
|
|
exit missing
|
|
}
|
|
|
|
if(! cd $root)
|
|
exit cd
|
|
|
|
includes=('-I/sys/src/kryon/src/platform/plan9/include' '-I/sys/src/kryon/include' '-I/sys/src/kryon/src' '-I/sys/src/kryon/src/ui' '-I/sys/src/inbe/build/plan9/include' '-I/sys/src/inbe/src' '-I/sys/src/inbe/src/app' '-I/sys/src/inbe/src/core' '-I/sys/src/inbe/src/screens' '-I/sys/src/inbe/src/screens/settings' '-I/sys/src/inbe/src/practices' '-I/sys/src/inbe/src/practices/whm' '-I/sys/src/inbe/src/practices/meditation' '-I/sys/src/inbe/src/practices/sun_salutation' '-I/sys/src/inbe/src/storage' '-I/sys/src/inbe/src/platform' '-I/sys/src/inbe/src/platform/android' '-I/sys/src/inbe/src/third_party' '-I/sys/src/inbe/vendor-builds/sqlite' '-I/sys/src/inbe/build/plan9/generated' '-I/sys/src/inbe/build/plan9/generated/src')
|
|
|
|
defs=('-DANDROID_BUILD=0' '-DPLATFORM_DESKTOP=1' '-DKRYON_BACKEND_LIBDRAW=1' '-DKRYON_PLATFORM_PLAN9=1' '-DKRYON_NATIVE_PLAN9=1' '-DUI_EMBEDDED_ONLY=1' '-DINBE_DISABLE_KRYON_FILE_DIALOG=1' '-DSQLITE_OS_OTHER=1' '-DSQLITE_THREADSAFE=0' '-DSQLITE_OMIT_LOAD_EXTENSION=1' '-DSQLITE_OMIT_WAL=1' '-DSQLITE_TEMP_STORE=3')
|
|
|
|
mkdir $tmp
|
|
files=$*
|
|
if(~ $#files 0)
|
|
files=`{cat $list}
|
|
|
|
for(f in $files){
|
|
base=`{basename $f .c}
|
|
echo cpp $f
|
|
if(! cpp -+ $includes $defs $f > $tmp/$base.i){
|
|
echo failed cpp $f >[1=2]
|
|
rm -rf $tmp
|
|
exit cpp
|
|
}
|
|
echo 8c $f
|
|
if(! 8c -FTVw -o $tmp/$base.8 -c $tmp/$base.i){
|
|
echo failed 8c $f >[1=2]
|
|
rm -rf $tmp
|
|
exit 8c
|
|
}
|
|
}
|
|
|
|
echo 'inbe generated Plan 9 check passed'
|
|
|
|
rm -rf $tmp
|