Merge branches/quickjs to trunk. This is the way.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3621 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-01-02 18:10:00 +00:00
parent d293637741
commit 79022e1e1f
703 changed files with 419987 additions and 30640 deletions

View File

@@ -6,62 +6,32 @@ set -e
version=`cat VERSION`
if [ "$1" = "-h" ] ; then
echo "release.sh [all]"
echo "release.sh [release_list]"
echo ""
echo "all: build all the archives. Otherwise only build the quickjs source archive."
echo "release_list: extras binary win_binary quickjs"
exit 1
fi
unicode="no"
tests="no"
binary="no"
quickjs="no"
release_list="extras binary win_binary quickjs"
if [ "$1" = "all" ] ; then
unicode="yes"
tests="yes"
binary="yes"
quickjs="yes"
elif [ "$1" = "binary" ] ; then
binary="yes"
else
quickjs="yes"
if [ "$1" != "" ] ; then
release_list="$1"
fi
#################################################"
# unicode data
# extras
if [ "$unicode" = "yes" ] ; then
if echo $release_list | grep -w -q extras ; then
d="quickjs-${version}"
name="quickjs-unicode-data-${version}"
name="quickjs-extras-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir $outdir/unicode
mkdir -p $outdir $outdir/unicode $outdir/tests
cp unicode/* $outdir/unicode
( cd /tmp && tar Jcvf /tmp/${name}.tar.xz ${d} )
fi
#################################################"
# all tests
if [ "$tests" = "yes" ] ; then
d="quickjs-${version}"
name="quickjs-tests-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir $outdir/test262o $outdir/test262 $outdir/tests
cp -a test262o/test $outdir/test262o
cp -a test262/test test262/harness $outdir/test262
cp -a tests/bench-v8 $outdir/tests
( cd /tmp && tar Jcvf /tmp/${name}.tar.xz ${d} )
@@ -69,32 +39,89 @@ cp -a tests/bench-v8 $outdir/tests
fi
#################################################"
# binary release
# Windows binary release
if [ "$binary" = "yes" ] ; then
if echo $release_list | grep -w -q win_binary ; then
d="quickjs-linux-x86_64-${version}"
name="quickjs-linux-x86_64-${version}"
# win64
dlldir=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
cross_prefix="x86_64-w64-mingw32-"
d="quickjs-win-x86_64-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
files="qjs qjsbn run-test262 run-test262-bn"
make CONFIG_WIN32=y qjs.exe
cp qjs.exe $outdir
${cross_prefix}strip $outdir/qjs.exe
cp $dlldir/libwinpthread-1.dll $outdir
make -j4 $files
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
strip $files
cp $files $outdir
make CONFIG_WIN32=y clean
( cd /tmp/$d && rm -f ../${name}.zip && zip -r ../${name}.zip . )
# win32
dlldir=/usr/i686-w64-mingw32/sys-root/mingw/bin
cross_prefix="i686-w64-mingw32-"
d="quickjs-win-i686-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
make clean
make CONFIG_WIN32=y clean
make CONFIG_WIN32=y CONFIG_M32=y qjs.exe
cp qjs.exe $outdir
${cross_prefix}strip $outdir/qjs.exe
cp $dlldir/libwinpthread-1.dll $outdir
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
fi
#################################################"
# Linux binary release
if echo $release_list | grep -w -q binary ; then
make clean
make CONFIG_WIN32=y clean
make -j4 qjs run-test262
make -j4 CONFIG_M32=y qjs32 run-test262-32
strip qjs run-test262 qjs32 run-test262-32
d="quickjs-linux-x86_64-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
cp qjs run-test262 $outdir
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
d="quickjs-linux-i686-${version}"
outdir="/tmp/${d}"
rm -rf $outdir
mkdir -p $outdir
cp qjs32 $outdir/qjs
cp run-test262-32 $outdir/run-test262
( cd /tmp/$d && rm -f ../${d}.zip && zip -r ../${d}.zip . )
fi
#################################################"
# quickjs
if [ "$quickjs" = "yes" ] ; then
if echo $release_list | grep -w -q quickjs ; then
make build_doc
@@ -112,13 +139,12 @@ cp Makefile VERSION TODO Changelog readme.txt release.sh unicode_download.sh \
libregexp.c libregexp.h libregexp-opcode.h \
libunicode.c libunicode.h libunicode-table.h \
libbf.c libbf.h \
jscompress.c unicode_gen.c unicode_gen_def.h \
bjson.c \
run-test262.c test262o.conf test262.conf test262bn.conf \
test262o_errors.txt test262_errors.txt test262bn_errors.txt \
unicode_gen.c unicode_gen_def.h \
run-test262.c test262o.conf test262.conf \
test262o_errors.txt test262_errors.txt \
$outdir
cp tests/*.js tests/*.patch $outdir/tests
cp tests/*.js tests/*.patch tests/bjson.c $outdir/tests
cp examples/*.js examples/*.c $outdir/examples