view pavement.py @ 63:4910bc49a182

set GC Zeal to 2 and fixed some bugs exposed by it.
author Atul Varma <varmaa@toolness.com>
date Thu, 25 Jun 2009 11:39:32 -0700
parents 0b66a265df13
children be61430630ab
line wrap: on
line source

import os
import subprocess
import shutil

from paver.easy import *

@task
def auto(options):
    objdir = os.path.join("..", "mozilla-stuff", "debug-firefox", "dist")
    objdir = os.path.abspath(objdir)
    incdir = os.path.join(objdir, "include")
    libdir = os.path.join(objdir, "lib")

    cmdline = ["g++",
               "-o", "spidermonkey-playground",
               "-I%s" % incdir, "-L.",
               "-g", # produce output for gdb
               "-DDEBUG",
               "spidermonkey-playground.cpp",
               "wrapper.cpp",
               "server_socket.cpp",
               "memory_profiler.cpp",
               "-lmozjs",
               "-lnspr4"]

    for dylib in ["mozjs", "plds4", "plc4", "nspr4"]:
        name = "lib%s.dylib" % dylib
        print "copying %s" % name
        shutil.copyfile(os.path.join(libdir, name),
                        "./%s" % name)

    print " ".join(cmdline)
    if subprocess.call(cmdline):
        raise Exception("build failed")