wscript
changeset 4115 ec4e46b9547b
parent 4114 a6c5ccfa3451
child 4118 1dfe215a2b73
equal deleted inserted replaced
4114:a6c5ccfa3451 4115:ec4e46b9547b
    39 VERSION = file("VERSION", "rt").read().strip()
    39 VERSION = file("VERSION", "rt").read().strip()
    40 APPNAME = 'ns'
    40 APPNAME = 'ns'
    41 
    41 
    42 wutils.VERSION = VERSION
    42 wutils.VERSION = VERSION
    43 wutils.APPNAME = APPNAME
    43 wutils.APPNAME = APPNAME
       
    44 
       
    45 #
       
    46 # The last part of the path name to use to find the regression traces.  The
       
    47 # path will be APPNAME + '-' + VERSION + REGRESSION_SUFFIX, e.g.,
       
    48 # ns-3-dev-ref-traces
       
    49 #
       
    50 REGRESSION_SUFFIX = "-ref-traces"
       
    51 
    44 
    52 
    45 # these variables are mandatory ('/' are converted automatically)
    53 # these variables are mandatory ('/' are converted automatically)
    46 srcdir = '.'
    54 srcdir = '.'
    47 blddir = 'build'
    55 blddir = 'build'
    48 
    56 
   191 
   199 
   192     # create the second environment, set the variant and set its name
   200     # create the second environment, set the variant and set its name
   193     variant_env = conf.env.copy()
   201     variant_env = conf.env.copy()
   194     variant_name = Options.options.build_profile
   202     variant_name = Options.options.build_profile
   195 
   203 
       
   204     # Check for the location of regression reference traces
   196     if Options.options.regression_traces is not None:
   205     if Options.options.regression_traces is not None:
   197         variant_env['REGRESSION_TRACES'] = os.path.abspath(Options.options.regression_traces)
   206         if os.path.isdir(Options.options.regression_traces):
       
   207             conf.check_message("regression traces location", '', True, ("%s (given)" % Options.options.regression_traces))
       
   208             variant_env['REGRESSION_TRACES'] = os.path.abspath(Options.options.regression_traces)
       
   209     else:
       
   210         traces = os.path.join('..', "%s-%s%s" % (APPNAME, VERSION, REGRESSION_SUFFIX))
       
   211         if os.path.isdir(traces):
       
   212             conf.check_message("regression reference traces", '', True, ("%s (guessed)" % traces))
       
   213             variant_env['REGRESSION_TRACES'] = os.path.abspath(traces)
       
   214         del traces
       
   215     if not variant_env['REGRESSION_TRACES']:
       
   216         conf.check_message("regression reference traces", '', False)
   198 
   217 
   199     if Options.options.enable_gcov:
   218     if Options.options.enable_gcov:
   200         variant_name += '-gcov'
   219         variant_name += '-gcov'
   201         variant_env.append_value('CCFLAGS', '-fprofile-arcs')
   220         variant_env.append_value('CCFLAGS', '-fprofile-arcs')
   202         variant_env.append_value('CCFLAGS', '-ftest-coverage')
   221         variant_env.append_value('CCFLAGS', '-ftest-coverage')