Beispiel #1
0
def generate(env):
    """add the correct xst builder to the environement"""
    #Everything I need should be within the env
    #print "In generate function"
    env["XST_COMMAND"] = _detect(env)
    #get the configuration file name
    #fn = env["CONFIG_FILE"]
    #if os.path.exists(fn):
    #    #if the configuration file name doesn't exists then
    #    #maybe it is at the base directory of the project
    #    fn = os.path.join(utils.get_project_base(), fn)

    config = utils.read_config(env)
    xst_utils.create_xst_project_file(config)
    script_filename = xst_utils.create_xst_script(config)
    report_filename = xst_utils.get_report_filename(config)
    ngc_filename = xst_utils.get_ngc_filename(config)

    env.SetDefault(
        XST_REPORT_FILE=report_filename,
        XST_SCRIPT_FILE=script_filename,
        XST_NGC_FILE=ngc_filename,

        #XST_COM = '$XST_COMMAND -intstyle ise -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"',
        XST_COM='$XST_COMMAND -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"',
        XST_COMSTR="")

    #print "Script Filename: %s" % script_filename
    #print "Report Filename: %s" % report_filename
    #print "NGC Filename: %s" % ngc_filename

    env.AddMethod(XST, 'xst')
    return None
def generate(env):
    """add the correct xst builder to the environement"""
    #Everything I need should be within the env
    #print "In generate function"
    env["XST_COMMAND"] = _detect(env)
    #get the configuration file name
    #fn = env["CONFIG_FILE"]
    #if os.path.exists(fn):
    #    #if the configuration file name doesn't exists then
    #    #maybe it is at the base directory of the project
    #    fn = os.path.join(utils.get_project_base(), fn)

    config = utils.read_config(env)
    xst_utils.create_xst_project_file(config)
    script_filename = xst_utils.create_xst_script(config)
    report_filename = xst_utils.get_report_filename(config)
    ngc_filename = xst_utils.get_ngc_filename(config)

    env.SetDefault(
        XST_REPORT_FILE = report_filename,
        XST_SCRIPT_FILE = script_filename,
        XST_NGC_FILE  = ngc_filename,

        #XST_COM = '$XST_COMMAND -intstyle ise -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"',
        XST_COM = '$XST_COMMAND -ifn "$XST_SCRIPT_FILE" -ofn "$XST_REPORT_FILE"',
        XST_COMSTR = ""
    )

    #print "Script Filename: %s" % script_filename
    #print "Report Filename: %s" % report_filename
    #print "NGC Filename: %s" % ngc_filename



    env.AddMethod(XST, 'xst')
    return None
 def test_create_xst_script(self):
     config = utils.read_config(self.env)
     xst_utils.create_xst_script(config)