linux 下 SpiderMonkey 1.7.0 编译和安装
发布于 6 年前 作者 liushaobo05 3330 次浏览 来自 分享

这个shell脚本将会自动下载源代码编译,然后把头文件和tbl文件拷贝到include目录,.so文件将拷贝到lib目录,还会把js(执行程序)拷贝到bin目录 #!/bin/bash if test “$USER” = root; then wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz cd js/src make -f Makefile.ref mkdir -p /usr/include/smjs/ -v cp *.{h,tbl} /usr/include/smjs/ -v cd Linux_All_DBG.OBJ cp *.h /usr/include/smjs/ -v mkdir -p /usr/local/{bin,lib}/ -v cp js /usr/local/bin/ -v cp libjs.so /usr/local/lib/ -v else echo "You must be root. Try sudo $0" fi [java] view plain copy

#!/bin/bash  
if test "$USER" = root; then  
    wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz  
    cd js/src  
    make -f Makefile.ref  
    mkdir -p /usr/include/smjs/ -v  
    cp *.{h,tbl} /usr/include/smjs/ -v  
    cd Linux_All_DBG.OBJ  
    cp *.h /usr/include/smjs/ -v  
    mkdir -p /usr/local/{bin,lib}/ -v  
    cp js /usr/local/bin/ -v  
    cp libjs.so /usr/local/lib/ -v  
else  
    echo "You must be root. Try sudo $0"  
fi
回到顶部