Linux HOWTOs

About | Home | Search


HOWTO: libjs
Description: Mozilla's C implementation of JavaScript
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# Mozilla SpiderMonkey 1.7.0
# ==========================
# This is the standalone JavaScript engine.  Use this when you only need
# to build libjs into an app (like gxine or gpac), but don't need the whole mozilla
# installation.

cd
test -f installed/js-1.7.0.tar.gz && mv installed/js-1.7.0.tar.gz .
test ! -f js-1.7.0.tar.gz &&
 wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "js-*" -exec rm -r {} \;
tar xzvf ~/js-1.7.0.tar.gz
mv -f js js-1.7.0
cd js-1.7.0
test $UID = 0 && chown -R root:root .
cd src
make  -f Makefile.ref BUILD_OPT=1

# Become root to install it
su

install -d /usr/local/include/js
install -m 644 Linux_All_OPT.OBJ/jsautocfg.h *.h *.tbl \
 /usr/local/include/js/
install Linux_All_OPT.OBJ/libjs.so /usr/local/lib/
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/js-*.tar.*
mv js-1.7.0.tar.gz installed/

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>