# HG changeset patch # User Richard Taylor # Date 1281600016 -3600 # Node ID a1925fb7753aa1b1de18e38d0d41766232186845 # Parent f70b728ea30c4a4ad5c951f584544cfafab7942d sbs version 2.15.0 diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/RELEASE-NOTES.html --- a/sbsv2/raptor/RELEASE-NOTES.html Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.html Thu Aug 12 09:00:16 2010 +0100 @@ -6,6 +6,29 @@

Release Notes for Symbian Build System v2

+

version 2.15.0

+ +

New Features

+ + +

Defect Fixes

+ +

version 2.14.2

Defect Fixes

diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/annofile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/bin/annofile.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,215 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Annofile class +# + +import xml.sax +import os + +class Annofile(xml.sax.handler.ContentHandler): + """A class to represent an emake anno file""" + + def __init__(self, name, maxagents=30): + self.name = name + self.overallAggregateTime = 0 + self.inJob = False + self.inMetricDuration = False + self.jobType = '' + self.nodes = set() + self.maxagents = maxagents + + parser = xml.sax.make_parser() + parser.setContentHandler(self) + try: + parser.parse(open(name)) + except xml.sax._exceptions.SAXParseException, e: + print "Error:\n" + str(e) + print "Ignore that file, parsing continues..." + + + def startElement(self, name, attrs): + if name == 'build': + # attrs.get() returns unicode type + self.cm = attrs.get('cm', '') + + elif name == 'job': + self.inJob = True + self.jobType = attrs.get('type', '') + + elif name == 'timing': + # Find agent number + node = attrs.get('node') + if node not in self.nodes: + self.nodes.add(node) + + # Calculate aggregate build time + # This is the sum of time spending on each node + # Ideally it equals the build time if there is + # only one node + time = float(attrs.get('completed')) \ + - float(attrs.get('invoked')) + self.overallAggregateTime += time + + # Calculate parse time + if self.inJob and self.jobType == 'parse': + self.parseTime = time + + elif name == 'metric': + if attrs.get('name') == 'duration': + self.inMetricDuration = True + + + def endElement(self, name): + if name == 'job': + self.inJob = False + elif name == 'metric': + if self.inMetricDuration: + self.inMetricDuration = False + + # Parse to the end of XML file + elif name == 'build': + self.doFinal() + + def characters(self, ch): + if self.inMetricDuration: + self.duration = ch + + + # Get class attributes + + def getParseTime(self): + """Get the time that emake spends on + parsing all makefiles + """ + return self.parseTime + + def getOverallDuration(self): + """Get the overall build duration""" + return float(self.duration) + + def getClusterManager(self): + return self.cm + + def getAggregateTime(self): + """This is the sum of time spending on each node. + Ideally it equals the build time if there is + only one node + """ + return self.overallAggregateTime + + # Calculate two efficiencies: + # first includes makefile parse time; second doesn't + def getEfficiency(self): + """100% means all nodes are busy from start to finish. + """ + at = self.getAggregateTime() + num = self.maxagents + d = self.getOverallDuration() + + idealDuration = at / num + if d != 0: + efficiency = round(idealDuration / d, 3) + else: + efficiency = 0 + + # This is efficiency WITHOUT counting makefile + # parsing time. Tempararily still useful. + pt = self.getParseTime() + idealD_wo = (at - pt) / num + if d != pt: + e_wo = round(idealD_wo / (d - pt), 3) + else: + e_wo = 0 + + #return str(efficiency * 100) + '%', str(e_wo * 100) + '%' + return efficiency, e_wo + + def doFinal(self): + report = open('anno_report.xml', 'a') + report.write("\n" % self.name) + report.write("\n" % len(self.nodes)) + report.write("\n" \ + % self.getParseTime()) + report.write("\n" \ + % self.getOverallDuration()) + report.write("\n" \ + % self.getAggregateTime()) + report.write("\n" \ + % self.getEfficiency()[0]) + report.write("\n" \ + % self.getEfficiency()[1]) + report.write("\n") + report.close() + + def __str__(self): + s = " \n" % len(self.nodes) + \ + " \n" % self.maxagents + \ + " \n" % self.getParseTime() + \ + " \n" % self.getOverallDuration() + \ + " \n" % self.getAggregateTime() + \ + " \n" % self.getEfficiency()[0] + \ + " \n" % self.getEfficiency()[1] + + return s + + + +if __name__ == '__main__': + + # Work around annoying DOCTYPE error by + # creating a dummy DTD file + if not os.path.exists('build.dtd'): + dummy = open('build.dtd', 'w') + dummy.close() + + ################## Edit this basepath ################ + basepath = '92_7952_201022_logs\\output\\logs' + ###################################################### + + # Find out all the annofiles + annofiles = [] + for dirpath, dirs, files in os.walk(basepath): + for f in files: + if f.endswith('.anno') or f.endswith('.anno.xml'): + annofiles.append(dirpath + '\\' + f) + + #print annofiles # debug + + # Parse all the annofiles and generate report + # Write XML header + report = open('anno_report.xml', 'w') + report.write('\n') + report.write("\n") + report.close() + # Parse each annofile + #num = 0 # debug + parser = xml.sax.make_parser() + for afilename in annofiles: + parser.setContentHandler(Annofile(afilename)) + try: + parser.parse(open(afilename)) + except xml.sax._exceptions.SAXParseException, e: + print "Error:\n" + str(e) + print "Ignore that file, parsing continues..." + + #num += 1 # only process num annofiles + #if num == 3: + # break + + # Write XML footer + report = open('anno_report.xml', 'a') + report.write("") + report.close() + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/grokbuild.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/bin/grokbuild.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,324 @@ +#!/usr/bin/env python +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# grokbuild +# + +""" +Gathers performance metrics from the logs of a complex multi-step build. +Supports Helium 9 at the moment but is adaptable. + +Can read from emake annotation files. +""" + +import sys +import os +import re +from optparse import OptionParser +import annofile +import datetime + + +class UndeterminedBuildID(Exception): + pass + +class LogfileNotFound(Exception): + pass + +class HeliumLog(object): + """ Some common properties of any log file in a helium build """ + filenamesuffix = None + + def __init__(self, logpath, buildid, options=None): + + self.logfilename = os.path.join(logpath, buildid + self.filenamesuffix) + self.buildid = buildid + self.options = options + + @classmethod + def findall(c, logpath): + """ Find all the logs that are of this type - essentially also finds all builds + which dumped their output in the same place """ + filename_re = re.compile('(.*/)?(?P[^\\\/]*)' + c.filenamesuffix) + logs = {} + for f in os.listdir(logpath): + m = filename_re.match(f) + if m: + file_buildid = m.groupdict()['buildid'] + logs[file_buildid] = os.path.join(logpath,f) + return logs + + + def __str__(self): + return "\n" % self.buildid + +class MainAntLog(HeliumLog): + """ This is the primary log of the helium build. Useful for obtaining the total build time. Not good for this if the build failed. """ + # output/logs/92_7952_201020_003_main.ant.log + filenamesuffix = "_main.ant.log" + timeformat = "%Y/%m/%d %H:%M:%S:%f" # e.g. Thu 2010/06/24 09:15:42:625 AM + + def __init__(self, logpath, buildid, options=None): + super(MainAntLog,self).__init__(logpath, buildid, options) + + # Starting logging into y:\output\logs\mcl_7901_201024_20100623181534_main.ant.log at Wed 2010/06/23 21:16:12:972 PM + # Stopping logging into y:\output\logs\mcl_7901_201024_20100623181534_main.ant.log from hlm:record task at Thu 2010/06/24 09:15:42:625 AM + + start_re = re.compile("Starting logging into [^ ]+ at ... ([^ ]+ +[^ ]+) .*") + stop_re = re.compile("Stopping logging into [^ ]+ from [^ ]+ task at ... ([^ ]+ +[^ ]+) (AM)|(PM).*") + start_time = None + stop_time = None + with open(self.logfilename) as f: + for l in f: + if start_time is None: + m = start_re.match(l) + if m: + #sys.stderr.write("start TIME: %s\n" %m.groups()[0]) + start_time = datetime.datetime.strptime(m.groups()[0], self.timeformat) + + else: # if there are many stop lines then make sure the last one overrides the others + m = stop_re.match(l) + if m: + stop_time = datetime.datetime.strptime(m.groups()[0], self.timeformat) + #sys.stderr.write("stop TIME: %s\n" %m.groups()[0]) + + #sys.stderr.write("build start/stop: %s / %s from %s\n" % (start_time, stop_time, self.logfilename)) + build_duration = stop_time - start_time # returns a timedelta object + self.build_duration = build_duration.seconds + 86400 * build_duration.days # seconds + + def __str__(self): + return "\n" % self.build_duration + +class AntEnvLog(HeliumLog): + # output/logs/92_7952_201020_003_ant_env.log + filenamesuffix = "_ant_env.log" + + def __init__(self, logpath, buildid): + super(AntEnvLog,self).__init__(logpath, buildid) + +class TargetTimesLog(HeliumLog): + """Very useful timing data from Ant but does not get created in all builds by default (must be configured""" + # output/logs/92_7952_custom_dilbert_201022_dilbert_targetTimesLog.csv + filenamesuffix = "_targetTimesLog.csv" + + def __init__(self, logpath, buildid): + super(TargetTimesLog,self).__init__(logpath, buildid) + self.raptorsecs = 0 + self.totalsecs = 0 + + with open(self.logfilename) as f: + for ll in f: + l = ll.rstrip("\n") + #print self.logfilename + #print "L:",l + (rname, rsecs) = l.split(",") + rsecs = int(rsecs) + #print "rname, rsecs: %s %d"%(rname,rsecs) + self.totalsecs += rsecs + if rname == "compile-sbs": + self.raptorsecs += rsecs + + def __str__(self): + s = "" % self.totalsecs \ + + "\n\n" % self.raptorsecs + return s + +class RaptorAnnofile(object): + """Thin wrapper around the annofile class to make it relevant to this utility.""" + # Examples: + # 92_7952_custom_dilbert_201022_dilbert_dfs_build_sf_tools_all.resource.emake.anno + # 92_7952_custom_dilbert_201022_dilbert_dfs_build_sf_dfs_variants.default.emake.anno + # 92_7952_201022_003_dfs_build_ncp_dfs_variants.resource_deps.emake.anno + def __init__(self, filename, buildid, maxagents): + self.phase = "" + self.filename = filename + self.buildid = buildid + + self.annofile = annofile.Annofile(self.filename, maxagents) + + def __str__(self): + return "\n%s\n" \ + % (os.path.basename(self.filename), self.phase, str(self.annofile)) + + +class RaptorBuild(HeliumLog): + """Any Raptor logfile. Mainly used for getting the names of the + annotation files which the annofile parser will use. Also gets + the version of raptor and the total time taken by this particular + invocation of Raptor""" + def __init__(self, logpath, buildid, build, options=None): + self.filenamesuffix = '_%s' % build + super(RaptorBuild,self).__init__(os.path.join(logpath, "compile"), buildid, options) + self.build = build + + if not os.path.isfile(self.logfilename): + raise LogfileNotFound("missing log file: %s\n" % self.logfilename) + + self.annofile_refs = [] + self.build_duration = None + + status_re = re.compile("Executing.*--emake-annofile=([^ ]+)") + emake_maxagents_re = re.compile("--emake-maxagents=(\d+)") + sbs_version_re = re.compile("sbs: version ([^\n\r]*)") + run_time_re = re.compile("Run time ([0-9]+) seconds") + + self.recipes = { 'TOTAL':0, 'ok':0, 'failed':0, 'retry':0 } + + with open(self.logfilename) as f: + sys.stderr.write(" parsing build log %s\n" % os.path.split(self.logfilename)[1]) + for l in f: + # match in order of likelihood (most probable first) + + m = status_re.match(l) + if m: + self.recipes['TOTAL'] += 1 + status = m.group(1) + try: + self.recipes[status] += 1 + except KeyError: + sys.stderr.write("unknown recipe status '%s'" % status) + continue + + m = emake_invocation_re.match(l) + if m: + (adir, aname) = os.path.split(m.group(1)) + if aname.find("pp")==-1: # no parallel parsing ones preferably + sys.stderr.write(" found annotation file %s\n" % aname) + + # if --emake-maxagents is present then use that, otherwise use + # the value passed in through the options. + m = emake_maxagents_re.match(l) + if m: + maxagents = int(m.group(1)) + else: + maxagents = options.maxagents + sys.stderr.write(" using maxagents %d as there is no record in the logs\n" % maxagents) + + self.annofile_refs.append( (os.path.join(logpath, "makefile", aname), maxagents) ) + continue + + m = run_time_re.match(l) + if m: + self.build_duration = int(m.group(1)) + continue + + m = sbs_version_re.match(l) + if m: + self.version = m.group(1) + + self.annofiles = [] + for p in self.annofile_refs: + self.annofiles.append(RaptorAnnofile(p[0], buildid, p[1])) + + def __str__(self): + recipes = [" \n" % x for x in self.recipes.items()] + + return "\n" % os.path.split(self.logfilename)[-1] + \ + " \n" % (self.version) + \ + " \n" % (self.build, self.build_duration) + \ + "".join(recipes) + \ + "".join([str(a) for a in self.annofiles]) + \ + "\n" + + + +class HeliumBuild(object): + """A build with any version of Helium""" + def __init__(self, logpath, buildid, options=None): + self.options = options + self.buildid = buildid + self.logpath = logpath + self.logfiles=[] + + def __str__(self): + return self.buildid + \ + "\n"+[str(a) for a in self.annofiles] + "\n" + +class Helium9Build(HeliumBuild): + """ Filenames, structure etc conform to Helium 9 """ + def __init__(self, logpath, buildid, options=None): + super(Helium9Build,self).__init__(logpath, buildid, options) + self.mainantlog = MainAntLog(logpath, buildid, options) + self.raptorbuilds = [] + + # mcl_7901_201024_20100623181534_dfs_build_ncp_variants.build_input_compile.log + # mcl_7901_201024_20100623181534_dfs_build_sf_variants.build_input_compile.log + # mcl_7901_201024_20100623181534_dfs_build_winscw_dfs_build_winscw_input_compile.log + # + # ....but the problem is that the anno files have a slightly differing convention: + # 92_7952_201022_003_dfs_build_ncp_dfs_variants.resource_deps.emake.anno + # _dfs_build_ncp_variants + # _dfs_build_ncp_dfs_variants + # read the annofile names from inside the raptor log output + for r in ["dfs_build_ncp_variants.build_input_compile.log","dfs_build_sf_variants.build_input_compile.log","dfs_build_winscw_dfs_build_winscw_input_compile.log", "ncp_symbian_build_symtb_input_compile.log"]: + try: + self.raptorbuilds.append(RaptorBuild(logpath, buildid, r, options)) + except LogfileNotFound, ex: + sys.stderr.write(str(ex)) + + def __str__(self): + + raptor_duration = reduce(lambda x, y: x + y,[y.build_duration for y in self.raptorbuilds],0) + return "\n" % (self.buildid) + \ + "\n" % (self.mainantlog.build_duration) + \ + "\n" % (raptor_duration) + \ + "".join([str(a) for a in self.raptorbuilds ]) + \ + "\n" + + +class HeliumLogDir(object): + """Multiple builds can be done one after another (usually when rebuilding + things that failed, apparently) and their logs left in the output dir. + The naming convention ensures that they don't overwrite each other. + This class identifies each build and tries to analyse them one by one.""" + def __init__(self, epocroot, options=None): + self.logpath = os.path.join(epocroot, "output/logs") + logs = MainAntLog.findall(self.logpath) + self.builds = [] + + for b in logs.keys(): + try: + sys.stderr.write(" Found build with id %s\n" % b) + build = Helium9Build(self.logpath, b, options) + self.builds.append(build) + except IOError,e: + sys.stderr.write(" Buildid %s found but does not refer to a complete build\n" % b) + sys.stderr.write(str(e)+"\n") + + def write(self, stream): + for b in self.builds: + stream.write(str(b)+"\n") + + +parser = OptionParser(prog = "grokbuild", + usage = """%prog [-h | options] path_to_EPOCROOT + +The build logs are usually in $EPOCROOT/output/logs""") + +parser.add_option("--maxagents", type="int", dest="maxagents", default=30, + help="The number of simultaneous agents used in the build. You need to supply this if --emake-class was used rather than --emake-maxagents since this is then a property of the build cluster and is not usually recorded in the logs. The default is %default." + ) +(options, args) = parser.parse_args() + +if len(args) == 0: + sys.stderr.write("Need at least one argument: a path to the logs.\n") + sys.exit(-1) + +epocroot = args[0] +sys.stderr.write("Gathering Performance Metrics for %s\n" % epocroot) + +b = HeliumLogDir(epocroot, options) +b.write(sys.stdout) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/recipestats.py --- a/sbsv2/raptor/bin/recipestats.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/bin/recipestats.py Thu Aug 12 09:00:16 2010 +0100 @@ -31,6 +31,7 @@ def add(self, duration): self.time += duration + self.count += 1 class BuildStats(object): STAT_OK = 0 diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/sbs --- a/sbsv2/raptor/bin/sbs Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/bin/sbs Thu Aug 12 09:00:16 2010 +0100 @@ -102,9 +102,10 @@ export PYTHONPATH=$($u "$SBS_PYTHONPATH") fi else - export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib} - PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH - LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH + PYDIR=python27 # not exported on purpose + export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib} + PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH + LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH export PATH LD_LIBRARY_PATH __PYTHON__=python diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/sbs_filter --- a/sbsv2/raptor/bin/sbs_filter Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/bin/sbs_filter Thu Aug 12 09:00:16 2010 +0100 @@ -64,10 +64,11 @@ # prevent raptor from potentially creating read-only files: export CYGWIN='nontsec nosmbntsec' -else - export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib} - PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH - LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/python262/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH +else + PYDIR=python27 # not exported on purpose + export PYTHONPATH=${SBS_PYTHONPATH:-$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib} + PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/bin:$SBS_HOME/$HOSTPLATFORM_DIR/bin:$PATH + LD_LIBRARY_PATH=$SBS_HOME/$HOSTPLATFORM_DIR/$PYDIR/lib:$SBS_HOME/$HOSTPLATFORM_DIR/bv/lib:$LD_LIBRARY_PATH export PATH LD_LIBRARY_PATH __PYTHON__=python diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/sbs_filter.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/sbs_filter.py diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/sbs_index.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/bin/sbs_index.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,144 @@ +#!/usr/bin/python + +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Symbian Foundation License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# Tie together a set of HTML build summaries by creating a single index page +# which shows the total number of Errors, Warnings etc. across all the parts +# of the build and links to the individual summaries. + +import os +import sys + +# get the absolute path to this script +script = os.path.abspath(sys.argv[0]) +bindir = os.path.dirname(script) +# add the Raptor python and plugins directories to the PYTHONPATH +sys.path.append(os.path.join(bindir, "..", "python")) +sys.path.append(os.path.join(bindir, "..", "python", "plugins")) + +if len(sys.argv) < 3: + sys.stderr.write("""usage: %s input_dir1 [input_dir2...] output_index_file + +The input directories are scanned recursively for totals.txt files and all +those found are added to the generated index. +""" % os.path.basename(script)) + sys.exit(1) + +roots = [] +for a in sys.argv[1:-1]: + if os.path.isdir(a): + roots.append(a) + else: + sys.stderr.write("warning: %s is not a directory\n" % a) + +indexfile = sys.argv[-1] +indexdir = os.path.dirname(indexfile) + +def findtotals(dirs, files): + "recurse directories until we find a totals.txt file." + sub = [] + for d in dirs: + name = os.path.join(d, "totals.txt") + if os.path.isfile(name): + files.append(name) + else: + for s in os.listdir(d): + dir = os.path.join(d,s) + if os.path.isdir(dir): + sub.append(dir) + if sub: + findtotals(sub, files) + +totals = [] +findtotals(roots, totals) +totals.sort() + +# look for a style file we can link to +css = "style.css" +for t in totals: + c = os.path.join(os.path.dirname(t),"style.css") + if os.path.isfile(c): + css = os.path.relpath(c, indexdir) + break + +# write the header of the index +import filter_html +try: + index = open(indexfile, "w") + index.write(""" + +Raptor Build Index + + + +

Raptor Build Index

+ +""" % css) + + for i in filter_html.Records.TITLES: + index.write('' % i) + index.write("") +except: + sys.stderr.write("error: cannot write index file %s\n" % indexfile) + sys.exit(1) + +import csv +grandtotal = [0 for i in filter_html.Records.TITLES] + +for t in totals: + columns = [] + try: + reader = csv.reader(open(t, "rb")) + for row in reader: + type = int(row[0]) + style = row[1] + count = int(row[2]) + if count == 0 or filter_html.Records.SUBDIRS[type] == style: + grandtotal[type] += count + columns.append((style,count)) + else: + sys.stderr.write("warning: %s appears to be corrupt or out of date\n" % t) + except: + sys.stderr.write("warning: %s could not be read\n" % t) + + if len(columns) == len(filter_html.Records.TITLES): + try: + linktext = os.path.dirname(t) + linkname = os.path.relpath(os.path.join(linktext, "index.html"), indexdir) + index.write('' % (linkname, linktext)) + for (style, count) in columns: + index.write('' % (style, count)) + index.write("") + except: + sys.stderr.write("error: cannot write index file %s\n" % indexfile) + sys.exit(1) + +# finish off +try: + index.write('') + for i, count in enumerate(grandtotal): + if count == 0: + index.write('') + else: + index.write('' % (filter_html.Records.SUBDIRS[i], count)) + index.write("
build%s
%s%d
 
total0%d
") + index.write("\n") + index.close() + +except: + sys.stderr.write("error: cannot close index file %s\n" % indexfile) + sys.exit(1) + +sys.exit(0) \ No newline at end of file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/bin/timelines.py diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/arm.xml --- a/sbsv2/raptor/lib/config/arm.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/arm.xml Thu Aug 12 09:00:16 2010 +0100 @@ -18,9 +18,20 @@ - + + + + + + + + + + + + @@ -38,11 +49,13 @@ - + + + @@ -56,19 +69,18 @@ + - - - + @@ -135,8 +147,8 @@ - - + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/gcc.xml --- a/sbsv2/raptor/lib/config/gcc.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/gcc.xml Thu Aug 12 09:00:16 2010 +0100 @@ -16,7 +16,12 @@ + + + + + @@ -43,7 +48,7 @@ - + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/gcc_x86.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/config/gcc_x86.xml Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/gcce.xml --- a/sbsv2/raptor/lib/config/gcce.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/gcce.xml Thu Aug 12 09:00:16 2010 +0100 @@ -14,7 +14,7 @@ - + @@ -37,21 +37,20 @@ - - - + - + + @@ -90,6 +89,7 @@ + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/gccxml.xml --- a/sbsv2/raptor/lib/config/gccxml.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/gccxml.xml Thu Aug 12 09:00:16 2010 +0100 @@ -19,12 +19,15 @@ + + + + - @@ -35,7 +38,6 @@ - @@ -45,6 +47,10 @@ + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/interfaces.xml --- a/sbsv2/raptor/lib/config/interfaces.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/interfaces.xml Thu Aug 12 09:00:16 2010 +0100 @@ -4,32 +4,32 @@ - - - - - - + - - - - - - + + + - - - - + + - - + + + + + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/locations.xml --- a/sbsv2/raptor/lib/config/locations.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/locations.xml Thu Aug 12 09:00:16 2010 +0100 @@ -101,7 +101,7 @@ - + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/logfile_regex.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/config/logfile_regex.csv Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,37 @@ +priority,regex,modifiers +ERROR,error\s*:,ignorecase +ERROR,ERROR\t, +ERROR,cannot create regular file, +ERROR,Missing file:, +ERROR,is not recognized as an internal or external command, +ERROR,MISSING:, +ERROR,fatal error, +ERROR,warning U4010, +ERROR,Internal fault, +ERROR,target .* given more than once in the same rule, +ERROR,[Nn]o such file or directory, +ERROR,Exception: [A-Z0-9_]+, +ERROR,ERROR EC\d+:, +ERROR,Errors caused tool to abort, +ERROR,Traceback \(most recent call last\), +ERROR,Application encountered an unexpected error, +ERROR,Unable to write dump file, +ERROR,Unable to connect to CM:, +ERROR,: Incorrect, +ERROR,The system cannot find the path specified, +ERROR,[Ww]arning:?\s+(#111-D|#1166-D|#117-D|#128-D|#1293-D|#1441-D|#170-D|#174-D|#175-D|#185-D|#186-D|#223-D|#231-D|#257-D|#284-D|#368-D|#414-D|#430-D|#47-D|#514-D|#546-D|#68-D|#69-D|#830-D|#940-D|#836-D|A1495E|L6318W|C2874W|C4127|C4355|C4530|C4702|C4786|LNK4049), +REMARK,No feature macros were found in the source, +REMARK,is shorter than expected, +REMARK,Command line warning D4025 :, +REMARK,REMARK:, +REMARK,EventType:\s+Error\s+Source:\s+GNU\s+Make, +REMARK,: note:, +WARNING,\(\d+\) : warning C, +WARNING,mwld.exe:, +WARNING,Command line warning, +WARNING,ERROR: bad relocation:, +WARNING,\d+ warning, +WARNING,EventType:\s+Error\s+Source:\s+SweepNT, +WARNING,WARN\t, +WARNING,LINK : warning, +WARNING,warning\s*:,ignorecase diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/msvc.xml --- a/sbsv2/raptor/lib/config/msvc.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/msvc.xml Thu Aug 12 09:00:16 2010 +0100 @@ -18,7 +18,12 @@ + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/rvct.xml --- a/sbsv2/raptor/lib/config/rvct.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/rvct.xml Thu Aug 12 09:00:16 2010 +0100 @@ -27,15 +27,13 @@ - - - + @@ -43,6 +41,7 @@ + @@ -76,6 +75,7 @@ + @@ -99,7 +99,6 @@ - diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/variants.xml --- a/sbsv2/raptor/lib/config/variants.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/variants.xml Thu Aug 12 09:00:16 2010 +0100 @@ -136,7 +136,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -194,7 +194,7 @@ - + @@ -205,6 +205,18 @@ + + + + + + + + + + + + @@ -223,6 +235,10 @@ + + + + @@ -265,4 +281,10 @@ + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/winscw.xml --- a/sbsv2/raptor/lib/config/winscw.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/config/winscw.xml Thu Aug 12 09:00:16 2010 +0100 @@ -27,14 +27,15 @@ + + + + + - + - - - - @@ -43,15 +44,21 @@ - - + - + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/config/x86.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/config/x86.xml Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/base.xml --- a/sbsv2/raptor/lib/flm/base.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/base.xml Thu Aug 12 09:00:16 2010 +0100 @@ -15,7 +15,6 @@ - diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Thu Aug 12 09:00:16 2010 +0100 @@ -11,7 +11,7 @@ # Contributors: # # Description: -# ARMv5 EXE/DLL ABIv2 Function Like Makefile (FLM) +# E32 EXE/DLL ABIv2 Function Like Makefile (FLM) # Knows how to build all possible ABIV2 executables for ARM # # @@ -80,9 +80,13 @@ IMPORTLIBPATH:=$(RUNTIME_LIBS_PATH) # LOCALLY USED VARIABLES +ADDITIONAL_LIBS:= CLEANTARGETS:= WHATRELEASE:= +LIBRARIES:=$(patsubst %.dso,%.$(IMPLIB_EXTENSION),$(LIBRARY)) +LIBRARIES_DEBUG:=$(patsubst %.dso,%.$(IMPLIB_EXTENSION),$(LIBRARY_DEBUG)) + # Work out which new/delete library to use for binaries. CHECKLIB_TYPE:=symc++ STDCPPTAGFILE:= @@ -164,12 +168,12 @@ IMPORTLIBTARGET_DSO:= IMPORTLIBTARGETVERSIONED_DSO:= - BUILDMARKER_IMPORTLIBTARGET_DSO:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).dso - WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).dso) - WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).dso + BUILDMARKER_IMPORTLIBTARGET_DSO:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).$(IMPLIB_EXTENSION) + WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).$(IMPLIB_EXTENSION)) + WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).$(IMPLIB_EXTENSION) ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_DSO)),) - IMPORTLIBTARGET_DSO:=$(TMP_IMPORTLIBTARGET_ROOT).dso - IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso + IMPORTLIBTARGET_DSO:=$(TMP_IMPORTLIBTARGET_ROOT).$(IMPLIB_EXTENSION) + IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).$(IMPLIB_EXTENSION) endif # ABIv1 .lib (for specific kits and toolchains only) @@ -247,12 +251,16 @@ else DSODEFFILENAMEBASE:=$(TARGET){$(VERSIONHEX)} endif -GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).dso) +GENERATED_DSO:=$(call dblquote,$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).$(IMPLIB_EXTENSION)) GENERATED_DEFFILE:=$(INTERMEDIATEPATH)/$(DSODEFFILENAMEBASE).def ## IMPORT LIBRARY ########################################################### # Static libraries will be postlinked when they are used so don't try to postlink them +ifeq ($(e32importlib_mk),) + e32importlib_mk:=1 + include $(FLMHOME)/e32importlib.mk +endif ifneq ($(IMPORTLIBRARYREQUIRED),) ifneq ($(or $(DEFFILE),$(EXPORTUNFROZEN)),) @@ -263,13 +271,7 @@ ifeq ($(EXPORTUNFROZEN),) PREPPEDDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).prep CLEANTARGETS:=$(CLEANTARGETS) $(PREPPEDDEFFILE) - define importlibtarget_prepfile - $(PREPPEDDEFFILE): $(DEFFILE) - $(call startrule,importlibtarget_prepfile,FORCESUCCESS) \ - $(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \ - $(call endrule,importlibtarget_prepfile) - endef - $(eval $(importlibtarget_prepfile)) + $(eval $(importlibtarget_prepfile_$(BASE_ARCH))) endif endif @@ -299,8 +301,6 @@ endif - - ifneq ($(EXPORTUNFROZEN),) # Unfrozen - warn and create .dso as side-effect of the final postlink $(info EXPORTUNFROZEN present in $(PROJECT_META) - unfrozen exports will be represented in import library. ) define importlibtarget_unfrozen @@ -339,16 +339,7 @@ $(eval $(importlibtarget_func)) endif - define importlibtargetversioned_func - $(IMPORTLIBTARGETVERSIONED_DSO): $(ELF2E32) $(PREPPEDDEFFILE) - $(call startrule,importlibversioned,FORCESUCCESS) \ - $(ELF2E32) --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) --version=$(VERSION) \ - --definput="$(PREPPEDDEFFILE)" \ - --dso=$$(call dblquote,$$@) \ - --linkas=$(call dblquote,$(LINKASVERSIONED)) \ - $(call endrule,importlibversioned) - endef - $(eval $(importlibtargetversioned_func)) + $(eval $(importlibtargetversioned_$(BASE_ARCH))) endif # ifneq ($(DEFFILE),) endif # ifneq ($(EXPORTUNFROZEN),) endif # ifneq ($(IMPORTLIBTARGET_DSO),) @@ -445,11 +436,11 @@ EXPTARGETASMFILE:=$(INTERMEDIATE_PLATFORM_PATH)/$(notdir $(VER_E32IMPORTLIBBASE)).s define e32expgen_func -$(EXPTARGET): $(DEFFILE) $(ELF2E32) +$(EXPTARGET): $(DEFFILE) $(POSTLINKER) $(call startrule,expgen) \ - $(ELF2E32) \ + $(POSTLINKER) \ --definput=$$(call dblquote,$(DEFFILE)) \ - --dump=a \ + --dump=a $(if $(POSTLINKER_SUPPORTS_ASMTYPE),$(POSTLINKER_ASM_OPTION),) \ --output=$(call dblquote,$(EXPTARGETASMFILE)) && \ $(ASM) $(TARGET_ARCH_OPTION) $(AAPCS_OPTION) $(ASM_OUTPUT_OPTION) $$(call dblquote, $$@) $(EXPTARGETASMFILE) \ $(call endrule,expgen) @@ -573,12 +564,11 @@ $(call groupin10,$(LINKOBJECTS)) ;) $(call startrule,ar,FORCESUCCESS) \ $$(call dblquote,$(AR)) $(ARCHIVER_CREATE_OPTION) $$@ $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT),$(COMMANDFILE_OPTION)$(VIAFILE)) \ - $(if $(DUMPBCINFO),&& $(FROMELF) -v $$@ > $$@.elfdump,) \ $(call endrule,ar) endef $(eval $(artarget_func)) -CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) $(if $(DUMPBCINFO),$(ARTARGET).elfdump,) +CLEANTARGETS:=$(CLEANTARGETS) $(VIAFILE) endif @@ -599,18 +589,18 @@ REDUCED_RUNTIME_LIBS_LIST:=$(subst $(TARGET).dso,,$(RUNTIME_LIBS_LIST)) ifeq ($(VARIANTTYPE),udeb) - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) else - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) endif else # NORMAL # ifeq ($(VARIANTTYPE),udeb) - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES_DEBUG)) else - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES)) endif ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1) e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(NEWLIB)) @@ -621,9 +611,9 @@ else # ARM RUNTIME LIBS ifeq ($(VARIANTTYPE),udeb) - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(located_ARMLIBS) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES_DEBUG)) $(located_ARMLIBS) else - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(located_ARMLIBS) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARIES)) $(located_ARMLIBS) endif endif @@ -632,9 +622,41 @@ # commandline which would defeat the purpose of groupin10. # This is undesirable because viafile generation commands appear # outside the relevant tags but it is also unavoidable. + +ifeq ($(e32link_mk),) + e32link_mk:=1 + include $(FLMHOME)/e32link.mk +endif + +# Some configurations inject exports into the final binary by creating a .lib.exp file that is then fed to +# the linker. How this .lib.exp is generated depends on whether a .def file is listed to control the build +# or not. Either way, the .lib.exp is guarded so as to only be generated once. +ifneq ($(FIX_EXPORTS_USING_EXP_FILE),) + BUILDMARKER_EXPFILE:=$(call sanitise,EXPFILE_$(TARGET).lib.exp) + ifeq ($(DEFFILE),) + ifneq ($(AUTOEXPORTS),) + ifeq ($($(BUILDMARKER_EXPFILE)),) + $(eval $(call e32link_genlibexpfile,exports)) + $(eval $(BUILDMARKER_EXPFILE):=$(INTERMEDIATEPATH)/$(TARGET).lib.exp) + endif + endif + else + ifeq ($($(BUILDMARKER_EXPFILE)),) + $(eval $(call e32link_genlibexpfile,deffile)) + $(eval $(BUILDMARKER_EXPFILE):=$(INTERMEDIATEPATH)/$(TARGET).lib.exp) + endif + endif + ADDITIONAL_LIBS:=$($(BUILDMARKER_EXPFILE)) +endif + +ifeq ($(e32postlink_mk),) + e32postlink_mk:=1 + include $(FLMHOME)/e32postlink.mk +endif + define linktarget_func ## The actual link target, dependencies and build step -$(E32TARGET): $(POSTLINKDEFFILE) $(ELF2E32) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(e32abiv2_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB +$(E32TARGET): $(POSTLINKDEFFILE) $(POSTLINKER) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(e32abiv2_LIBS) $(ADDITIONAL_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB $(if $(MULTIFILE_ENABLED),,@echo -n "" > $(VIAFILE); $(call groupin10,$(LINKOBJECTS)) ;) $(call startrule,linkandpostlink) \ @@ -642,11 +664,15 @@ $(if $(SUPPORTS_STDCPP_NEWLIB),$(if $(located_STATICLIBRARIES),$(CHECKLIB) $(CHECKLIB_TYPE) --elf $(call dblquote,$(located_STATICLIBRARIES)) &&,),) \ $(LD) $(LINKER_MISC_FLAGS) $(LINKER_DEFAULT_LIB_PATHS) $(SYMBIAN_LINK_FLAGS) $(if $(DEBUG_INFO),$(LINKER_DEBUG_OPTION),$(LINKER_NODEBUG_OPTION)) \ $(if $(ARMLIBS),$(LD_WARNINGS_SUPPRESSION_ARMLIBS),) \ - $(SHARED_OBJECT_OPTION) $(SPLIT_OPTION) \ + $(if $(findstring EXE,$(POSTLINKTARGETTYPE)),$(if $(TREAT_EXES_AS_SHARED),$(SHARED_OBJECT_OPTION),),$(SHARED_OBJECT_OPTION)) \ + $(SPLIT_OPTION) \ $(RW_BASE) \ $(LINKER_ARCH_OPTION) \ - $(SYMVER_OPTION) $(SO_NAME_OPTION)=$(call dblquote,$(LINKASVERSIONED)) \ - $(LINKER_ENTRYPOINT_SETTING) \ + $(SYMVER_OPTION) \ + $(if $(SO_NAME_OPTION),$(SO_NAME_OPTION)=$(call dblquote,$(LINKASVERSIONED)),) \ + $(LINKER_ENTRY_OPTION)=$(LINKER_ENTRYPOINT_SETTING) \ + $(if $(NEED_ENTRYPOINT_LIBRARY),$(LINKER_ENTRYPOINT_LIBDEP),) \ + $(if $(ADDITIONAL_LIBS),$(call dblquote,$(ADDITIONAL_LIBS)),) \ -o $$(call dblquote,$(LINK_TARGET)) \ $(if $(LTCG),$(LTCG_OPTION),) \ $(LINKER_SYMBOLS_OPTION) $(LINKER_SYMBOLS_FILE_OPTION)=$(call dblquote,$(MAPFILE)) \ @@ -655,44 +681,7 @@ $(if $(GENERATELINKERFEEDBACK),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \ $(if $(LINKER_ADD_STATIC_RUNTIME),$(if $(STATIC_RUNTIME_LIB),$(LINKER_GROUP_START_OPTION) $(STATIC_RUNTIME_DIR)/$(STATIC_RUNTIME_LIB) $(LINKER_GROUP_END_OPTION),)) \ $(call dblquote,$(e32abiv2_LIBS)) $(LINKER_DEFAULT_LIBS) && \ - $(ELF2E32) \ - --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ - --version=$(VERSION) \ - --capability=$(FINAL_CAPABILITIES) \ - --linkas=$(call dblquote,$(LINKASVERSIONED)) \ - --fpu=$(POSTLINKER_FPU) \ - --targettype=$(POSTLINKTARGETTYPE) \ - --output=$$(call dblquote,$$@) \ - --elfinput=$(call dblquote,$(LINK_TARGET)) \ - $(if $(UID1),--uid1=0x$(UID1),) \ - $(if $(UID2),--uid2=0x$(UID2),) \ - $(if $(UID3),--uid3=0x$(UID3),) \ - $(if $(VENDORID),--vid=0x$(VENDORID),) \ - $(if $(EXPTARGET),--customdlltarget,) \ - $(if $(ARMLIBS),--excludeunwantedexports,) \ - $(if $(EPOCALLOWDLLDATA),--dlldata,) \ - $(if $(EPOCPROCESSPRIORITY),--priority=$(EPOCPROCESSPRIORITY),) \ - $(if $(EPOCSTACKSIZE),--stack=0x$(EPOCSTACKSIZE),) \ - $(if $(EPOCHEAPSIZEMIN),--heap=0x$(EPOCHEAPSIZEMIN)$(CHAR_COMMA)0x$(EPOCHEAPSIZEMAX),) \ - $(if $(EPOCFIXEDPROCESS),--fixedaddress,) \ - $(if $(EPOCDATALINKADDRESS),--datalinkaddress=$(EPOCDATALINKADDRESS),) \ - $(if $(NAMEDSYMLKUP),--namedlookup,) \ - $(if $(SMPSAFE),--smpsafe,) \ - $(if $(POSTLINKDEFFILE),--definput=$(POSTLINKDEFFILE),) \ - $(if $(EXPORTUNFROZEN),--unfrozen,) \ - $(if $(AUTOEXPORTS),--sysdef=$(call dblquote,$(AUTOEXPORTS)),) \ - $(if $(CANIGNORENONCALLABLE), \ - $(if $(IMPORTLIBRARYREQUIRED),,--ignorenoncallable),) \ - $(if $(CANHAVEEXPORTS), --defoutput=$(call dblquote,$(GENERATED_DEFFILE)) --dso=$(GENERATED_DSO)) \ - $(if $(filter $(VARIANTTYPE),$(DEBUGGABLE)),--debuggable,) \ - $(if $(POSTLINKER_SUPPORTS_WDP), \ - --codepaging=$(PAGEDCODE_OPTION) --datapaging=$(PAGEDDATA_OPTION), \ - $(POSTLINKER_PAGEDOPTION)) \ - $(if $(NOCOMPRESSTARGET),--uncompressed, \ - $(if $(INFLATECOMPRESSTARGET),--compressionmethod=inflate, \ - $(if $(BYTEPAIRCOMPRESSTARGET),--compressionmethod=bytepair, \ - --compressionmethod=$(POSTLINKER_COMPRESSION_DEFAULT)))) \ - --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" \ + $(call e32postlink_$(BASE_ARCH)) \ $(if $(SAVESPACE),$(if $(EXPORTUNFROZEN),,&& { $(GNURM) -rf $(INTERMEDIATEPATH); true; })) \ $(call endrule,linkandpostlink) @@ -735,7 +724,10 @@ include $(FLMHOME)/tracecompiler.mk WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER) endif +################################################################### + +## CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \ $(RUNTIME_SYMBOL_VISIBILITY_OPTION) $(EXCEPTIONS) \ $(CC_WARNINGS_CONTROL_OPTION) $(CC_ERRORS_CONTROL_OPTION) \ @@ -958,7 +950,7 @@ # # However, there's one case where we don't want to be dependent on the post-linked binary in this way, # and that's when (a) there are missing exports, (b) the user's aware of them and (c) they're deliberately freezing to - # remove them using EFREEZE's remove option. Being dependent on the post-linked binary in this case, where ELF2E32 + # remove them using EFREEZE's remove option. Being dependent on the post-linked binary in this case, where POSTLINKER # actually fails to generate a final binary, would mean that the freeze would never happen and post-linking would # just be continually re-attempted (to fail each time). # @@ -1104,133 +1096,10 @@ ########################## Build ROMFILE target ############################ -EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT)) -TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META)))) # Only build ROMFILE if asked ifneq ($(filter ROMFILE,$(call uppercase,$(MAKECMDGOALS))),) - ifeq ($(ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT))),) - ROMFILE_$(call sanitise,$(TARGET).$(REQUESTEDTARGETEXT)):=1 - ROMDIR:=$(EPOC_ROOT)/epoc32/rom/$(TOBLDINF) - - # Default values - ROMFILETYPE:=file - ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT) - ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/) - ROMDECORATIONS:= - ROMFILETYPE_RAM:=data - ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT) - ROMPATH_RAM:=sys/bin/ - BUILDROMTARGET:=1 - ABIDIR:=MAIN - - $(eval $(call DoRomSet)) - - ifneq ($(EPOCFIXEDPROCESS),) - ROMDECORATIONS:=$(ROMDECORATIONS) fixed - endif - ifeq ($(PAGED),1) - ROMDECORATIONS:=$(ROMDECORATIONS) paged - endif - ifeq ($(PAGED),0) - ROMDECORATIONS:=$(ROMDECORATIONS) unpaged - endif - - - DATATEXT:= - ifeq ($(TESTCODE),TRUE) - # Add 'TEST' to the .iby filename - ROMTEST:=test - ifeq ($(TEST_OPTION),BOTH) - DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).auto.bat test/$(MODULE).auto.bat"\n"data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).manual.bat test/$(MODULE).manual.bat" - else - ifneq ($(TEST_OPTION),NONE) - DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat" - endif - endif - endif - - # ROMTARGET - ifneq ($(ROMTARGET),) - ifneq ($(words $(ROMTARGET)),1) - ROMTARGETALL:=$(ROMTARGET) - ROMTARGET:=$(word 1,$(ROMTARGET)) - endif - - ifeq ($(ROMTARGET),) - BUILDROMTARGET:= - else - ifneq ($(ROMTARGET),+) - ifneq ($(notdir $(ROMTARGET)),) - ROMFILE:=$(notdir $(ROMTARGET)) - endif - ifneq ($(dir $(ROMTARGET)),./) - ROMPATH:=$(dir $(ROMTARGET)) - endif - endif - endif - endif - endif - - ROMFILENAME:=$(ROMDIR)$(PLATFORM)$(ROMTEST).iby - - # RAMTARGET - ifneq ($(RAMTARGET),) - ROMDECORATIONS_RAM:=" attrib=r" - ifneq ($(RAMTARGET),+) - ifneq ($(notdir $(RAMTARGET)),) - ROMFILE_RAM:=$(notdir $(RAMTARGET)) - endif - ifneq ($(dir $(RAMTARGET)),./) - ROMPATH_RAM:=$(dir $(RAMTARGET)) - endif - endif - endif - - define BuildRomfileTarget - $(ALLTARGET)::ROMFILE - ROMFILE:: - $(call startrule,rombuild) \ - $(GNUMKDIR) -p $(ROMDIR) \ - $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \ - $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME)) \ - $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME)) \ - $(call endrule,buildromfiletarget) - endef - - # When VARIANTTYPE changes, romfile is finished, - # apart from if this is a new component...... - ifneq ($(PREVIOUSVARIANTTYPE),) - ifneq ($(VARIANTTYPE),$(PREVIOUSVARIANTTYPE)) - ifneq ($(ROMFILE_CREATED_$(TOBLDINF)),) - ROMFILEFINISHED:=1 - else - ROMFILEFINISHED:= - endif - endif - endif - - # When romfile is finished, don't continue to add to it - ifeq ($(ROMFILEFINISHED),) - $(eval $(call BuildRomfileTarget,$(ROMPATH)$(ROMFILE))) - endif - - # Don't allow romfile to be recreated for every MMP - ifeq ($(ROMFILE_CREATED_$(TOBLDINF)),) - ROMFILE_CREATED_$(TOBLDINF):=1 - endif - - # Build other ROMTARGETs if there is more than one - ifneq ($(ROMTARGETALL),) - RAMTARGET:= - $(foreach ROMTARGET,$(wordlist 2,$(words $(ROMTARGETALL)),$(ROMTARGETALL)),$(eval $(call BuildRomfileTarget,$(ROMTARGET)))) - ROMTARGETALL:= - endif - - # Keep track of variant type while romfile is being created - PREVIOUSVARIANTTYPE:=$(VARIANTTYPE) - - WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME) + include $(FLMHOME)/romfile.mk endif # Deal with test code batch files generation. diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2ani.flm --- a/sbsv2/raptor/lib/flm/e32abiv2ani.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2ani.flm Thu Aug 12 09:00:16 2010 +0100 @@ -29,11 +29,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2defaults.mk --- a/sbsv2/raptor/lib/flm/e32abiv2defaults.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2defaults.mk Thu Aug 12 09:00:16 2010 +0100 @@ -49,7 +49,7 @@ # For GCCE ifeq ($(TOOLCHAIN),GCCE) -LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Startup,-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)_E32Dll) +LINKER_ENTRYPOINT_DECORATION:=$(if $(call isoneof,$(TARGETTYPE),exexp exe),-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT),-Wl$(CHAR_COMMA)-u$(CHAR_COMMA)$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT)) LINKER_SEPARATOR:=$(CHAR_COMMA) endif diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2dll.flm --- a/sbsv2/raptor/lib/flm/e32abiv2dll.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2dll.flm Thu Aug 12 09:00:16 2010 +0100 @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -28,11 +28,7 @@ # Default Linker settings for this target type LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2exe.flm --- a/sbsv2/raptor/lib/flm/e32abiv2exe.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2exe.flm Thu Aug 12 09:00:16 2010 +0100 @@ -27,12 +27,7 @@ # Determine what kind of entrypoint option to set LINKER_STUB_LIBRARY:= LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib) - -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(if $(FIRSTLIB),$(FIRSTLIB),eexe.lib)$(LINKER_ENTRYPOINT_ADORNMENT)) ifeq ($(EPOCNESTEDEXCEPTIONS),) STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2exexp.flm --- a/sbsv2/raptor/lib/flm/e32abiv2exexp.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2exexp.flm Thu Aug 12 09:00:16 2010 +0100 @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -52,17 +52,12 @@ LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/$(FIRSTLIB) ifeq ("$(TOOLCHAIN)","RVCT") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE))) +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)($(FIRSTLIB_OBJECTFILE))) else # GCCE -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup -Wl,-u$(LINKER_SEPARATOR)_E32Startup$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)) +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) -Wl,-u$(LINKER_SEPARATOR)$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/$(FIRSTLIB)) endif -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif - - POSTLINKDEFFILE:=$(DEFFILE) SUPPORT_FREEZE:=1 ifeq ($(NOEXPORTLIBRARY),) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2fsy.flm --- a/sbsv2/raptor/lib/flm/e32abiv2fsy.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2fsy.flm Thu Aug 12 09:00:16 2010 +0100 @@ -28,11 +28,7 @@ # Determine what kind of entrypoint option to set AUTOEXPORTS:=CreateFileSystem,1; LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2kdll.flm --- a/sbsv2/raptor/lib/flm/e32abiv2kdll.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2kdll.flm Thu Aug 12 09:00:16 2010 +0100 @@ -27,11 +27,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/ekll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/ekll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2kext.flm --- a/sbsv2/raptor/lib/flm/e32abiv2kext.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2kext.flm Thu Aug 12 09:00:16 2010 +0100 @@ -1,4 +1,4 @@ -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -34,11 +34,7 @@ # Default Linker settings for this target type LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eext.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eext.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2ldd.flm --- a/sbsv2/raptor/lib/flm/e32abiv2ldd.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2ldd.flm Thu Aug 12 09:00:16 2010 +0100 @@ -29,11 +29,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2pdd.flm --- a/sbsv2/raptor/lib/flm/e32abiv2pdd.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2pdd.flm Thu Aug 12 09:00:16 2010 +0100 @@ -28,11 +28,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edev.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edev.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2pdl.flm --- a/sbsv2/raptor/lib/flm/e32abiv2pdl.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2pdl.flm Thu Aug 12 09:00:16 2010 +0100 @@ -28,12 +28,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif - +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) CANIGNORENONCALLABLE:=1 diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2pdll.flm --- a/sbsv2/raptor/lib/flm/e32abiv2pdll.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2pdll.flm Thu Aug 12 09:00:16 2010 +0100 @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -28,11 +28,7 @@ # Default Linker settings for this target type LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2plugin.flm --- a/sbsv2/raptor/lib/flm/e32abiv2plugin.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2plugin.flm Thu Aug 12 09:00:16 2010 +0100 @@ -21,11 +21,7 @@ # Default Linker settings for this target type LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2stddll.flm --- a/sbsv2/raptor/lib/flm/e32abiv2stddll.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2stddll.flm Thu Aug 12 09:00:16 2010 +0100 @@ -29,13 +29,9 @@ # Default Linker settings for this target type LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB) -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif - LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) LIBRARY:=$(LIBRARY) euser.dso diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2stdexe.flm --- a/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2stdexe.flm Thu Aug 12 09:00:16 2010 +0100 @@ -28,13 +28,9 @@ # Determine what kind of entrypoint option to set LINKER_STUB_LIBRARY:= LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/eexe.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Startup $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT)) +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/eexe.lib$(LINKER_ENTRYPOINT_ADORNMENT)) DEFAULT_NEWLIB:=$(DEFAULT_STDCPP_NEWLIB) -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif - ifeq ($(EPOCNESTEDEXCEPTIONS),) STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) else diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2textnotifier2.flm Thu Aug 12 09:00:16 2010 +0100 @@ -28,11 +28,7 @@ AUTOEXPORTS:=_Z13NotifierArrayv,1; # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2var.flm --- a/sbsv2/raptor/lib/flm/e32abiv2var.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2var.flm Thu Aug 12 09:00:16 2010 +0100 @@ -21,11 +21,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32abiv2var2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2var2.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2var2.flm Thu Aug 12 09:00:16 2010 +0100 @@ -21,11 +21,7 @@ # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/evar.lib -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT)) - -ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True") -LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP) -endif +LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_PREFIX)$(ENTRYPOINT) $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/evar.lib$(LINKER_ENTRYPOINT_ADORNMENT)) LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib STATIC_RUNTIME_LIB:=$(KERNEL_STATIC_RUNTIME_LIB) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32importlib.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/flm/e32importlib.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,77 @@ +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Import library generation macros for supported e32 base architectures +# +# + + +# ARM-specific Macros + +define importlibtarget_prepfile_arm + $(PREPPEDDEFFILE): $(DEFFILE) + $(call startrule,importlibtarget_prepfile,FORCESUCCESS) \ + $(PREPDEF) $(call dblquote,$(DEFFILE)) $(call dblquote,$(PREPPEDDEFFILE)) \ + $(call endrule,importlibtarget_prepfile) +endef + +define importlibtargetversioned_arm + $(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE) + $(call startrule,importlibversioned,FORCESUCCESS) \ + $(IMPLIBTOOL) \ + --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ + --version=$(VERSION) \ + --definput="$(PREPPEDDEFFILE)" \ + --dso=$$(call dblquote,$$@) \ + --linkas=$(call dblquote,$(LINKASVERSIONED)) \ + $(call endrule,importlibversioned) +endef + +define importlibtarget_prepfile_x86 + # In x86 builds, x86-specific .def files take priority. However, if they aren't present, + # the build falls-back to using ARM EABI .def files. + # In the case of the latter, further processing is required before they can be used: + # 1: ZTI and ZTV exports are ABSENT-ed + # 2: "St9__va_list" entries are replaced with "Pc" + # The primary/seconday status of the .def file is deduced in the front-end - we just need + # to react to RESOLVED_DEFFILE_SECONDARY appropriately. + + ifneq ($(RESOLVED_DEFFILE_SECONDARY),) + $$(eval INPUTDEFFILE:=$(INTERMEDIATEPATH)/$(TARGET).def.x86) + + $(INTERMEDIATEPATH)/$(TARGET).def.x86: $(DEFFILE) + $(call startrule,importlibtarget_prepfile_process,FORCESUCCESS) \ + $(GNUSED) -r 's%(^\s*_ZT[I|V].*NONAME).*$$$$%\1 ABSENT%;s%St9__va_list%Pc%' < $$< > $$@ \ + $(call endrule,importlibtarget_prepfile_process) + + CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).def.x86 + else + $$(eval INPUTDEFFILE:=$(DEFFILE)) + endif + + $(PREPPEDDEFFILE): $$(INPUTDEFFILE) + $(call startrule,importlibtarget_prepfile,FORCESUCCESS) \ + $(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \ + $(call endrule,importlibtarget_prepfile) +endef + +define importlibtargetversioned_x86 + $(IMPORTLIBTARGETVERSIONED_DSO): $(IMPLIBTOOL) $(PREPPEDDEFFILE) + $(call startrule,importlibversioned,FORCESUCCESS) \ + $(IMPLIBTOOL) \ + -m i386 \ + --input-def "$(PREPPEDDEFFILE)" \ + --dllname $(call dblquote,$(LINKASVERSIONED)) \ + --output-lib $$(call dblquote,$$@) \ + $(call endrule,importlibversioned) +endef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32link.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/flm/e32link.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,63 @@ +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Linking support macros for supported e32 base architectures +# +# + +define e32link_genlibexpfile + + # $(1): generation type - 'exports' or 'deffile' + # + # 'exports' generation involves taking a list of the known exports, passing them to + # gendef.pl to create a temporary .def file, prepdef-ing this .def file and then + # passing this along to the import library generation tool to create the .lib.exp. + # This is invoked for components with knowN interfaces that aren't making use of a .mmp + # listed .def file + # + # 'deffile' generation takes the .def file used in the component build, for components + # that either require a .def file or where a .def file is used to override default behaviour. + # The .def file will already have been predef-ed during import library processing, so it's + # just a matter of running the import library generation tool on the temporary .def file to + # create the .lib.exp + # + # The resultant .lib.exp is then available for use in the final link. + + ifeq ($(1),exports) + $(INTERMEDIATEPATH)/$(TARGET).gen.def: + $(call startrule,e32link_gendeffile) \ + $(DEFGENTOOL) $(call dblquote,$$@) $(subst $(CHAR_COMMA)1$(CHAR_SEMIC),,$(AUTOEXPORTS)) \ + $(call endrule,e32link_gendeffile) + + CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).gen.def + + $(INTERMEDIATEPATH)/$(TARGET).prep: $(INTERMEDIATEPATH)/$(TARGET).gen.def + $(call startrule,e32link_prepdef) \ + $(PREPDEF) $(call dblquote,$$<) $(call dblquote,$$@) nodatasizes $(PREPDEF_ENTRYPOINT_PREFIX)$(ENTRYPOINT) \ + $(call endrule,e32link_prepdef) + + CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).prep + endif + + $(INTERMEDIATEPATH)/$(TARGET).lib.exp: $(INTERMEDIATEPATH)/$(TARGET).prep + $(call startrule,e32link_genlibexpfile) \ + $(IMPLIBTOOL) \ + -m i386 \ + --input-def $(call dblquote,$$<) \ + --dllname $(call dblquote,$(LINKASVERSIONED)) \ + -e $$(call dblquote,$$@) \ + $(call endrule,e32link_genlibexpfile) + + CLEANTARGETS:=$$(CLEANTARGETS) $(INTERMEDIATEPATH)/$(TARGET).lib.exp + +endef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/e32postlink.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/flm/e32postlink.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,83 @@ +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Post-linking macros for supported e32 base architectures +# +# + +define e32postlink_arm + $(POSTLINKER) \ + --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ + --version=$(VERSION) \ + --capability=$(FINAL_CAPABILITIES) \ + --linkas=$(call dblquote,$(LINKASVERSIONED)) \ + --fpu=$(POSTLINKER_FPU) \ + --targettype=$(POSTLINKTARGETTYPE) \ + --output=$$(call dblquote,$$@) \ + --elfinput=$(call dblquote,$(LINK_TARGET)) \ + $(if $(UID1),--uid1=0x$(UID1),) \ + $(if $(UID2),--uid2=0x$(UID2),) \ + $(if $(UID3),--uid3=0x$(UID3),) \ + $(if $(VENDORID),--vid=0x$(VENDORID),) \ + $(if $(EXPTARGET),--customdlltarget,) \ + $(if $(ARMLIBS),--excludeunwantedexports,) \ + $(if $(EPOCALLOWDLLDATA),--dlldata,) \ + $(if $(EPOCPROCESSPRIORITY),--priority=$(EPOCPROCESSPRIORITY),) \ + $(if $(EPOCSTACKSIZE),--stack=0x$(EPOCSTACKSIZE),) \ + $(if $(EPOCHEAPSIZEMIN),--heap=0x$(EPOCHEAPSIZEMIN)$(CHAR_COMMA)0x$(EPOCHEAPSIZEMAX),) \ + $(if $(EPOCFIXEDPROCESS),--fixedaddress,) \ + $(if $(EPOCDATALINKADDRESS),--datalinkaddress=$(EPOCDATALINKADDRESS),) \ + $(if $(NAMEDSYMLKUP),--namedlookup,) \ + $(if $(SMPSAFE),--smpsafe,) \ + $(if $(POSTLINKDEFFILE),--definput=$(POSTLINKDEFFILE),) \ + $(if $(EXPORTUNFROZEN),--unfrozen,) \ + $(if $(AUTOEXPORTS),--sysdef=$(call dblquote,$(AUTOEXPORTS)),) \ + $(if $(CANIGNORENONCALLABLE), \ + $(if $(IMPORTLIBRARYREQUIRED),,--ignorenoncallable),) \ + $(if $(CANHAVEEXPORTS), --defoutput=$(call dblquote,$(GENERATED_DEFFILE)) --dso=$(GENERATED_DSO)) \ + $(if $(filter $(VARIANTTYPE),$(DEBUGGABLE)),--debuggable,) \ + $(if $(POSTLINKER_SUPPORTS_WDP), \ + --codepaging=$(PAGEDCODE_OPTION) --datapaging=$(PAGEDDATA_OPTION), \ + $(POSTLINKER_PAGEDOPTION)) \ + $(if $(NOCOMPRESSTARGET),--uncompressed, \ + $(if $(INFLATECOMPRESSTARGET),--compressionmethod=inflate, \ + $(if $(BYTEPAIRCOMPRESSTARGET),--compressionmethod=bytepair, \ + --compressionmethod=$(POSTLINKER_COMPRESSION_DEFAULT)))) \ + --libpath="$(call concat,$(PATHSEP)$(CHAR_SEMIC),$(strip $(RUNTIME_LIBS_PATH) $(STATIC_LIBS_PATH)))" +endef + +define e32postlink_x86 + $(POSTLINKER) \ + -sid 0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ + -version $(VERSION) \ + -capability $(FINAL_CAPABILITIES) \ + $(if $(UID1),-uid1 0x$(UID1),) \ + $(if $(UID2),-uid2 0x$(UID2),) \ + $(if $(UID3),-uid3 0x$(UID3),) \ + $(if $(VENDORID),-vid 0x$(VENDORID),) \ + $(if $(EPOCALLOWDLLDATA),-allow,) \ + $(if $(EPOCPROCESSPRIORITY),-priority $(EPOCPROCESSPRIORITY),) \ + $(if $(EPOCSTACKSIZE),-stack 0x$(EPOCSTACKSIZE),) \ + $(if $(EPOCHEAPSIZEMIN),-heap 0x$(EPOCHEAPSIZEMIN) 0x$(EPOCHEAPSIZEMAX),) \ + $(if $(EPOCFIXEDPROCESS),-fixed,) \ + $(if $(EPOCDATALINKADDRESS),-datalinkaddress $(EPOCDATALINKADDRESS),) \ + $(if $(SMPSAFE),-smpsafe,) \ + $(if $(POSTLINKER_SUPPORTS_WDP), \ + -codepaging $(PAGEDCODE_OPTION) -datapaging $(PAGEDDATA_OPTION), \ + $(POSTLINKER_PAGEDOPTION)) \ + $(if $(NOCOMPRESSTARGET),-uncompressed, \ + $(if $(BYTEPAIRCOMPRESSTARGET),-compressionmethod bytepair, \ + -compressionmethod $(POSTLINKER_COMPRESSION_DEFAULT))) \ + $(call dblquote,$(LINK_TARGET)) \ + $$(call dblquote,$$@) +endef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/emulator.xml --- a/sbsv2/raptor/lib/flm/emulator.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/emulator.xml Thu Aug 12 09:00:16 2010 +0100 @@ -27,6 +27,7 @@ + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/flmtools.mk --- a/sbsv2/raptor/lib/flm/flmtools.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/flmtools.mk Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -88,7 +88,7 @@ # A macro for removing duplicate tokens from a list # whilst retaining the list's order define uniq -$(if $(1),$(info $(words $(1)) $(1))\ +$(if $(1),\ $(firstword $(1))$(call uniq,$(filter-out $(firstword $(1)),$(wordlist 2,$(words $(1)),$(1))))\ ,) endef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/gccxmlresource.flm --- a/sbsv2/raptor/lib/flm/gccxmlresource.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/gccxmlresource.flm Thu Aug 12 09:00:16 2010 +0100 @@ -22,12 +22,11 @@ define generaterfifile # $(1) is the .rfi filename -# $(2) is the list of .rpp files -# $(3) is the list of dependency files +# $(2) is the list of dependency files $(1): $(2) $(call startrule,generaterfifile,FORCESUCCESS) \ - $(CREATERFIFILE) -o $(1) -x "$(EPOCROOT)/epoc32" $(3) \ + $(CREATERFIFILE) -o $(1) -x "$(EPOCROOT)/epoc32" $(2) \ $(call endrule,generaterfifile) endef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/metaflm.mk --- a/sbsv2/raptor/lib/flm/metaflm.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/metaflm.mk Thu Aug 12 09:00:16 2010 +0100 @@ -155,43 +155,6 @@ $(strip $(if $(makepathLIST),$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=),)) endef -## ROMFILE macro ##################################### -define DoRomSet - -ifeq ($(call uppercase,$(TARGETTYPE)),LIB) -BUILDROMTARGET:= -endif - -ifeq ($(call uppercase,$(TARGETTYPE)),KEXT) -ROMFILETYPE:=extension[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),LDD) -ROMFILETYPE:=device[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),PDD) -ROMFILETYPE:=device[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),VAR) -ROMFILETYPE:=variant[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),KDLL) -ABIDIR:=KMAIN -endif - -ifneq ($(CALLDLLENTRYPOINTS),) -ROMFILETYPE:=dll -endif -ifeq ($(ROMFILETYPE),primary) -ABIDIR:=KMAIN -endif - -endef - -## End of ROMFILE macro ############################## ## Macros for writing FLMs without needing to know eval diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/resource.flm --- a/sbsv2/raptor/lib/flm/resource.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/resource.flm Thu Aug 12 09:00:16 2010 +0100 @@ -66,6 +66,9 @@ # we create intermediate .rpp and .d files INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE))) +LANGUAGES:=$(LANGUAGES:SC=sc) # ensure that we don't ever have to worry about case consistency w.r.t languages or get confused into thinking that SC!=sc (which it is) +LANGUAGES:=$(call uniq,$(LANGUAGES)) # remove any duplicates from the list (usually the result of multiple LANG lists both in and out of START RESOURCE blocks) + # common pre-processor options @@ -89,193 +92,127 @@ endif CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS) -############################################################################### - +################################################################################ +# Correct dependency information when a header file can't be found. +# If the c preprocessor can't find a dependency it appears as it did in the #include statement +# e.g. "filename.mbg" or "filename.rsg" in the dependency file. +ifneq ($(NO_DEPEND_GENERATE),) + # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. + # It allows resources to be built in the right order but doesn't impose the weight of + # of full dependency information which can overwhelm make in large builds. + # The strategy is filter lines which don't have .rsg or .mbg dependencies in them and + # to sift each line to leave out non-relevant things like other header files, .hrh + # files etc. In the end don't print anything at all if we did not find the target. -define preprocessresource -# $1 is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) -# $2 is the LANGUAGE (eg. sc or 01 or 02 ...) -# $3 is the "primary" language on which all the others depend + define DEPENDENCY_CORRECTOR + { $(DEPCRUNCH) --extensions rsg,mbg --assume '$(EPOCROOT)/epoc32/include' ; } + endef + +else + # This can correct the dependencies by assuming that the file will be in epoc32\include as this is the default + DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' +endif - ifeq ($(TARGET_$(call sanitise,$1)),) - TARGET_$(call sanitise,$1):=1 - $(if $(FLMDEBUG),$$(info preprocessresource: $1 LANG:$2 dep $3)) +############################################################################### +# Include all the macros - but not if it has been done already + +ifeq ($(include_resource_mk),) +include_resource_mk:=1 + +include $(FLMHOME)/resource.mk + +endif + +############################################################################### +## Generate a string of resourcefiles optionally with a header OR +## just a header (HEADERONLY) - # Correct dependency information when a header file can't be found. - # If the c preprocessor can't find a dependency it appears as it did in the #include statement - # e.g. "filename.mbg" or "filename.rsg" in the dependency file. +ifeq ($(HEADERONLY),) # i.e IF NOT HEADERONLY + + # The resources that are not for the "HEADER language" will all depend on + # that "headlang resource" - they will "sit in its dependency slipstream" + # or in other words We only have to make one dependency file because + # all of the other languages will benefit from it indirectly through their + # dependency on the header language. + + # The guard is based on the languages we're building so that 2 resource blocks can + # create different languages if so needed (no known reason for this but someone + # could do it and in the past it would have worked). + GUARD:=TARGET_$(call sanitise,$(INTERBASE_TMP)) + $(if $(FLMDEBUG),$(info resource.flm: $(GUARD)=$($(GUARD)) LANGUAGES:=$(LANGUAGES))) + + # Don't generate new rules for languages we've already seen for this resource file + # i.e. this allows one to define a single resource using two startresource blocks. + # each of which specifies one half of the languages. + REMAINING_LANGUAGES:=$(filter-out $($(GUARD)),$(LANGUAGES)) + $(if $(FLMDEBUG),$(info resource.flm: REMAINING_LANGUAGES=$(REMAINING_LANGUAGES))) + + ifneq ($(REMAINING_LANGUAGES),) + $(GUARD):=$($(GUARD)) $(REMAINING_LANGUAGES) + + LANGUAGES:=$(REMAINING_LANGUAGES) + + # PRIMARYFILE is the resource that will have a dependency file and that all the other + # resources will depend on. + PRIMARYFILE:=$(INTERBASE_TMP).r$(HEADLANG) + DEPENDFILENAME:=$(INTERBASE_TMP).r$(HEADLANG).d + $(if $(FLMDEBUG),$(info resource.flm: in guard with primary file=$(PRIMARYFILE))) + + ifeq "$(MAKEFILE_GROUP)" "RESOURCE_DEPS" + # Generate PRIMARYFILE's dependencies + $(eval $(call resource.deps,$(INTERBASE_TMP).r$(HEADLANG),$(HEADLANG),$(DEPENDFILENAME))) + else + RESOURCE:: $(PRIMARYFILE) + + # invoke the macro that creates targets for building resources, once per language + # For sc we generate $(INTERBASE_TMP).rsc and define LANGUAGE_SC and LANGUAGE_sc. + $(foreach L,$(LANGUAGES),$(eval $(call resource.build,$(INTERBASE_TMP).r$(L),$(L),$(TARGET_lower).r$(L)))) -ifneq ($(NO_DEPEND_GENERATE),) - # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. - # It allows resources to be built in the right order but doesn't impose the weight of - # of full dependency information which can overwhelm make in large builds. - # The strategy is filter lines which don't have .rsg or .mbg dependencies in them and - # to sift each line to leave out non-relevant things like other header files, .hrh - # files etc. In the end don't print anything at all if we did not find the target. + + DEPENDFILE:=$(wildcard $(DEPENDFILENAME)) + ifneq "$(DEPENDFILE)" "" + ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" + -include $(DEPENDFILE) + endif + endif + + endif + endif + ifneq "$(MAKEFILE_GROUP)" "RESOURCE_DEPS" + # Whether or not we have generated this resource for some other start + # resource block, check if there are any new copies to be made for + # this variant. e.g. winscw requires that we make some extra copies. + # We tried to copy after running rcomp itself but we still need these + # targets for the sake of dependencies or, for example, if someone + # merely adds a new copy when the resource is up-to-date + $(foreach L,$(LANGUAGES),$(eval $(call resource.makecopies,$(INTERBASE_TMP).r$(L),$(TARGET_lower).r$(L)))) -define DEPENDENCY_CORRECTOR -{ $(DEPCRUNCH) --extensions rsg,mbg --assume '$$$$(EPOCROOT)/epoc32/include' ; } -endef + endif +else + # + # HEADERONLY was specified + # + GUARD:=TARGET_$(call sanitise,$(INTERBASE_TMP))_rsg + $(if $(FLMDEBUG),$(info resource.flm: Headeronly $(INTERBASE_TMP) $(TARGET_lower).rsg LANGUAGES:=$(LANGUAGES))) -else - # This can correct the dependencies by assuming that the file will be in epoc32\include as this is the default - DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' + ifeq ($($(GUARD)),) + $(GUARD):=1 + $(eval $(call resource.headeronly,$(INTERBASE_TMP),$(HEADLANG))) + # The headeronly macro manages dependency including on its own + endif + +endif + +ifneq "$(MAKEFILE_GROUP)" "RESOURCE_DEPS" +# Add header to releasables anyway despite guard since sone things +# like the abldcache want to see the rsg for each platform even +# if we only declare one rule. +# If there's no header then it will be blank which is fine. +RELEASABLES:=$(RELEASABLES) $(RESOURCEHEADER) endif - ifeq "$1" "$3" - RESOURCE_DEPS:: $1.d - - $1.d: $(SOURCE) - $(call startrule,resourcedependencies,FORCESUCCESS) \ - $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\ - $(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \ - $$(DEPENDENCY_CORRECTOR) >$$@ \ - $(call endrule,resourcedependencies) - - $1 : $1.d - - else - $1 : $3 - endif - - $1: - $(call startrule,resourcepreprocess,FORCESUCCESS) \ - $(GNUCPP) -C -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\ - $(CPPOPT) $(SOURCE) -o $$@ \ - $(call endrule,resourcepreprocess) - endif - - CLEANTARGETS:= $$(CLEANTARGETS) $1 - - ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - ifeq "$1" "$3" - $(eval DEPENDFILENAME:=$1.d) - $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) - - CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) - ifneq "$(DEPENDFILE)" "" - ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" - ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - -include $(DEPENDFILE) - endif - endif - endif - endif - - endif -endef # preprocessresource # - -############################################################################### -define copyresource -# $(1) is the source -# $(2) is the space separated list of destinations which must be filenames - - RELEASABLES:=$$(RELEASABLES) $(2) - - $(info $2) - -endef # copyresource # - -############################################################################### -define generateresource - -# $(1) is the intermediate resource filename with path e.g. /a/b/resource.rsc -# $(2) is the preprocessed resource to make it from -# $(3) is the language e.g. sc or 01 or 02 -# $(4) is the target resource filename without path - - - ifeq ($(TARGET_$(call sanitise,$1)),) - TARGET_$(call sanitise,$1):=1 - - $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),) - $(if $(FLMDEBUG),$(info generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))))) - - CLEANTARGETS:=$$(CLEANTARGETS) $(1) - - RESOURCE:: $(1) - - $(1): $(2) $(RCOMP) - $(call startrule,resourcecompile,FORCESUCCESS) \ - $(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \ - $(call endrule,resourcecompile) - - endif - -# Whether or not we have generated this resource for some other variant, check if there -# are any new copies to be made for this variant. e.g. winscw requires that we make -# some extra copies. We tried to copy after running rcomp itself but we still need these -# targets for the sake of dependencies or, for example, if someone merely adds a new copy -# when the resource is up-to-date - - $(call copyresource,$1,$(sort $(patsubst %,%/$4,$(RSCCOPYDIRS)))) - - - # individual source file compilation - SOURCETARGET_$(call sanitise,$(SOURCE)): $(1) - -endef # generateresource - - -############################################################################### -define generateresourceheader -# $(1) is the resource header (eg. /epoc32/include/a.rsg) -# $(2) is the preprocessed resource to make it from -# $(3) is the language to use (eg. sc) - - RELEASABLES:= $$(RELEASABLES) $(1) - - ifeq ($(TARGET_$(call sanitise,$1)),) - TARGET_$(call sanitise,$1):=1 - $(if $(FLMDEBUG),$(info resourceheader: $(1) from $(2) LANG:$(3))) - - RESOURCE:: $(1) - - $(1): $(2) $(RCOMP) - $(call startrule,resourceheader,FORCESUCCESS) \ - $(RCOMP) -m045,046,047 -u -h$(1) -s$(2) \ - $(call endrule,resourceheader) - - endif - - - # individual source file compilation - SOURCETARGET_$(call sanitise,$(SOURCE)): $(1) - -endef - -############################################################################### -## call the generator - -# We always create at least the header -# even if we sometimes don't create the resources -ifneq ($(RESOURCEHEADER),) - $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE_TMP)_$(HEADLANG).rpp,$(HEADLANG))) -endif - -# The one on which the others will depend i.e. they will -# "sit in it's dependency slipstream" or in other words -# We only have to make one dependency file because all of -# the other languages will benefit from the dependency file -# belonging to this language. -PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp -ifeq ($(HEADERONLY),) - # generate a resource file for each language - # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. - $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(L),$(PRIMARYRPPFILE)))) - - ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE_TMP).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L),$(TARGET_lower).r$(L)))) - endif -else - # No resources are going to be made so unless we specifically ask for it, there will be no - # preprocessed file from which to create the header: - - $(eval $(call preprocessresource,$(INTERBASE_TMP)_$(HEADLANG).rpp,$(HEADLANG),$(PRIMARYRPPFILE))) - -endif ############################################################################### ## .rfi generation in support of the gccxml build @@ -285,8 +222,7 @@ RELEASABLES:=$(RELEASABLES) $(RFIFILE) CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/ - RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp) - $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(PRIMARYRPPFILE).d)) + $(eval $(call generaterfifile,$(RFIFILE),$(PRIMARYFILE).d)) endif @@ -296,6 +232,5 @@ $(call makepath,$(CREATABLEPATHS)) # for the --what option and the log file -RELEASABLES:=$(RELEASABLES) $(DESTRPP) $(INFOFILE) $(call raptor_release,$(RELEASABLES),RESOURCE) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/resource.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/lib/flm/resource.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,166 @@ +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Function Like Makefile (FLM): Shared macros for resource.flm +# +# +############################################################################### + +############################################################################### +# $1 is the name of the intermediate RESOURCEFILE that is to be produced +# $2 is the LANGUAGE (eg. sc or 01 or 02 ...) +# $3 is the name of the dependency file +define resource.deps + + $(if $(FLMDEBUG),$$(info resource.deps: $1 LANG:$2 dep $3 )) + + RESOURCE_DEPS:: $3 + + # could force deps to be generated always - debatable. + # .PHONY: $3 + + $3: $(SOURCE) + $(call startrule,resourcedependencies,FORCESUCCESS) \ + $(GNUCPP) -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \ + $$(DEPENDENCY_CORRECTOR) >$3 \ + $(call endrule,resourcedependencies) + + SOURCETARGET_$(call sanitise,$(SOURCE)): $3 + + CLEANTARGETS:=$$(CLEANTARGETS) $3 + +endef # resource.deps # + +############################################################################### +# $1 is the name of the intermediate RESOURCEFILE +# $2 is the LANGUAGE (eg. sc or 01 or 02 ...) +# Uses $(RESOURCEHEADER),$(SOURCE),$(HEADLANG),$(MMPDEFS) apart from some tools +define resource.build + $(if $(FLMDEBUG),$$(info resource.build: $1 LANG:$2 )) + + DOHEADER:= + ifeq ($(HEADLANG),$2) + ifneq ($(RESOURCEHEADER),) + RESOURCE:: $(RESOURCEHEADER) + + DOHEADER:=-h$(RESOURCEHEADER) + # strictly speaking if $1 is made then the header file should be there too + # but suppose someone adds a header statement to their MMP after doing a build? + # so here we recreate the resource header if its missing even if the intermediate resource + # has actually been built. The problem is: what if the rpp file is not there (oops)? + # So this is not perfect but I think that the situation is fairly unlikely. + # We can afford to put in an if statement for the rsg file - it's not a race condition because + # $1 is done and the build engine guarantees that it's there so no resource header + # can be attempted while we're trying to test. + $(RESOURCEHEADER) : $1 + $(call startrule,resourcecompile.headerfill,FORCESUCCESS) \ + if [ ! -f "$(RESOURCEHEADER)" ]; then $(GNUCPP) -DLANGUAGE_$2 \ + -DLANGUAGE_$(subst sc,SC,$(2)) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -o $1.rpp; fi && \ + if [ ! -f "$(RESOURCEHEADER)" ]; then $(RCOMP) -m045,046,047 -u -h$$@ -s$1.rpp; fi \ + $(call endrule,resourcecompile.headerfill) + + # we will add the resourceheader to RELEASABLES globally + endif + + else + # Use the headlang resource (in primaryfile) as the dependency + # "leader" for this resource + $1: $(PRIMARYFILE) + endif + + + RESOURCE:: $1 + + $1: $(SOURCE) + $(call startrule,resourcecompile,FORCESUCCESS) \ + $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$(2)) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -o $1.rpp && \ + $(RCOMP) -m045,046,047 -u $$(DOHEADER) -o$$@ -s$1.rpp \ + $(call endrule,resourcecompile) + + SOURCETARGET_$(call sanitise,$(SOURCE)): $1 + CLEANTARGETS:=$$(CLEANTARGETS) $1 $1.rpp +endef # resource.build + +############################################################################### +# $1 is the name of the intermediate RESOURCEFILE +# $2 is the target name (without path) of the final resource file +define resource.makecopies + + $(call copyresource,$1,$(sort $(addsuffix /$2,$(RSCCOPYDIRS)))) +endef + + +############################################################################### +# $1 is the intermediate filename base (eg. /epoc32/build/xxx/b_) +# $2 is the LANGUAGE (eg. sc or 01 or 02 ...) +define resource.headeronly + ifeq "$(MAKEFILE_GROUP)" "RESOURCE_DEPS" + # generate the resource header dependency files + $(eval DEPENDFILENAME:=$1_$2.rsg.d) + + RESOURCE_DEPS:: $(DEPENDFILENAME) + + # could force deps to be generated always - debatable. + # .PHONY: $(DEPENDFILENAME) + + $(DEPENDFILENAME): $(SOURCE) + $(call startrule,resource.headeronly.deps,FORCESUCCESS) \ + $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$2) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -M -MG -MT"$(RESOURCEHEADER)" | \ + $$(DEPENDENCY_CORRECTOR) > $$@ \ + $(call endrule,resource.headeronly.deps) + + SOURCETARGET_$(call sanitise,$(SOURCE)): $(DEPENDFILENAME) + + CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) + else # generate the resource header + + RESOURCE:: $(RESOURCEHEADER) + + $(RESOURCEHEADER): $(SOURCE) + $(call startrule,resource.headeronly,FORCESUCCESS) \ + $(GNUCPP) -DLANGUAGE_$2 -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -o $1_$2.rsg.rpp && \ + $(RCOMP) -m045,046,047 -u -h$$@ -s$1_$2.rsg.rpp \ + $(call endrule,resource.headeronly) + + CLEANTARGETS:=$$(CLEANTARGETS) $1_$2.rsg.rpp + # we will add the resourceheader to RELEASABLES globally + # individual source file compilation + + SOURCETARGET_$(call sanitise,$(SOURCE)): $(RESOURCEHEADER) + + $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) + + ifneq "$(DEPENDFILE)" "" + ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" + -include $(DEPENDFILE) + endif + endif + endif +endef # resource.headeronly # + + +############################################################################### +define copyresource +# $(1) is the source +# $(2) is the space separated list of destinations which must be filenames + + RELEASABLES:=$$(RELEASABLES) $(2) + + $(info $2) + +endef # copyresource # diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/romfile.mk --- a/sbsv2/raptor/lib/flm/romfile.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/romfile.mk Thu Aug 12 09:00:16 2010 +0100 @@ -1,42 +1,175 @@ -# romfile.mk -# -# Copyright (c) 2008 : Symbian Software Limited. All rights reserved. -# -# define macros that are needed by romfile creation - -define DoRomSet - -ifeq ($(call uppercase,$(TARGETTYPE)),LIB) -BUILDROMTARGET:= -endif - -ifeq ($(call uppercase,$(TARGETTYPE)),KEXT) -ROMFILETYPE:=extension[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),LDD) -ROMFILETYPE:=device[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),PDD) -ROMFILETYPE:=device[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),VAR) -ROMFILETYPE:=variant[MAGIC] -ABIDIR:=KMAIN -endif -ifeq ($(call uppercase,$(TARGETTYPE)),KDLL) -ABIDIR:=KMAIN -endif - -ifneq ($(CALLDLLENTRYPOINTS),) -ROMFILETYPE:=dll -endif -ifeq ($(ROMFILETYPE),primary) -ABIDIR:=KMAIN -endif - -endef - - +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +EPOC_ROOT:=$(patsubst %/,%,$(EPOCROOT)) +TOBLDINF:=$(dir $(subst :,,$(subst $(EPOC_ROOT)/,,$(COMPONENT_META)))) + +ifeq ($(ROMFILE_$(call sanitise,$(TOBLDINF)$(TARGET).$(REQUESTEDTARGETEXT))),) + ROMFILE_$(call sanitise,$(TOBLDINF)$(TARGET).$(REQUESTEDTARGETEXT)):=1 + ROMDIR:=$(EPOC_ROOT)/epoc32/rom/$(TOBLDINF) + + # Default values + ROMFILETYPE:=file + ROMFILE:=$(TARGET).$(REQUESTEDTARGETEXT) + ROMPATH:=$(if $(TARGETPATH),$(TARGETPATH)/,sys/bin/) + ROMDECORATIONS:= + ROMFILETYPE_RAM:=data + ROMFILE_RAM:=$(TARGET).$(REQUESTEDTARGETEXT) + ROMPATH_RAM:=sys/bin/ + BUILDROMTARGET:=1 + ABIDIR:=MAIN + + define DoRomSet + ifeq ($(call uppercase,$(TARGETTYPE)),LIB) + BUILDROMTARGET:= + endif + + ifeq ($(call uppercase,$(TARGETTYPE)),KEXT) + ROMFILETYPE:=extension[MAGIC] + ABIDIR:=KMAIN + endif + ifeq ($(call uppercase,$(TARGETTYPE)),LDD) + ROMFILETYPE:=device[MAGIC] + ABIDIR:=KMAIN + endif + ifeq ($(call uppercase,$(TARGETTYPE)),PDD) + ROMFILETYPE:=device[MAGIC] + ABIDIR:=KMAIN + endif + ifeq ($(call uppercase,$(TARGETTYPE)),VAR) + ROMFILETYPE:=variant[MAGIC] + ABIDIR:=KMAIN + endif + ifeq ($(call uppercase,$(TARGETTYPE)),KDLL) + ABIDIR:=KMAIN + endif + + ifneq ($(CALLDLLENTRYPOINTS),) + ROMFILETYPE:=dll + endif + ifeq ($(ROMFILETYPE),primary) + ABIDIR:=KMAIN + endif + endef + + $(eval $(call DoRomSet)) + + ifneq ($(EPOCFIXEDPROCESS),) + ROMDECORATIONS:=$(ROMDECORATIONS) fixed + endif + ifeq ($(PAGED),1) + ROMDECORATIONS:=$(ROMDECORATIONS) paged + endif + ifeq ($(PAGED),0) + ROMDECORATIONS:=$(ROMDECORATIONS) unpaged + endif + + + DATATEXT:= + ifeq ($(TESTCODE),TRUE) + # Add 'TEST' to the .iby filename + ROMTEST:=test + ifeq ($(TEST_OPTION),BOTH) + DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).auto.bat test/$(MODULE).auto.bat"\n"data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).manual.bat test/$(MODULE).manual.bat" + else + ifneq ($(TEST_OPTION),NONE) + DATATEXT:="data=/epoc32/data/z/test/$(MODULE)/$(VARIANTPLATFORM).$(TEST_OPTION).bat test/$(MODULE).$(TEST_OPTION).bat" + endif + endif + endif + + # ROMTARGET + ifneq ($(ROMTARGET),) + ifneq ($(words $(ROMTARGET)),1) + ROMTARGETALL:=$(ROMTARGET) + ROMTARGET:=$(word 1,$(ROMTARGET)) + endif + + ifeq ($(ROMTARGET),) + BUILDROMTARGET:= + else + ifneq ($(ROMTARGET),+) + ifneq ($(notdir $(ROMTARGET)),) + ROMFILE:=$(notdir $(ROMTARGET)) + endif + ifneq ($(dir $(ROMTARGET)),./) + ROMPATH:=$(dir $(ROMTARGET)) + endif + endif + endif + endif +endif + +ROMFILENAME:=$(ROMDIR)$(PLATFORM)$(ROMTEST).iby + +# RAMTARGET +ifneq ($(RAMTARGET),) + ROMDECORATIONS_RAM:=" attrib=r" + ifneq ($(RAMTARGET),+) + ifneq ($(notdir $(RAMTARGET)),) + ROMFILE_RAM:=$(notdir $(RAMTARGET)) + endif + ifneq ($(dir $(RAMTARGET)),./) + ROMPATH_RAM:=$(dir $(RAMTARGET)) + endif + endif +endif + +define BuildRomfileTarget +$(ALLTARGET)::ROMFILE +ROMFILE:: + $(call startrule,rombuild) \ + $(GNUMKDIR) -p $(ROMDIR) \ + $(if $(ROMFILE_CREATED_$(TOBLDINF)),,&& echo -e "// $(subst $(EPOC_ROOT)/,,$(ROMFILENAME))\n//\n$(DATATEXT)" > $(ROMFILENAME)) \ + $(if $(BUILDROMTARGET),&& echo "$(ROMFILETYPE)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(1)$(ROMDECORATIONS)" >> $(ROMFILENAME)) \ + $(if $(RAMTARGET),&& echo "$(ROMFILETYPE_RAM)=/epoc32/release/##$(ABIDIR)##/##BUILD##/$(TARGET)$(if $(EXPLICITVERSION),{$(VERSIONHEX)},).$(REQUESTEDTARGETEXT) $(ROMPATH_RAM)$(ROMFILE_RAM)$(ROMDECORATIONS_RAM)" >> $(ROMFILENAME)) \ + $(call endrule,buildromfiletarget) +endef + +# When VARIANTTYPE changes, romfile is finished, +# apart from if this is a new component...... +ifneq ($(PREVIOUSVARIANTTYPE),) + ifneq ($(VARIANTTYPE),$(PREVIOUSVARIANTTYPE)) + ifneq ($(ROMFILE_CREATED_$(TOBLDINF)),) + ROMFILEFINISHED:=1 + else + ROMFILEFINISHED:= + endif + endif +endif + +# When romfile is finished, don't continue to add to it +ifeq ($(ROMFILEFINISHED),) + $(eval $(call BuildRomfileTarget,$(ROMPATH)$(ROMFILE))) +endif + +# Don't allow romfile to be recreated for every MMP +ifeq ($(ROMFILE_CREATED_$(TOBLDINF)),) + ROMFILE_CREATED_$(TOBLDINF):=1 +endif + +# Build other ROMTARGETs if there is more than one +ifneq ($(ROMTARGETALL),) + RAMTARGET:= + $(foreach ROMTARGET,$(wordlist 2,$(words $(ROMTARGETALL)),$(ROMTARGETALL)),$(eval $(call BuildRomfileTarget,$(ROMTARGET)))) + ROMTARGETALL:= +endif + +# Keep track of variant type while romfile is being created +PREVIOUSVARIANTTYPE:=$(VARIANTTYPE) + +WHATRELEASE:=$(WHATRELEASE) $(ROMFILENAME) + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/standard.xml --- a/sbsv2/raptor/lib/flm/standard.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/standard.xml Thu Aug 12 09:00:16 2010 +0100 @@ -12,6 +12,7 @@ + @@ -26,6 +27,7 @@ + @@ -75,9 +77,11 @@ + + @@ -92,7 +96,6 @@ - @@ -109,11 +112,12 @@ + - + @@ -121,14 +125,17 @@ + + + - + @@ -136,6 +143,7 @@ + @@ -149,16 +157,20 @@ + + + + @@ -174,6 +186,7 @@ + @@ -205,24 +218,29 @@ + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/tools.xml --- a/sbsv2/raptor/lib/flm/tools.xml Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/tools.xml Thu Aug 12 09:00:16 2010 +0100 @@ -11,7 +11,7 @@ - + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/tools2common.flm --- a/sbsv2/raptor/lib/flm/tools2common.flm Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/tools2common.flm Thu Aug 12 09:00:16 2010 +0100 @@ -50,8 +50,8 @@ TARGET:: $(TARGETS) ## Pre-Include directories -ifneq ($(INC.COMPILER),) -PINCLUDE:=$(patsubst %,$(OPT.PREINCLUDE)%,$(INC.COMPILER)) +ifneq ($(PREINCLUDE),) +PINCLUDE:=$(patsubst %,$(OPT.PREINCLUDE)%,$(PREINCLUDE)) endif ## User and System Include directories diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/lib/flm/tracecompiler.mk --- a/sbsv2/raptor/lib/flm/tracecompiler.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/lib/flm/tracecompiler.mk Thu Aug 12 09:00:16 2010 +0100 @@ -16,6 +16,12 @@ # Expected inputs: # TARGETEXT +# Set macro for TRACES keyword +ifneq ($(TRACES),) +CDEFS:=$(CDEFS) OST_TRACE_COMPILER_IN_USE +$(if $(FLMDEBUG),$(info CDEFS=$(CDEFS))) +endif + # Set project name as TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META))) OLDTC_TRACE_PRJNAME:=$(TRACE_PRJNAME) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/filter_html.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/filter_html.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,41 @@ +There is a new log filter to generate HTML output. For example, + +sbs --filters=html -f logdir + +will produce an output file "logdir/index.html" and other supporting files +in the directory "logdir". This can be used alongside the Bz2 filter to +generate both a human readable summary and a compressed log for further +detailed machine analysis if required: for example, + +sbs --filters=html,bz2log -f name + +will produce a folder "name" and a file "name.bz2". + + +If a build is done in several parts, for example, + +sbs -s sys1.xml --filters=html,bz2log -f build/part1 +sbs -s sys2.xml --filters=html,bz2log -f build/part2 +sbs -s sys3.xml --filters=html,bz2log -f build/part3 + +Then there is a new script "SBS_HOME/bin/sbs_index.py" which can produce a +single index linking to all the individual parts: for example, + +sbs_index.py build/part1 build/part2 build/part3 build/index.html + +the first parameters are the directories to search for summaries and the +last parameter is the name of the overall index file. Directories are +searched recursively, so the above example is the same as, + +sbs_index.py build build/index.html + + +Text in the Raptor logs is classified as Error, Warning or Remark using the +list of regular expressions in the file SBS_HOME/lib/config/logfile_regex.csv +but this can be overriden by placing a file of the same name in the kit in +its EPOCROOT/epoc32/sbs_config folder. + + +The filter also checks that all the files which were listed in "what" output +actually exist at the end of the build. Any files which don't exist are +recorded as "Missing files". \ No newline at end of file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/nodebug.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/nodebug.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,21 @@ +The "nodebug" variant causes executables to be built without debug +information. It does not affect the macros that are passed to debug +executables or the optimisation flags. + +The use case for nodebug is for a situation where some executables are +so large that they trigger a problem in RVCT2.2's linker for the "udeb" +version of the executable but not for the "urel" version. There is no +known solution for this problem without using a new compiler and since +it isn't currently possible to use different compilers in the same build +this is not an option. + +This variant makes the udeb build of the executable much less useful for +debugging purposes so it is an undesirable workaround for a build problem but +there is no alternative. Newer versions of Symbian support newer compilers +and will not need this feature. It is also not needed when building with GCCE. +We strongly recommend against using this feature. + +For exectuables with this problem one must use the APPLY keyword in the mmp +like so: + +apply nodebug diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/query_cli_extended_details.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/query_cli_extended_details.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,19 @@ + +The --query command-line option has been extended to print more detailed +information about a given configuration. + +Querying aliases now prints the list in sorted order, by name attribute. +Ditto for products. + +Querying a configuration now prints the following additional information: + +1. include paths used for preprocessing bld.infs and MMPs +2. pre-include header file for preprocessing bld.infs and MMPs +3. pre-include header file passed to the compiler in a build (if used) +4. macros used to preprocess bld.infs and MMPs (with values, if explicitly set) +5. core macros used in compilation preprocessing (with values, if explicitly set) +6. available values to use as the targettype in MMPs + +Further documentation can be found here: + +http://developer.symbian.org/wiki/index.php/Raptor_Query_Reference diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/slimdebug.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/slimdebug.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,17 @@ +The optional "slimdebug" variant is now available for use in e32 builds. + +This currently has an impact on RVCT-based e32 builds and, when applied, +calls to armcc in udeb compilation have the "--no_debug_macros" and +"--remove_unneeded_entities" options added; there is no change to the vanilla +urel compilation call in RVCT-based builds, nor to the compiler calls in +other e32 builds using other toolchains. + +The net result of applying "slimdebug" is a general decrease in udeb object +and image sizes due to the removal of debug table entries and unused debug +information. + +Examples of the variant's application are as follows: + +sbs -c armv5.slimdebug +sbs -c armv6_udeb.slimdebug + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/traces_mmpkeyword.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/traces_mmpkeyword.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,15 @@ +The traces mmp keyword is used to explicitly indicate Raptor to run trace compiler. It is designed to replace the implicit way, which is specifying trace folder in userinclude. However, the old way is still supported for compatibility reason. + +The keyword could be used as a swtich with no parameter, which automatically set trace folder to be: + +../traces/_ + +When the keyword is used with a parameter, it set trace folder to be: + +traces/_ + +So e.g. if the mmp file is at the same level with trace folder and you want the trace folder directory to be: "./traces/_", in your mmp it should say: + +traces ./ + +N.B. The trace folder directory is relative to the directory of the mmp file where traces keyword is used. \ No newline at end of file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/notes/x86_initial.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/x86_initial.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,54 @@ + +Raptor now supports a basic x86 OS build on Windows given the installation +of an appropriate MinGW GCC toolchain (available separately). + +This is very much a first cut of the core x86 support, and should be considered +alpha quality, but the fundamentals are now present to build EXE, DLL, IMPLIB +and LIB TARGETTYPEs, as well as most fixed export TARGETTYPEs. Support for +functionality not directly related to a release build e.g. freezing, assembler +listing, single file compilation etc. is either not yet implemented or +untested, so should not be expected to work correctly. + +In order to build components for an x86 configuration, an SBS_GCCX86BIN +environment variable must first be set, with a path as its value, pointing to +the "bin" directory of the MinGW installation intended for use in the build +e.g.: + +SBS_GCCX86BIN=C:\apps\MinGW\bin + +x86 build configurations should then be available for use as follows: + +sbs -c x86 +sbs -c x86_urel +sbs -c x86_udeb + +If a component supports a build for X86GCC or ARMV5 then it will support a +build using Raptor's x86 support if requested i.e. if one of the above build +configurations is used and, for example, the component's bld.inf file has an +empty PRJ_PLATFORMS section or PRJ_PLATFORMS is populated with X86GCC, ARMV5, +DEFAULT, BASEDEFAULT etc. + +The above x86 group and aliases check that the GCC installation is version 3.4.5 +but, other than that, it is the end user's responsibility to provide a toolchain +that is suitable for an x86 build; currently the x86 build requires a custom +GCC toolchain that differs from vanilla MinGW releases. + +By default, and in common with other Raptor build configurations, x86 build +output locations are architecture rather than toolchain based, therefore the +following output folders are used: + +%EPOCROOT%\epoc32\release\x86\lib +%EPOCROOT%\epoc32\release\x86\urel +%EPOCROOT%\epoc32\release\x86\udeb + +An optional release_x86gcc variant is available if the output directories need +to differentiate based on the toolchain used. This variant can be used as +follows: + +sbs -c x86.release_x86gcc + +...and will lead to the use of these output directories: + +%EPOCROOT%\epoc32\release\x86gcc\lib +%EPOCROOT%\epoc32\release\x86gcc\urel +%EPOCROOT%\epoc32\release\x86gcc\udeb diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/filter_list.py --- a/sbsv2/raptor/python/filter_list.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/filter_list.py Thu Aug 12 09:00:16 2010 +0100 @@ -189,7 +189,7 @@ for filter in self.out: if (filter != sys.stdout) and (filter != sys.stderr): - returnVal = returnVal and filter.close() + returnVal = filter.close() and returnVal return returnVal diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/mmpparser.py --- a/sbsv2/raptor/python/mmpparser.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/mmpparser.py Thu Aug 12 09:00:16 2010 +0100 @@ -74,7 +74,6 @@ Line(CaselessKeyword('APPLY') + String()) ^ \ Line(CaselessKeyword('ASSPLIBRARY') + StringList()) ^ \ Line(CaselessKeyword('CAPABILITY') + StringList()) ^ \ - Line(CaselessKeyword('DOCUMENT') + StringList()) ^ \ Line(CaselessKeyword('EPOCHEAPSIZE') + HexOrDecNumber() + HexOrDecNumber()) ^ \ Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \ Line(CaselessKeyword('FIRSTLIB') + String()) ^ \ @@ -83,6 +82,7 @@ Line(CaselessKeyword('RAMTARGET') + String()) ^ \ Line(CaselessKeyword('TARGETTYPE') + String()) ^ \ Line(CaselessKeyword('TARGETPATH') + String()) ^ \ + Line(CaselessKeyword('TRACES') + Optional(String())) ^ \ Line(CaselessKeyword('SYSTEMINCLUDE') + StringList()) ^ \ Line(CaselessKeyword('USERINCLUDE') + StringList()) ^ \ Line(CaselessKeyword('DEFFILE') + String()) ^ \ @@ -98,39 +98,22 @@ Line(CaselessKeyword('EPOCPROCESSPRIORITY') + String()) ^ \ Line(CaselessKeyword('NEWLIB') + String()) \ ).setParseAction(self.backend.doAssignment) ^ \ - ( \ - Line(CaselessKeyword('SOURCE') + StringList()).setParseAction(self.backend.doSourceAssignment) \ - ).setParseAction(self.backend.doSourceAssignment) ^ \ - ( \ - Line(CaselessKeyword('RESOURCE') + StringList()).setParseAction(self.backend.doOldResourceAssignment) \ - ).setParseAction(self.backend.doOldResourceAssignment) ^ \ + Line(CaselessKeyword('DOCUMENT') + StringList()).setParseAction(self.backend.doDocumentAssignment) ^ \ + Line(CaselessKeyword('SOURCE') + StringList()).setParseAction(self.backend.doSourceAssignment) ^ \ + Line(CaselessKeyword('RESOURCE') + StringList()).setParseAction(self.backend.doOldResourceAssignment) ^ \ ( \ Line(CaselessKeyword('SYSTEMRESOURCE') + StringList()).setParseAction(self.backend.doResourceAssignment) \ ).setParseAction(self.backend.doOldResourceAssignment) ^ \ ( \ Line(CaselessKeyword('SOURCEPATH') + String()).setParseAction(self.backend.doSourceAssignment) \ ).setParseAction(self.backend.doSourcePathAssignment) ^ \ - ( \ - Line((CaselessKeyword('UID') + Group(HexOrDecNumber() + Optional(HexOrDecNumber())))).setParseAction(self.backend.doUIDAssignment) \ - ).setParseAction(self.backend.doUIDAssignment) ^ \ - ( \ - Line(CaselessKeyword('LANG') + StringList()) \ - ).setParseAction(self.backend.doAppend) ^ \ - ( \ - Line(CaselessKeyword('LIBRARY') + StringList()) \ - ).setParseAction(self.backend.doAppend) ^ \ - ( \ - Line(CaselessKeyword('DEBUGLIBRARY') + StringList()) \ - ).setParseAction(self.backend.doAppend) ^ \ - ( \ - Line(CaselessKeyword('MACRO') + Optional(StringList())) \ - ).setParseAction(self.backend.doAppend) ^ \ - ( \ - Line(CaselessKeyword('AIF') + StringList()) \ - ).setParseAction(self.backend.doDeprecated) ^ \ - ( \ - Line(CaselessKeyword('STATICLIBRARY') + StringList()) \ - ).setParseAction(self.backend.doAppend) + Line((CaselessKeyword('UID') + Group(HexOrDecNumber() + Optional(HexOrDecNumber())))).setParseAction(self.backend.doUIDAssignment) ^ \ + Line(CaselessKeyword('LANG') + StringList()).setParseAction(self.backend.doAppend) ^ \ + Line(CaselessKeyword('LIBRARY') + StringList()).setParseAction(self.backend.doAppend) ^ \ + Line(CaselessKeyword('DEBUGLIBRARY') + StringList()).setParseAction(self.backend.doAppend) ^ \ + Line(CaselessKeyword('MACRO') + Optional(StringList())).setParseAction(self.backend.doAppend) ^ \ + Line(CaselessKeyword('AIF') + StringList()).setParseAction(self.backend.doDeprecated) ^ \ + Line(CaselessKeyword('STATICLIBRARY') + StringList()).setParseAction(self.backend.doAppend) self.switch = \ (Line( \ diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/plugins/filter_html.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/plugins/filter_html.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,691 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Filter class for generating HTML summary pages +# + +import os +import re +import csv +import sys +import shutil +import tempfile +import filter_interface + +class HTML(filter_interface.FilterSAX): + + def __init__(self, params = []): + """parameters to this filter are...""" + super(HTML, self).__init__() + + # FilterSAX method overrides + + def startDocument(self): + + if self.params.logFileName: + self.dirname = str(self.params.logFileName).replace("%TIME", self.params.timestring) + "_html" + else: + self.dirname = "html" # writing to stdout doesn't make sense + + # read regular expressions from the first file on the config path + self.regex = [] + for p in self.params.configPath: + if not p.isAbsolute(): + p = self.params.home.Append(p) + + csv = p.Append("logfile_regex.csv") + if csv.isFile(): + self.regex = self.readregex(str(csv)) + break + + self.elements = [] + self.recipe_tag = None + self.error_tag = None + self.warning_tag = None + + self.components = {} + self.configurations = {} + self.totals = Records() + + # create all the directories + for s in Records.SUBDIRS: + dir = os.path.join(self.dirname, s) + if not os.path.isdir(dir): + try: + os.makedirs(dir) + except: + return self.err("could not create directory '%s'" % dir) + + # create an index.html + try: + indexname = os.path.join(self.dirname, "index.html") + + self.index = open(indexname, "w") + self.index.write(""" + +Raptor Build Summary + + + +

Raptor Build Summary

+""") + except: + return self.err("could not create file '%s'" % indexname) + + # copy over a style file if none exists in the output already + css = os.path.join(self.dirname, "style.css") + if not os.path.isfile(css): + try: + style = str(self.params.home.Append("style/filter_html.css")) + shutil.copyfile(style, css) + except: + self.moan("could not copy '%s' to '%s'" % (style, css)) + + # create a temporary file to record all the "what" files in. We can + # only test the files for existence after "make" has finished running. + try: + self.tmp = tempfile.TemporaryFile() + except: + return self.err("could not create temporary file") + + return self.ok + + def startElement(self, name, attributes): + "call the start handler for this element if we defined one." + + self.generic_start(name) # tracks element nesting + + function_name = "start_" + name + try: + HTML.__dict__[function_name](self, attributes) + except KeyError: + pass + + def characters(self, char): + "process [some of] the body text for the current element." + + function_name = "char_" + self.elements[-1] + try: + HTML.__dict__[function_name](self, char) + except KeyError: + pass + + def endElement(self, name): + "call the end handler for this element if we defined one." + + function_name = "end_" + name + try: + HTML.__dict__[function_name](self) + except KeyError: + pass + + self.generic_end() # tracks element nesting + + def endDocument(self): + + self.existencechecks() + self.dumptotals() + try: + self.index.write("

") + + for title in Records.TITLES: + self.index.write('' % title) + + self.index.write("") + self.index.write(self.totals.tablerow("total")) + self.index.write("
%s
") + + + self.index.write("

by configuration

") + self.index.write("

") + + for title in Records.TITLES: + self.index.write('' % title) + + self.index.write("") + + # the list of configuration names in alphabetical order + names = self.configurations.keys() + names.sort() + + # print the "unknown" configuration results first + if 'unknown' in names: + self.index.write(self.configurations['unknown'].tablerow("no specific configuration")) + names.remove('unknown') + + # print the rest + for name in names: + self.index.write(self.configurations[name].tablerow(name)) + + self.index.write("
%s
") + + + self.index.write("

by component

") + self.index.write("

") + + for title in Records.TITLES: + self.index.write('' % title) + + self.index.write("") + + # the list of component names in alphabetical order + names = self.components.keys() + names.sort() + + # print the "unknown" component results first + if 'unknown' in names: + self.index.write(self.components['unknown'].tablerow("no specific component")) + names.remove('unknown') + + # print the rest + for name in names: + self.index.write(self.components[name].tablerow(name)) + + self.index.write("
%s
") + self.index.write("") + self.index.close() + except Exception, e: + return self.err("could not close index " + str(e)) + + # error and warning exception handlers for FilterSAX + + def error(self, exception): + self.fatalError(exception) # all errors are fatal + + def fatalError(self, exception): + self.err("exception " + str(exception)) + + def warning(self, exception): + """only print warnings if no errors have occurred yet. + + because after an error everything goes mad.""" + if self.ok: + sys.stderr.write(self.formatWarning("HTML filter " + str(exception))) + + # our error handling functions + + def err(self, text): + """only print the first error, then go quiet. + + because after a fatal error there are usually hundreds of + meaningless repeats and/or garbage that doesn't help anyone.""" + if self.ok: + sys.stderr.write(self.formatError("HTML filter " + text)) + self.ok = False + return self.ok + + def moan(self, text): + """print a warning about something that is annoying but not fatal.""" + if self.ok: + sys.stderr.write(self.formatWarning("HTML filter " + text)) + return self.ok + + # our content handling functions + + def start_buildlog(self, attributes): + try: + self.index.write("

sbs " + attributes['sbs_version'] + "") + except KeyError: + pass + + def end_buildlog(self): + pass + + def start_recipe(self, attributes): + self.recipe_tag = TaggedText(attributes) + + def char_recipe(self, char): + self.recipe_tag.text += char + + def end_recipe(self): + # an "ok" recipe may contain warnings / remarks + if self.recipe_tag.exit == 'ok': + self.record(self.recipe_tag, self.classify(self.recipe_tag.text)) + + # a "failed" recipe is always an error + elif self.recipe_tag.exit == 'failed': + self.record(self.recipe_tag, Records.ERROR) + + # "retry" should just be ignored (for now) + # but will be recorded in a later version. + + self.recipe_tag = None + + def start_status(self, attributes): + try: + if self.recipe_tag: + self.recipe_tag.exit = attributes['exit'] + self.recipe_tag.code = attributes['code'] + else: + self.err("status element not inside a recipe element") + except KeyError: + pass + + def start_error(self, attributes): + self.error_tag = TaggedText(attributes) + + def char_error(self, char): + self.error_tag.text += char + + def end_error(self): + self.record(self.error_tag, Records.ERROR) + self.error_tag = None + + def start_warning(self, attributes): + self.warning_tag = TaggedText(attributes) + + def char_warning(self, char): + self.warning_tag.text += char + + def end_warning(self): + self.record(self.warning_tag, Records.WARNING) + self.warning_tag = None + + def start_whatlog(self, attributes): + try: + for attrib in ['bldinf', 'config']: + self.tmp.write("|") + if attrib in attributes: + self.tmp.write(attributes[attrib]) + self.tmp.write("\n") + except: + return self.err("could not write to temporary file") + + def start_export(self, attributes): + try: + self.tmp.write(attributes['destination'] + "\n") + except: + return self.err("could not write to temporary file") + + def start_resource(self, attributes): + self.resource_tag = "" + + def char_resource(self, char): + self.resource_tag += char + + def end_resource(self): + try: + self.tmp.write(self.resource_tag.strip() + "\n") + except: + return self.err("could not write to temporary file") + + def start_bitmap(self, attributes): + self.bitmap_tag = "" + + def char_bitmap(self, char): + self.bitmap_tag += char + + def end_bitmap(self): + try: + self.tmp.write(self.bitmap_tag.strip() + "\n") + except: + return self.err("could not write to temporary file") + + def start_stringtable(self, attributes): + self.stringtable_tag = "" + + def char_stringtable(self, char): + self.stringtable_tag += char + + def end_stringtable(self): + try: + self.tmp.write(self.stringtable_tag.strip() + "\n") + except: + return self.err("could not write to temporary file") + + def start_member(self, attributes): + self.member_tag = "" + + def char_member(self, char): + self.member_tag += char + + def end_member(self): + try: + self.tmp.write(self.member_tag.strip() + "\n") + except: + return self.err("could not write to temporary file") + + def start_build(self, attributes): + self.build_tag = "" + + def char_build(self, char): + self.build_tag += char + + def end_build(self): + try: + self.tmp.write(self.build_tag.strip() + "\n") + except: + return self.err("could not write to temporary file") + + # even if we ignore an element we need to mark its coming and going + # so that we know which element any character data belongs to. + + def generic_start(self, name): + self.elements.append(name) + + def generic_end(self): + self.elements.pop() + + # text classification + + def classify(self, text): + "test the text for errors, warnings and remarks." + + # there shouldn't actually be any errors in here because we + # are only looking at "ok" recipes... BUT there are bad tools + # out there which don't set an error code when they fail, so + # we should look out for those cases. + + for line in text.splitlines(): + if not line or line.startswith("+"): + continue # it is a blank line or a command, not its output + + # the first expression that matches wins + for r in self.regex: + if r[0].search(line): + return r[1] + + return Records.OK + + # reporting of "errors" to separate files + + def record(self, taggedtext, type): + if self.totals.isempty(type): + self.createoverallfile(type) + self.appendoverallfile(type, taggedtext) + + configuration = taggedtext.config + + if configuration in self.configurations: + if self.configurations[configuration].isempty(type): + self.createconfigurationfile(configuration, type) + + self.appendconfigurationfile(configuration, type, taggedtext) + else: + # first time for configuration + self.configurations[configuration] = Records() + self.createconfigurationfile(configuration, type) + self.appendconfigurationfile(configuration, type, taggedtext) + + component = taggedtext.bldinf + + if component in self.components: + if self.components[component].isempty(type): + self.createcomponentfile(component, type) + + self.appendcomponentfile(component, type, taggedtext) + else: + # first time for component + self.components[component] = Records() + self.createcomponentfile(component, type) + self.appendcomponentfile(component, type, taggedtext) + + def createoverallfile(self, type): + if type == Records.OK: + # we don't want to show successes, just count them + return + + linkname = os.path.join(Records.SUBDIRS[type], "overall.html") + filename = os.path.join(self.dirname, linkname) + title = Records.TITLES[type] + " for all configurations" + try: + file = open(filename, "w") + file.write("%s" % title) + file.write('') + file.write("

%s

" % title) + file.close() + except: + return self.err("cannot create file '%s'" % filename) + + self.totals.set(type, 'filename', filename) + self.totals.set(type, 'linkname', linkname) + + def appendoverallfile(self, type, taggedtext): + self.totals.inc(type, 'N') # one more and counting + + if type == Records.OK: + # we don't want to show successes, just count them + return + + filename = self.totals.get(type, 'filename') + try: + file = open(filename, "a") + file.write("

component: %s " % taggedtext.bldinf) + file.write("config: %s\n" % taggedtext.config) + file.write("

" + taggedtext.text.strip() + "
") + file.close() + except: + return self.err("cannot append to file '%s'" % filename) + + def createconfigurationfile(self, configuration, type): + if type == Records.OK: + # we don't want to show successes, just count them + return + + linkname = os.path.join(Records.SUBDIRS[type], "cfg_" + configuration + ".html") + filename = os.path.join(self.dirname, linkname) + title = Records.TITLES[type] + " for configuration " + configuration + try: + file = open(filename, "w") + file.write("%s" % title) + file.write('') + file.write("

%s

" % title) + file.close() + except: + return self.err("cannot create file '%s'" % filename) + + self.configurations[configuration].set(type, 'filename', filename) + self.configurations[configuration].set(type, 'linkname', linkname) + + def appendconfigurationfile(self, configuration, type, taggedtext): + self.configurations[configuration].inc(type, 'N') # one more and counting + + if type == Records.OK: + # we don't want to show successes, just count them + return + + filename = self.configurations[configuration].get(type, 'filename') + try: + file = open(filename, "a") + file.write("

component: %s\n" % taggedtext.bldinf) + file.write("

" + taggedtext.text.strip() + "
") + file.close() + except: + return self.err("cannot append to file '%s'" % filename) + + def createcomponentfile(self, component, type): + if type == Records.OK: + # we don't want to show successes, just count them + return + + linkname = os.path.join(Records.SUBDIRS[type], "bld_" + re.sub("[/:]","_",component) + ".html") + filename = os.path.join(self.dirname, linkname) + title = Records.TITLES[type] + " for component " + component + try: + file = open(filename, "w") + file.write("%s" % title) + file.write('') + file.write("

%s

" % title) + file.close() + except: + return self.err("cannot create file '%s'" % filename) + + self.components[component].set(type, 'filename', filename) + self.components[component].set(type, 'linkname', linkname) + + def appendcomponentfile(self, component, type, taggedtext): + self.components[component].inc(type, 'N') # one more and counting + + if type == Records.OK: + # we don't want to show successes, just count them + return + + filename = self.components[component].get(type, 'filename') + try: + file = open(filename, "a") + file.write("

config: %s\n" % taggedtext.config) + file.write("

" + taggedtext.text.strip() + "
") + file.close() + except: + return self.err("cannot append to file '%s'" % filename) + + def existencechecks(self): + try: + self.tmp.flush() # write what is left in the buffer + self.tmp.seek(0) # rewind to the beginning + + missing_tag = TaggedText({}) + missed = set() # only report missing files once + + for line in self.tmp.readlines(): + if line.startswith("|"): + parts = line.split("|") + attribs = { 'bldinf' : parts[1].strip(), + 'config' : parts[2].strip() } + missing_tag = TaggedText(attribs) + else: + filename = line.strip() + if not filename in missed and not os.path.isfile(filename): + missing_tag.text = filename + self.record(missing_tag, Records.MISSING) + missed.add(filename) + + self.tmp.close() # this also deletes the temporary file + except Exception,e: + return self.err("could not close temporary file " + str(e)) + + def dumptotals(self): + """write the numbers of errors, warnings etc. into a text file. + + so that a grand summariser can tie together individual log summaries + into one big summary page.""" + try: + filename = os.path.join(self.dirname, "totals.txt") + file = open(filename, "w") + file.write(self.totals.textdump()) + file.close() + except: + self.err("cannot write totals file '%s'" % filename) + + def readregex(self, csvfile): + """read the list of regular expressions from a csv file. + + the file format is TYPE,REGEX,DESCRIPTION + + If the description is "ignorecase" then the regular expression is + compiled with re.IGNORECASE and will match case-insensitively. + """ + regexlist = [] + try: + reader = csv.reader(open(csvfile, "rb")) + for row in reader: + try: + type = None + + if row[0] == "CRITICAL" or row[0] == "ERROR": + type = Records.ERROR + elif row[0] == "WARNING": + type = Records.WARNING + elif row[0] == "REMARK": + type = Records.REMARK + + # there are other types like INFO that we don't + # care about so silently ignore them. + if type: + if row[2].lower() == "ignorecase": + regex = re.compile(row[1], re.I) + else: + regex = re.compile(row[1]) + regexlist.append((regex, type)) + except: + self.moan("ignored bad regex '%s' in file '%s'" % (row[1], csvfile)) + except Exception, ex: + self.err("cannot read regex file '%s': %s" % (csvfile, str(ex))) + return [] + + return regexlist + +class Records(object): + "a group of related records e.g. errors, warnings and remarks." + + # the different types of record we want to group together + OK = 0 + ERROR = 1 + WARNING = 2 + REMARK = 3 + MISSING = 4 + + SUBDIRS = [ "ok", "error", "warning", "remark", "missing" ] + TITLES = [ "OK", "Errors", "Warnings", "Remarks", "Missing files" ] + + def __init__(self): + self.data = [ {'N':0}, {'N':0}, {'N':0}, {'N':0}, {'N':0} ] + + def get(self, index, item): + try: + return self.data[index][item] + except KeyError: + return None + + def inc(self, index, item): + self.data[index][item] += 1 + + def isempty(self, index): + return (self.data[index]['N'] == 0) + + def set(self, index, item, value): + self.data[index][item] = value + + def tablerow(self, name): + row = '%s' % name + + for i,datum in enumerate(self.data): + number = datum['N'] + if number == 0: + row += '0' + else: + row += '' + try: + link = datum['linkname'] + row += '%d' % (link,number) + except KeyError: + row += '%d' % number + + row += "" + return row + + def textdump(self): + text = "" + for i,datum in enumerate(self.data): + number = datum['N'] + if number == 0: + style = "zero" + else: + style = Records.SUBDIRS[i] + text += str(i) + ',' + style + "," + str(number) + "\n" + return text + +class TaggedText(object): + def __init__(self, attributes): + + for attrib in ['bldinf', 'config']: + self.__dict__[attrib] = "unknown" + if attrib in attributes: + value = attributes[attrib] + if value: + self.__dict__[attrib] = value + + self.text = "" + +# the end \ No newline at end of file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/raptor.py --- a/sbsv2/raptor/python/raptor.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/raptor.py Thu Aug 12 09:00:16 2010 +0100 @@ -1377,6 +1377,8 @@ self.incoming_epocroot = incoming_epocroot self.epocroot = epocroot self.logFileName = raptor_instance.logFileName + self.configPath = raptor_instance.configPath + self.home = raptor_instance.home self.quiet = raptor_instance.quiet self.doCheck = raptor_instance.doCheck self.doWhat = raptor_instance.doWhat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/raptor_api.py --- a/sbsv2/raptor/python/raptor_api.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/raptor_api.py Thu Aug 12 09:00:16 2010 +0100 @@ -27,8 +27,22 @@ class Reply(object): """object to return values from API calls. """ - def __init__(self, text=""): + def __init__(self, text="", raptor=None): + self._raptor = raptor self.text = text + + def _getEvaluator(self, meaning): + """ Note: Will pass on Evaluator constructor exceptions """ + try: + return self.__evaluator + except AttributeError: + # create an evaluator for the named configuration + tmp = raptor_data.Alias("tmp") + tmp.SetProperty("meaning", meaning) + + units = tmp.GenerateBuildUnits(self._raptor.cache) + self.__evaluator = self._raptor.GetEvaluator(None, units[0]) + return self.__evaluator def __str__(self): name = type(self).__name__.lower() @@ -38,11 +52,18 @@ longend = False for attribute,value in self.__dict__.items(): - if attribute != "text": + if attribute != "text" and not attribute.startswith('_'): if isinstance(value, Reply): children.append(value) + elif isinstance(value, list): + for item in value: + if isinstance(item, Reply): + children.append(item) + else: + raise BadReply(str(item)+" is not a Reply object") else: - string += " %s='%s'" % (attribute, value) + if value != None: # skip attributes whose value is None + string += " %s='%s'" % (attribute, value) if children or self.text: string += ">" @@ -50,12 +71,18 @@ if self.text: string += self.text + children.sort() + # Note mixing sortable and unsortable lists results in + # sort not working, so if you really need your + # children to come out in the right order, put them in + # a list. This is only for niceness, where it works. if children: string += "\n" - for c in children: - string += str(c) + for c in children: + clines = str(c).rstrip().split("\n") + string += "".join(map(lambda l:" "+l+"\n",clines)) if longend: string += "\n" % name @@ -64,26 +91,235 @@ return string + +class BadReply(Exception): + pass + class Alias(Reply): def __init__(self, name, meaning): super(Alias,self).__init__() self.name = name self.meaning = meaning + + def __cmp__(self, other): + """ Add __cmp__ to enable comparisons between two Alias objects based upon name.""" + return cmp(self.name, other.name) class Config(Reply): - def __init__(self, fullname, outputpath): - super(Config,self).__init__() - self.fullname = fullname - self.outputpath = outputpath + def __init__(self, raptor, name, text = None): + """ Constructor to create a Config from a user-supplied name. + possibly including aliases (but not groups) + """ + super(Config,self).__init__(text, raptor) + + self.query = name + + # Work out the real name + names = name.split(".") + if names[0] in self._raptor.cache.aliases: + x = self._raptor.cache.FindNamedAlias(names[0]) + + if len(names) > 1: + self.meaning = x.meaning + "." + ".".join(names[1:]) + else: + self.meaning = x.meaning + + elif names[0] in self._raptor.cache.variants: + self.meaning = name + + else: + raise BadQuery("'%s' is not an alias or a variant" % names[0]) + + def resolveOutputPath(self): + """ Get the outputpath """ + try: + evaluator = self._getEvaluator(self.meaning) + # This is messy as some configs construct the path inside the FLM + # rather than talking it from the XML: usually because of some + # conditional logic... but maybe some refactoring could avoid that. + releasepath = evaluator.Get("RELEASEPATH") + if not releasepath: + raise BadQuery("could not get RELEASEPATH for config '%s'" % self.fullname) + + variantplatform = evaluator.Get("VARIANTPLATFORM") + varianttype = evaluator.Get("VARIANTTYPE") + featurevariantname = evaluator.Get("FEATUREVARIANTNAME") + + platform = evaluator.Get("TRADITIONAL_PLATFORM") + + if platform == "TOOLS2": + self.outputpath = releasepath + else: + if not variantplatform: + raise BadQuery("could not get VARIANTPLATFORM for config '%s'" % self.fullname) + + if featurevariantname: + variantplatform += featurevariantname + + if not varianttype: + raise BadQuery("could not get VARIANTTYPE for config '%s'" % self.fullname) + + self.outputpath = str(generic_path.Join(releasepath, variantplatform, varianttype)) + except Exception, e: # Unable to determine output path + self.text = str(e) + + def resolveMetadata(self): + try: + metadata = self.metadata + except AttributeError: + metadata = MetaData(self.meaning, self._raptor) + self.metadata = metadata + + try: + metadata.resolve() + except Exception: + # Evaluator exception hopefully - already handled + self.metadata = None + + def resolveBuild(self): + try: + build = self.build + except AttributeError: + build = Build(self.meaning, self._raptor) + self.build = build + + try: + build.resolve() + except Exception: + # Evaluator exception, hopefully - already handled + self.build = None + + def resolveTargettypes(self): + try: + build = self.build + except AttributeError: + build = Build(self.meaning, self._raptor) + self.build = build + + try: + build.resolveTargettypes() + except Exception: + # Evaluator exception hopefully - already handled + self.build = None + +class MetaData(Reply): + def __init__(self, meaning, raptor): + super(MetaData,self).__init__("", raptor) + self.__meaning = meaning + + def resolve(self): + includepaths = [] + preincludeheader = "" + platmacros = [] + + evaluator = self._getEvaluator(self.__meaning) + + # Initialise data and metadata objects + buildunits = raptor_data.GetBuildUnits([self.__meaning], self._raptor.cache, self._raptor) + metareader = raptor_meta.MetaReader(self._raptor, buildunits) + metadatafile = raptor_meta.MetaDataFile(generic_path.Path("bld.inf"), "cpp", [], None, self._raptor) + + # There is only one build platform here; obtain the pre-processing include paths, + # OS pre-include file, compiler pre-include file and macros. + includepaths = metadatafile.preparePreProcessorIncludePaths(metareader.BuildPlatforms[0]) + preincludeheader = metareader.BuildPlatforms[0]['VARIANT_HRH'] + + # Macros arrive as a a list of strings, or a single string, containing definitions of the form "name" or "name=value". + platmacrolist = metadatafile.preparePreProcessorMacros(metareader.BuildPlatforms[0]) + platmacros.extend(map(lambda macrodef: [macrodef.partition("=")[0], macrodef.partition("=")[2]], platmacrolist)) + + # Add child elements to appropriate areas if they were calculated + if len(includepaths) > 0: + self.includepaths = map(lambda x: Include(str(x)), includepaths) + + if preincludeheader != "": + self.preincludeheader = PreInclude(str(preincludeheader)) + + if len(platmacros): + self.platmacros = map(lambda x: Macro(x[0],x[1]) if x[1] else Macro(x[0]), platmacros) + +class Build(Reply): + def __init__(self, meaning, raptor): + super(Build,self).__init__("", raptor) + self.__meaning = meaning + + def resolve(self): + compilerpreincludeheader = "" + sourcemacros = [] + + evaluator = self._getEvaluator(self.__meaning) + + platform = evaluator.Get("TRADITIONAL_PLATFORM") + + # Compiler preinclude files may or may not be present, depending on the configuration. + if evaluator.Get("PREINCLUDE"): + compilerpreincludeheader = generic_path.Path(evaluator.Get("PREINCLUDE")) + + # Macros arrive as a a list of strings, or a single string, containing definitions of the form "name" or "name=value". + # If required, we split to a list, and then processes the constituent parts of the macro. + sourcemacrolist = evaluator.Get("CDEFS").split() + sourcemacros.extend(map(lambda macrodef: [macrodef.partition("=")[0], macrodef.partition("=")[2]], sourcemacrolist)) + + if platform == "TOOLS2": + # Source macros are determined in the FLM for tools2 builds, therefore we have to + # mimic the logic here + if 'win' in raptor.hostplatform or 'win32' in self.__meaning: + sourcemacrolist = evaluator.Get("CDEFS.WIN32").split() + else: + sourcemacrolist = evaluator.Get("CDEFS.LINUX").split() + sourcemacros.extend(map(lambda macrodef: [macrodef.partition("=")[0], macrodef.partition("=")[2]], sourcemacrolist)) + + if len(sourcemacros): + self.sourcemacros = map(lambda x: Macro(x[0],x[1]) if x[1] else Macro(x[0]), sourcemacros) + + if compilerpreincludeheader: + self.compilerpreincludeheader = PreInclude(str(compilerpreincludeheader)) + + def resolveTargettypes(self): + evaluator = self._getEvaluator(self.__meaning) + targettypes = evaluator.Get("TARGET_TYPES").split(' ') + self.targettypes = [] + for type in targettypes: + self.targettypes.append(TargetType(type)) + self.targettypes.sort() + +class TargetType(Reply): + def __init__(self, name): + super(TargetType,self).__init__() + self.name = name + + def __cmp__(self, other): + return cmp(self.name, other.name) class Product(Reply): def __init__(self, name): super(Product,self).__init__() self.name = name + + def __cmp__(self, other): + """ Add __cmp__ to enable comparisons between two Product objects based upon name.""" + return cmp(self.name, other.name) + +class Include(Reply): + def __init__(self, path): + super(Include,self).__init__() + self.path = path + +class PreInclude(Reply): + def __init__(self, file): + super(PreInclude,self).__init__() + self.file = file + +class Macro(Reply): + def __init__(self, name, value=None): + super(Macro,self).__init__() + self.name = name + self.value = value import generic_path import raptor import raptor_data +import raptor_meta import re class Context(object): @@ -141,7 +377,7 @@ if type == ALL or a.type == type: # copy the members we want to expose aliases.append( Alias(a.name, a.meaning) ) - + aliases.sort() return aliases def getconfig(self, name): @@ -151,57 +387,13 @@ dot-separated list of variants. For example "armv5_urel" or "armv5_urel.savespace.vasco". """ - names = name.split(".") - if names[0] in self.__raptor.cache.aliases: - x = self.__raptor.cache.FindNamedAlias(names[0]) - - if len(names) > 1: - fullname = x.meaning + "." + ".".join(names[1:]) - else: - fullname = x.meaning - - elif names[0] in self.__raptor.cache.variants: - fullname = name - - else: - raise BadQuery("'%s' is not an alias or a variant" % names[0]) - - # create an evaluator for the named configuration - tmp = raptor_data.Alias("tmp") - tmp.SetProperty("meaning", fullname) - - units = tmp.GenerateBuildUnits(self.__raptor.cache) - evaluator = self.__raptor.GetEvaluator(None, units[0]) - - # get the outputpath - # this is messy as some configs construct the path inside the FLM - # rather than talking it from the XML: usually because of some - # conditional logic... but maybe some refactoring could avoid that. - releasepath = evaluator.Get("RELEASEPATH") - if not releasepath: - raise BadQuery("could not get RELEASEPATH for config '%s'" % name) - - variantplatform = evaluator.Get("VARIANTPLATFORM") - varianttype = evaluator.Get("VARIANTTYPE") - featurevariantname = evaluator.Get("FEATUREVARIANTNAME") - - platform = evaluator.Get("TRADITIONAL_PLATFORM") - - if platform == "TOOLS2": - outputpath = releasepath - else: - if not variantplatform: - raise BadQuery("could not get VARIANTPLATFORM for config '%s'" % name) - - if featurevariantname: - variantplatform += featurevariantname - - if not varianttype: - raise BadQuery("could not get VARIANTTYPE for config '%s'" % name) - - outputpath = str(generic_path.Join(releasepath, variantplatform, varianttype)) - - return Config(fullname, outputpath) + + config = Config(self.__raptor, name) + config.resolveOutputPath() + config.resolveTargettypes() + config.resolveMetadata() + config.resolveBuild() + return config def getproducts(self): """extract all product variants.""" @@ -212,7 +404,7 @@ if v.type == "product": # copy the members we want to expose variants.append( Product(v.name) ) - + variants.sort() return variants class BadQuery(Exception): diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/raptor_meta.py --- a/sbsv2/raptor/python/raptor_meta.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/raptor_meta.py Thu Aug 12 09:00:16 2010 +0100 @@ -38,7 +38,7 @@ import generic_path -PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML']} +PiggyBackedBuildPlatforms = {'ARMV5':['GCCXML', 'X86GCC']} PlatformDefaultDefFileDir = {'WINSCW':'bwins', 'ARMV5' :'eabi', @@ -46,7 +46,8 @@ 'GCCXML':'eabi', 'ARMV6':'eabi', 'ARMV7' : 'eabi', - 'ARMV7SMP' : 'eabi'} + 'ARMV7SMP' : 'eabi', + 'X86GCC' : ['bx86gcc', 'eabi']} def getVariantCfgDetail(aEPOCROOT, aVariantCfgFile): """Obtain pertinent build related detail from the Symbian variant.cfg file. @@ -300,6 +301,9 @@ """ Override call so that we can do our own error handling.""" tool = self._ExternalTool__Tool commandline = tool + " " + aArgs + " " + str(sourcefilename) + + self.raptor.Debug("Preprocessing command line %s", str(commandline)) + try: # the actual call differs between Windows and Unix if raptor_utilities.getOSFileSystem() == "unix": @@ -320,11 +324,10 @@ # run the command and wait for all the output (self._ExternalTool__Output, errors) = p.communicate() - if self.raptor.debugOutput: - self.raptor.Debug("Preprocessing Start %s", str(sourcefilename)) - self.raptor.Debug("Output:\n%s", self._ExternalTool__Output) - self.raptor.Debug("Errors:\n%s", errors) - self.raptor.Debug("Preprocessing End %s", str(sourcefilename)) + self.raptor.Debug("Preprocessing Start %s", str(sourcefilename)) + self.raptor.Debug("Output:\n%s", self._ExternalTool__Output) + self.raptor.Debug("Errors:\n%s", errors) + self.raptor.Debug("Preprocessing End %s", str(sourcefilename)) incRE = re.compile("In file included from") fromRE = re.compile(r"\s+from") @@ -404,7 +407,6 @@ return call - class MetaDataFile(object): """A generic representation of a Symbian metadata file @@ -459,61 +461,27 @@ except Exception, e: self.log.Debug("Couldn't make bldinf outputpath for dependency generation") - config_macros = (aBuildPlatform['PLATMACROS']).split() - if not key in self.__PreProcessedContent: preProcessor = PreProcessor(self.__gnucpp, '-undef -nostdinc ' + generateDepsOptions + ' ', '-I', '-D', '-include', self.log) preProcessor.filename = self.filename - # always have the current directory on the include path - preProcessor.addIncludePath('.') - - # the SYSTEMINCLUDE directories defined in the build config - # should be on the include path. This is added mainly to support - # Feature Variation as SYSTEMINCLUDE is usually empty at this point. - systemIncludes = aBuildPlatform['SYSTEMINCLUDE'] - if systemIncludes: - preProcessor.addIncludePaths(systemIncludes.split()) - - preInclude = aBuildPlatform['VARIANT_HRH'] - - # for non-Feature Variant builds, the directory containing the HRH should - # be on the include path - if not aBuildPlatform['ISFEATUREVARIANT']: - preProcessor.addIncludePath(preInclude.Dir()) - - # and EPOCROOT/epoc32/include - preProcessor.addIncludePath(aBuildPlatform['EPOCROOT'].Append('epoc32/include')) - - # and the directory containing the bld.inf file - if self.__RootLocation is not None and str(self.__RootLocation) != "": - preProcessor.addIncludePath(self.__RootLocation) - - # and the directory containing the file we are processing - preProcessor.addIncludePath(self.filename.Dir()) + # Set the preprocessor include paths + self.setPreProcessorIncludePaths(preProcessor, aBuildPlatform) # there is always a pre-include file + preInclude = aBuildPlatform['VARIANT_HRH'] preProcessor.setPreIncludeFile(preInclude) - macros = ["SBSV2"] - - if config_macros: - macros.extend(config_macros) - - if macros: - for macro in macros: - preProcessor.addMacro(macro + "=_____" +macro) - - # extra "raw" macros that do not need protecting - preProcessor.addMacro("__GNUC__=3") + # Set the preprocessor macros + self.setPreProcessorMacros(preProcessor, aBuildPlatform) preProcessorOutput = preProcessor.preprocess() # Resurrect preprocessing replacements - pattern = r'([\\|/]| |) ?_____(('+macros[0]+')' - for macro in macros[1:]: + pattern = r'([\\|/]| |) ?_____(('+self.macros[0]+')' + for macro in self.macros[1:]: pattern += r'|('+macro+r')' pattern += r'\s*)' @@ -524,6 +492,73 @@ self.__PreProcessedContent[key] = text return self.__PreProcessedContent[key] + + def setPreProcessorMacros(self, aPreprocessor, aBuildPlatform): + """ Apply the macros for aBuildPlatform to a preprocessor object. """ + preprocessormacros = self.preparePreProcessorMacros(aBuildPlatform) + for macro in preprocessormacros: + aPreprocessor.addMacro(macro) + + def preparePreProcessorMacros(self, aBuildPlatform): + """ Prepare a list of macros (e.g. for use by the preprocessor) """ + prepared_macros = [] + config_macros = (aBuildPlatform['PLATMACROS']).split() + macros = ["SBSV2"] + + if config_macros: + macros.extend(config_macros) + + if macros: + for macro in macros: + prepared_macros.append(macro + "=_____" +macro) + + self.macros = macros # For later use + + # extra "raw" macros that do not need protecting + prepared_macros.append("__GNUC__=3") + + return prepared_macros + + def setPreProcessorIncludePaths(self, aPreprocessor, aBuildPlatform): + """ setPreProcessorIncludePaths: set the preprocessor include paths """ + ppip = self.preparePreProcessorIncludePaths(aBuildPlatform) + aPreprocessor.addIncludePaths(ppip) + + def preparePreProcessorIncludePaths(self, aBuildPlatform): + """ Prepare a list of the include paths for use by the preprocessor. """ + paths = [] + + # always have the current directory on the include path + paths.append('.') + + # the SYSTEMINCLUDE directories defined in the build config + # should be on the include path. This is added mainly to support + # Feature Variation as SYSTEMINCLUDE is usually empty at this point. + systemIncludes = aBuildPlatform['SYSTEMINCLUDE'] + if systemIncludes: + paths.extend(systemIncludes.split()) + + preInclude = aBuildPlatform['VARIANT_HRH'] + + # for non-Feature Variant builds, the directory containing the HRH should + # be on the include path + if not aBuildPlatform['ISFEATUREVARIANT']: + paths.append(preInclude.Dir()) + + # and EPOCROOT/epoc32/include + paths.append(aBuildPlatform['EPOCROOT'].Append('epoc32/include')) + + # and the directory containing the bld.inf file + if self.__RootLocation is not None and str(self.__RootLocation) != "": + paths.append(self.__RootLocation) + + # and the directory containing the file we are processing. + # This won't always be applicable - if the client is a front-end query for preprocessing + # include paths then there's no bld.inf path to take into account + if self.filename.Dir().Exists(): + paths.append(self.filename.Dir()) + + return paths class MMPFile(MetaDataFile): """A generic representation of a Symbian metadata file @@ -1252,6 +1287,7 @@ self.__compressionKeyword = "" self.sources = [] self.capabilities = [] + self.documents = [] self.__TARGET = "" self.__TARGETEXT = "" @@ -1568,6 +1604,21 @@ toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/") self.__debug("Set "+toks[0]+" to " + toks1) self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1)) + + elif varname == 'TRACES': + self.__debug("Set " + toks[0] + " to 1" ) + self.BuildVariant.AddOperation(raptor_data.Set(varname, "1")) + + if len(toks) == 1: + toks1 = "../traces" + else: + toks1 = os.path.join(toks[1], "traces").replace("\\","/") + path = toks1 + "/" + self.__TARGET + "_" + self.__TARGETEXT + resolved = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, path) + self.BuildVariant.AddOperation(raptor_data.Append('USERINCLUDE', resolved)) + self.__userinclude += ' ' + resolved + self.__debug(" %s = %s", "USERINCLUDE", self.__userinclude) + elif varname=='APPLY': self.ApplyVariants.append(toks[1]) elif varname=='ARMFPU': @@ -1673,9 +1724,13 @@ self.__debug( "Remembering self.sourcepath state: "+str(toks[0])+" is now " + self.__sourcepath) self.__debug("selfcurrentMmpFile: " + self.__currentMmpFile) return "OK" - - - def doSourceAssignment(self,s,loc,toks): + + def __doAssignment(self,filelist,toks): + """ Ancillary method factorying out the common functionality between doSourceAssignment + and doDocumentAssignment. Arguments are + filelist - list to append items to, should be self.sources or self.documents + toks - toks parameter as passed from PyParsing. """ + self.__currentLineNumber += 1 self.__debug( "Setting "+toks[0]+" to " + str(toks[1])) for file in toks[1]: @@ -1687,23 +1742,31 @@ # If the SOURCEPATH itself begins with a '/', then dont look up the caseless version, since # we don't know at this time what $(EPOCROOT) will evaluate to. if source.GetLocalString().startswith('$(EPOCROOT)'): - self.sources.append(str(source)) - self.__debug("Append SOURCE " + str(source)) + filelist.append(str(source)) + self.__debug("Append " + toks[0] + " " + str(source)) else: foundsource = source.FindCaseless() if foundsource == None: # Hope that the file will be generated later - self.__debug("Sourcefile not found: %s" % source) + self.__debug("%s file not found: %s" % (toks[0], source)) foundsource = source - self.sources.append(str(foundsource)) - self.__debug("Append SOURCE " + str(foundsource)) + filelist.append(str(foundsource)) + self.__debug("Append " + toks[0] + " " + str(foundsource)) self.__debug(" sourcepath: " + self.__sourcepath) return "OK" + def doSourceAssignment(self,s,loc,toks): + """ Populate the list of source files from the MMP. """ + self.__doAssignment(self.sources,toks) + + def doDocumentAssignment(self,s,loc,toks): + """ Populate the list of document files from the MMP. """ + self.__doAssignment(self.documents,toks) + # Resource def doOldResourceAssignment(self,s,loc,toks): @@ -2137,10 +2200,17 @@ if (self.__LINKAS): defaultRootName = self.__LINKAS - resolvedDefFile = self.resolveDefFile(defaultRootName, aBuildPlatform) + (resolvedDefFile, isSecondaryDefFile) = self.resolveDefFile(defaultRootName, aBuildPlatform) + # We need to store the resolved .def file and location for the FREEZE target self.__debug("Resolved def file: %s" % resolvedDefFile ) - # We need to store this resolved deffile location for the FREEZE target self.BuildVariant.AddOperation(raptor_data.Set("RESOLVED_DEFFILE", resolvedDefFile)) + # We need to store the primary/secondary status of the resolved .def file as some configurations + # require additional processing based on the result + secondaryDefFile = "" + if isSecondaryDefFile: + secondaryDefFile = "1" + self.__debug("Set RESOLVED_DEFFILE_SECONDARY to '%s'" % secondaryDefFile) + self.BuildVariant.AddOperation(raptor_data.Set("RESOLVED_DEFFILE_SECONDARY", secondaryDefFile)) # If a deffile is specified, an FLM will put in a dependency. # If a deffile is specified then raptor_meta will guess a name but: @@ -2298,6 +2368,12 @@ # and performance over using multiple Append operations. self.BuildVariant.AddOperation(raptor_data.Set("SOURCE", " ".join(self.sources))) + + # Put the list of document files in with one Set operation - saves memory + # and performance over using multiple Append operations. + self.BuildVariant.AddOperation(raptor_data.Set("DOCUMENT", + " ".join(self.documents))) + def validate(self): """Test that the parsed MMP file is correct. @@ -2348,14 +2424,25 @@ """Returns a fully resolved DEFFILE entry depending on .mmp file location and TARGET, DEFFILE and NOSTRICTDEF entries in the .mmp file itself (where appropriate). Is able to deal with target names that have multiple '.' characters e.g. messageintercept.esockdebug.dll + Supports configurations that allow primary and secondary .def file locations. """ resolvedDefFile = "" platform = aBuildPlatform['PLATFORM'] + isSecondaryDefaultDefFile = False # Not having a default .def file directory is a pretty strong indicator that # .def files aren't supported for the particular platform if PlatformDefaultDefFileDir.has_key(platform): + + # Some configurations support both primary and secondary default .def file locations - we need to take this + # into account in resolving .def file locations + primaryDefaultDefFileDir = PlatformDefaultDefFileDir[platform] + secondaryDefaultDefFileDir = "" + + if type(PlatformDefaultDefFileDir[platform]) == list: + (primaryDefaultDefFileDir, secondaryDefaultDefFileDir) = PlatformDefaultDefFileDir[platform] + (targetname,targetext) = os.path.splitext(aTARGET) (defname,defext) = os.path.splitext(self.deffile) if defext=="": @@ -2366,36 +2453,47 @@ targetname += defext if not self.deffile: + # No DEFFILE entry - expected .def filename will be based on the target name resolvedDefFile = targetname else: + # DEFFILE listed - take into account the value, depending on what format it takes if re.search('[\\|\/]$', self.deffile): # If DEFFILE is *solely* a path, signified by ending in a slash, then TARGET is the # basis for the default .def filename but with the specified path as prefix resolvedDefFile = self.deffile + targetname - else: resolvedDefFile = defname - resolvedDefFile = resolvedDefFile.replace('~', PlatformDefaultDefFileDir[platform]) - - if resolvedDefFile: - if not self.nostrictdef: - resolvedDefFile += 'u' - - if self.__explicitversion: - resolvedDefFile += '{' + self.__versionhex + '}' - - resolvedDefFile += defext - - - # If a DEFFILE statement doesn't specify a path in any shape or form, prepend the default .def file - # location based on the platform being built - if not re.search('[\\\/]+', self.deffile): - resolvedDefFile = '../'+PlatformDefaultDefFileDir[platform]+'/'+resolvedDefFile - - resolvedDefFile = raptor_utilities.resolveSymbianPath(self.__defFileRoot, resolvedDefFile, 'DEFFILE', "", str(aBuildPlatform['EPOCROOT'])) - - return resolvedDefFile + resolvedDefFile = resolvedDefFile.replace('~', primaryDefaultDefFileDir) + + if not self.nostrictdef: + resolvedDefFile += 'u' + + if self.__explicitversion: + resolvedDefFile += '{' + self.__versionhex + '}' + + resolvedDefFile += defext + + # If the resolved .def file we have so far doesn't include a path in any shape or form, we prepend the default, + # implicit, .def file location based on the configuration being built + if not re.search('[\\\/]+', self.deffile): + resolvedDefFile = '../'+primaryDefaultDefFileDir+'/'+resolvedDefFile + + # Some configurations support a secondary, "fall back", .def file location if a .def file doesn't physically + # exist at the primary location. + # We therefore check exisitance of the primary located file if a secondary location is available, and use the + # secondary location if required (recording the fact that the secondary file has been used, as this can influence + # downstream processing). + if secondaryDefaultDefFileDir: + primaryFileCheck = raptor_utilities.resolveSymbianPath(self.__defFileRoot, resolvedDefFile, 'DEFFILE', "", str(aBuildPlatform['EPOCROOT'])) + + if not os.path.exists(primaryFileCheck): + isSecondaryDefaultDefFile = True + resolvedDefFile = '../'+secondaryDefaultDefFileDir+'/'+os.path.basename(resolvedDefFile) + + resolvedDefFile = raptor_utilities.resolveSymbianPath(self.__defFileRoot, resolvedDefFile, 'DEFFILE', "", str(aBuildPlatform['EPOCROOT'])) + + return (resolvedDefFile, isSecondaryDefaultDefFile) def CheckedGet(self, key, default = None): @@ -2522,7 +2620,8 @@ detail['VARIANT_HRH'] = variantHRH self.__Raptor.Info("'%s' uses variant hrh file '%s'", buildConfig.name, variantHRH) detail['SYSTEMINCLUDE'] = evaluator.CheckedGet("SYSTEMINCLUDE") - + + detail['TARGET_TYPES'] = evaluator.CheckedGet("TARGET_TYPES") # find all the interface names we need ifaceTypes = evaluator.CheckedGet("INTERFACE_TYPES") @@ -3243,12 +3342,28 @@ # what interface builds this node? try: - interfaceName = buildPlatform[backend.getTargetType()] - mmpSpec.SetInterface(interfaceName) + targettype = backend.getTargetType() + validtargettypes = buildPlatform['TARGET_TYPES'].split() except KeyError: - self.__Raptor.Error("Unsupported target type '%s' in %s", - backend.getTargetType(), - str(mmpFileEntry.filename), + # Shouldn't get this since it should have been CheckedGetted already + self.__Raptor.Error("TARGET_TYPES not defined in platform %s", + buildPlatform['PLATFORM']) + + try: + if not targettype in validtargettypes: + self.__Raptor.Error("Unsupported target type '%s' in %s - should be one of %s", + targettype, + str(mmpFileEntry.filename), + ", ".join(validtargettypes), + bldinf=str(bldInfFile)) + else: + interfaceName = buildPlatform[targettype] + mmpSpec.SetInterface(interfaceName) + except KeyError: + # Shouldn't get this far unless INTERFACE_TYPES doesn't contain TARGET_TYPES + self.__Raptor.Error("%s interface not defined for %s (invalid configuration?)", + targettype, + buildPlatform['PLATFORM'], bldinf=str(bldInfFile)) continue diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/raptor_version.py --- a/sbsv2/raptor/python/raptor_version.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/raptor_version.py Thu Aug 12 09:00:16 2010 +0100 @@ -14,9 +14,12 @@ # Description: # raptor version information module -# replace CHANGESET with the Hg changeset for ANY release +# replace ISODATE with the creation date of the release +# replace CHANGESET with the Hg changeset of the release +# +# both of these are done automatically by the installer builder. -version=(2,14,2,"2010-07-13","symbian build system","CHANGESET") +version=(2,15,0,"ISODATE","symbian build system","CHANGESET") def numericversion(): """Raptor version string""" diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/python/raptor_xml.py --- a/sbsv2/raptor/python/raptor_xml.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/python/raptor_xml.py Thu Aug 12 09:00:16 2010 +0100 @@ -336,10 +336,10 @@ aContainers[parent.tagName] = name self.__GetElementContainers(parent, aContainers) - + def __ProcessSystemModelMetaElement(self, aElement): # stub method - may deal with metadata elements at some point in the future - return + return def __ProcessSystemModelElement(self, aElement): """Search for XML elements with 'bldFile' attributes and resolve concrete bld.inf locations @@ -353,7 +353,7 @@ # The effective "layer" is the item whose parent does not have an id (or name in 2.x and earlier) if not aElement.parentNode.hasAttribute(self.__IdAttribute) : currentLayer = aElement.getAttribute(self.__IdAttribute) - + if not self.__LayerDetails.has_key(currentLayer): self.__LayerDetails[currentLayer] = [] @@ -389,8 +389,12 @@ if not group.isAbsolute() and bldInfRoot: group = generic_path.Join(bldInfRoot, group) else: - # all paths are changed by root var in 3.x - if bldInfRoot: + # relative paths for v3 + if not group.isAbsolute(): + group = generic_path.Join(generic_path.Join(self.__SystemDefinitionFile).Dir(),group) + # absolute paths for v3 + # are relative to bldInfRoot if set, or relative to the drive root otherwise + elif bldInfRoot: group = generic_path.Join(bldInfRoot, group) bldinf = generic_path.Join(group, "bld.inf").FindCaseless() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/style/filter_html.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/style/filter_html.css Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,33 @@ +body +{ + font-family: monospace; +} + +pre { background: #cccccc; } + +table +{ + width: 100%; + border: 1px solid black; +} + +th.numbers +{ + width: 10%; +} + +td +{ + text-align: center; +} + +td.name +{ + text-align: left; +} +td.ok { background: #80ff80; } +td.error { background: #ff8080; } +td.warning { background: #ffff80; } +td.remark { background: #8080ff; } +td.missing { background: #c0c0c0; } + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/cluster/headtest.sh diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/cluster/nodetest.sh diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/cluster/pvmtest.sh diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/common/raptor_tests.py --- a/sbsv2/raptor/test/common/raptor_tests.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/common/raptor_tests.py Thu Aug 12 09:00:16 2010 +0100 @@ -449,23 +449,32 @@ def posttest(self): # what to do after the test has run - # count the targets that got built + # count the targets that got built, recording those that are found + # to be missing found = 0 missing = [] for t in self.targets: + # Either we're looking at a single target file here, or a list of related target files where + # at least one needs to match. We therefore use a list for the check that includes one or + # more items if type(t) is not list: - target_alternatives=[t] + unresolved_targets=[t] + else: + unresolved_targets=t + + resolved_targets = [] + for target in unresolved_targets: + resolved_targets.append(os.path.normpath(ReplaceEnvs(target))) found_flag = False - for alt in target_alternatives: - tgt = os.path.normpath(ReplaceEnvs(alt)) - if os.path.exists(tgt): + for target in resolved_targets: + if os.path.exists(target): found_flag = True break if found_flag: found += 1 else: - missing.append(tgt) + missing.append(resolved_targets) # count the errors and warnings warn = 0 @@ -529,8 +538,16 @@ if len(missing) != self.missing: print "MISSING: %d, expected %s" % (len(missing), self.missing) - for file in missing: - print "\t%s" % (file) + + # Missing entries are lists containing either a single missing file, or multiple alternative + # files that were all found to be missing when checked + for entry in missing: + for index,file in enumerate(entry): + if index != len(entry)-1: + suffix = " or" + else: + suffix = "" + print "\t%s" % (file) + suffix if warn != self.warnings: print "WARNINGS: %d, expected %d" % (warn, self.warnings) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/common/run_tests.py --- a/sbsv2/raptor/test/common/run_tests.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/common/run_tests.py Thu Aug 12 09:00:16 2010 +0100 @@ -535,3 +535,6 @@ upload_location = options.upload) run_tests.run_tests() +if run_tests.suites_failed: + sys.exit(1) + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/config/api.xml --- a/sbsv2/raptor/test/config/api.xml Wed Jul 28 13:20:46 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/configapi/api.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/configapi/api.xml Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun01/testrig01.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun02/testrig02.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun03/testrig03.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun04/testrig04.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun05/testrig05.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun06/testrig06.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun07/testrig07.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/core_utils/GeneratedMakefiles/TestRun08/testrig08.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/envelope/2quarter.xml diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/envelope/preexport.xml diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/run diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/run.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/dependencies.py --- a/sbsv2/raptor/test/smoke_suite/dependencies.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/dependencies.py Thu Aug 12 09:00:16 2010 +0100 @@ -86,7 +86,7 @@ [".*recipe name='compile'", 2], [".*recipe name='win32compile2object'", 2], [".*recipe name='compile2object'", 1], - [".*recipe name='resourcecompile'", 1] + [".*recipe name='resourcecompile", 2] ] @@ -127,20 +127,24 @@ t.name ="invalid_dependency_files" t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" - t.command = """ - sleep 1 - touch smoke_suite/test_resources/dependencies/dependency.cpp - echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d - echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d - echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d - echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> """+buildLocation+"""/dependency__resource_apps_sc.rpp.d - sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel - sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean - sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" - t.mustmatch = [] + # use one long bash command so that we can capture + # the output in a way that isn't messed up with all the ordering confused. + t.command = " mkdir -p $(EPOCROOT)/epoc32/build/smoketestlogs ; { sleep 1 ; set -x ; \ +touch smoke_suite/test_resources/dependencies/dependency.cpp; \ +echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> %s/armv5/urel/dependency.o.d ; \ +echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> %s/winscw/urel/dependency.o.d ;\ +echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> %s/dependency_exe/tools2/rel/%s/dependency.o.d ;\ +echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> %s/dependency__resource_apps.rsc.d ;\ +sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ;\ +sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean ;\ +sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel ; } > ${SBSLOGFILE} 2>&1; grep 'missing separator' ${SBSLOGFILE} " %(buildLocation, buildLocation, buildLocation, hostPlatformOffset, buildLocation) + # We expect an error from the first build due to the deliberate dependency file corruption + t.mustmatch = [ + ".*dependency.o.d:[0-9]+: \*\*\* missing separator" + ] t.countmatch = [] t.warnings = 0 - t.errors = 1 # We expect an error from the first build due to the deliberate dependency file corruption + t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) @@ -156,6 +160,7 @@ echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" + t.mustmatch = [] t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/dll_x86.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/dll_x86.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,46 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "dll_x86" + t.description = "Build a basic DLL TARGETTYPE for x86" + t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c x86" + t.targets = [ + "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll", + "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll.map", + "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll", + "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll.map", + "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll.lib", + "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll{000a0000}.lib" + ] + t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [ + "createstaticdll_dll/x86/udeb/CreateStaticDLL.o", + "createstaticdll_dll/x86/udeb/CreateStaticDLL.o.d", + "createstaticdll_dll/x86/urel/CreateStaticDLL.o", + "createstaticdll_dll/x86/urel/CreateStaticDLL.o.d", + "createstaticdll_dll/x86/udeb/createstaticdll_udeb_objects.via", + "createstaticdll_dll/x86/urel/createstaticdll_urel_objects.via", + ["createstaticdll_dll/x86/udeb/createstaticdll.prep", + "createstaticdll_dll/x86/urel/createstaticdll.prep"], + ["createstaticdll_dll/x86/udeb/createstaticdll.lib.exp", + "createstaticdll_dll/x86/urel/createstaticdll.lib.exp"] + ]) + + t.run("windows") + return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py --- a/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py Thu Aug 12 09:00:16 2010 +0100 @@ -27,8 +27,8 @@ t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw" t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_HelloWorld_sc.rpp", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld.rsc.rpp", + "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -91,8 +91,8 @@ "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", "helloworld_exe/winscw/urel/helloworld_urel_objects.lrf", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.rpp", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d" ]) t.run() @@ -113,7 +113,7 @@ touch smoke_suite/test_resources/simple_gui/HelloWorld.rss sbs -f - --source-target=smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp --source-target=smoke_suite/test_resources/simple_gui/HelloWorld.rss -b smoke_suite/test_resources/simple_gui/Bld.inf""" t.countmatch = [ - [".*recipe name='resource(preprocess|header|compile)'", 3], + [".*recipe name='resource(dependencies|compile)'", 2], [".*recipe name='compile'.*", 2], [".*recipe name='win32compile2object'.*", 2] ] @@ -134,7 +134,7 @@ [".*make.*Nothing to be done for.*SOURCETARGET_.*", 10] ] t.mustnotmatch = [ - ".*recipe name='(resourcepreprocess|win32compile2object|compile|win32simplelink|postlink|link)'.*" + ".*recipe name='(resourcecompile|win32compile2object|compile|win32simplelink|postlink|link)'.*" ] t.run() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/exe_x86.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/exe_x86.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,64 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "exe_x86" + t.description = "Build a basic EXE TARGETTYPE for x86" + t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c x86" + t.targets = [ + "$(EPOCROOT)/epoc32/release/x86/udeb/test.exe", + "$(EPOCROOT)/epoc32/release/x86/udeb/test.exe.map", + "$(EPOCROOT)/epoc32/release/x86/urel/test.exe", + "$(EPOCROOT)/epoc32/release/x86/urel/test.exe.map" + ] + t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [ + "test_/x86/udeb/test.o", + "test_/x86/udeb/test.o.d", + "test_/x86/udeb/test1.o", + "test_/x86/udeb/test1.o.d", + "test_/x86/udeb/test2.o", + "test_/x86/udeb/test2.o.d", + "test_/x86/udeb/test3.o", + "test_/x86/udeb/test3.o.d", + "test_/x86/udeb/test4.o", + "test_/x86/udeb/test4.o.d", + "test_/x86/udeb/test5.o", + "test_/x86/udeb/test5.o.d", + "test_/x86/udeb/test6.o", + "test_/x86/udeb/test6.o.d", + "test_/x86/urel/test.o", + "test_/x86/urel/test.o.d", + "test_/x86/urel/test1.o", + "test_/x86/urel/test1.o.d", + "test_/x86/urel/test2.o", + "test_/x86/urel/test2.o.d", + "test_/x86/urel/test3.o", + "test_/x86/urel/test3.o.d", + "test_/x86/urel/test4.o", + "test_/x86/urel/test4.o.d", + "test_/x86/urel/test5.o", + "test_/x86/urel/test5.o.d", + "test_/x86/urel/test6.o", + "test_/x86/urel/test6.o.d", + "test_/x86/udeb/test_udeb_objects.via", + "test_/x86/urel/test_urel_objects.via" + ]) + + t.run("windows") + return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/featurevariants.py --- a/sbsv2/raptor/test/smoke_suite/featurevariants.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/featurevariants.py Thu Aug 12 09:00:16 2010 +0100 @@ -167,8 +167,8 @@ "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant_urel_objects.via", "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def", "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso", - "dummy_inv_dll/dummy_inv_dummy_sc.rpp", - "dummy_inv_dll/dummy_inv_dummy_sc.rpp.d" + "dummy_inv_dll/dummy_inv_dummy.rsc.rpp", + "dummy_inv_dll/dummy_inv_dummy.rsc.d" ] variantBuildTargetsDefaultTree = [ @@ -292,12 +292,12 @@ ] variantBuildTargetsGeneric = [ - "dummy_var1_dll/dummy_var1_dummy_sc.rpp", - "dummy_var1_dll/dummy_var1_dummy_sc.rpp.d", - "dummy_var2_dll/dummy_var2_dummy_sc.rpp", - "dummy_var2_dll/dummy_var2_dummy_sc.rpp.d", - "dummy_var3_exe/dummy_var3_dummy_sc.rpp", - "dummy_var3_exe/dummy_var3_dummy_sc.rpp.d" + "dummy_var1_dll/dummy_var1_dummy.rsc.rpp", + "dummy_var1_dll/dummy_var1_dummy.rsc.d", + "dummy_var2_dll/dummy_var2_dummy.rsc.rpp", + "dummy_var2_dll/dummy_var2_dummy.rsc.d", + "dummy_var3_exe/dummy_var3_dummy.rsc.rpp", + "dummy_var3_exe/dummy_var3_dummy.rsc.d" ] sbscommand = "sbs -b smoke_suite/test_resources/bv/bld.inf -c armv5 " + \ diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/gccxml.py --- a/sbsv2/raptor/test/smoke_suite/gccxml.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/gccxml.py Thu Aug 12 09:00:16 2010 +0100 @@ -32,9 +32,9 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", @@ -66,9 +66,9 @@ t.antitargets = ["$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"] t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/gnumakefile_what.py --- a/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py Thu Aug 12 09:00:16 2010 +0100 @@ -23,6 +23,11 @@ t.name = "gnumakefile_what" t.command = "sbs -b smoke_suite/test_resources/gnumakefile/bld.inf --what" componentpath = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/gnumakefile")) + # The raptor tests standardise on uppercase drive letters + # so make this the same thus it will match strings created + # inside make/raptor from an EPOCROOT with an uppercase + # drive letter. + componentpath = componentpath[0].upper() + componentpath[1:] t.output_expected_only_once = True t.stdout = [ diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/gui_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/gui_whatlog.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/gui_whatlog.py Thu Aug 12 09:00:16 2010 +0100 @@ -46,8 +46,8 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_HelloWorld_sc.rpp", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld.rsc.rpp", + "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -108,7 +108,7 @@ "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d" ]) t.stdout = [ "", diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/implib_winscw.py --- a/sbsv2/raptor/test/smoke_suite/implib_winscw.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_winscw.py Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -26,8 +26,8 @@ "$(EPOCROOT)/epoc32/release/winscw/udeb/simple_implib.lib" ] t.addbuildtargets('smoke_suite/test_resources/simple_implib/bld.inf', [ - ["simple_implib/simple_implib_lib/winscw/udeb/simple_implib.prep.def", - "simple_implib/simple_implib_lib/winscw/urel/simple_implib.prep.def"] + ["simple_implib_lib/winscw/udeb/simple_implib.prep.def", + "simple_implib_lib/winscw/urel/simple_implib.prep.def"] ]) t.run() return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/implib_x86.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/implib_x86.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,33 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "implib_x86" + t.description = "Build a basic IMPLIB TARGETTYPE for x86" + t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c x86" + t.targets = [ + "$(EPOCROOT)/epoc32/release/x86/lib/simple_implib.lib" + ] + t.addbuildtargets("smoke_suite/test_resources/simple_implib/bld.inf", [ + ["simple_implib_lib/x86/udeb/simple_implib.prep", + "simple_implib_lib/x86/urel/simple_implib.prep"], + ]) + + t.run("windows") + return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/lib_x86.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/lib_x86.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,62 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest +from raptor_tests import ReplaceEnvs +import os + +def run(): + # Generate source files for simple_lib tests + dir = ReplaceEnvs("$(SBS_HOME)/test/smoke_suite/test_resources/simple_lib") + zs = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" + for i in range(1, 100): + file = open(os.path.join(dir, zs + "_" + str(i) + ".cpp"), "w") + file.write("int f(void) { return 1; }\n") + file.close() + + # Convenience method to list generated source build output + def __generatedFiles(aConfig): + udeb = "etest_lib/%s/udeb/" % aConfig + urel = "etest_lib/%s/urel/" % aConfig + + generated = [] + for i in range(1, 100): + generated.append(udeb + zs + "_" + str(i) + ".o") + generated.append(udeb + zs + "_" + str(i) + ".o.d") + generated.append(urel + zs + "_" + str(i) + ".o") + generated.append(urel + zs + "_" + str(i) + ".o.d") + return generated + + buildtargets = [ + "etest_lib/x86/udeb/etest_udeb_objects.via", + "etest_lib/x86/udeb/test_lib.o", + "etest_lib/x86/urel/etest_urel_objects.via", + "etest_lib/x86/urel/test_lib.o" + ] + buildtargets.extend(__generatedFiles("x86")) + + t = SmokeTest() + t.name = "lib_x86" + t.description = "Build a basic LIB TARGETTYPE for x86" + t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c x86" + t.targets = [ + "$(EPOCROOT)/epoc32/release/x86/udeb/etest.lib", + "$(EPOCROOT)/epoc32/release/x86/urel/etest.lib" + ] + t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', buildtargets) + + t.run("windows") + return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/mmp_keywords.py --- a/sbsv2/raptor/test/smoke_suite/mmp_keywords.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/mmp_keywords.py Thu Aug 12 09:00:16 2010 +0100 @@ -315,7 +315,26 @@ t.targets = [] t.run() - + + # Test keyword: DOCUMENT + t.id = "75o" + t.name = "mmp_keyword_document" + # Note: in t.command, the makefile is cat'd through sed to remove the .DEFAULT double-colon rule's tag to ensure that t.run succeeds. + t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 reallyclean; " + \ + "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf --no-depend-generate -c armv5_urel -m ${SBSMAKEFILE}; " + \ + "cat ${SBSMAKEFILE}_all.default" + + t.mustmatch_singleline = ["DOCUMENT:=.*test/smoke_suite/test_resources/mmp/mmp1/src/file01\.txt\\s+.*test/smoke_suite/test_resources/mmp/mmp1/src/file02\.txt"] + t.mustnotmatch = [] + t.countmatch = [] + + t.errors = 0 + t.warnings = 0 + t.returncode = 0 + t.targets = [] + + t.run() + t.id = "75" t.name = "mmp_keywords" t.print_result() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/query_cli.py --- a/sbsv2/raptor/test/smoke_suite/query_cli.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/query_cli.py Thu Aug 12 09:00:16 2010 +0100 @@ -53,13 +53,72 @@ "" ] t.run() - + + winscwtargets =[ "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""] + armtargets = winscwtargets + [ + "", + "" ] + tools2targets = [ "", + ""] + t.name = "query_cli_config" t.command = "sbs --query=config[armv5_urel]" t.mustmatch_singleline = [ "", - "fullname='arm\.v5\.urel\.rvct.*'", + "meaning='arm\.v5\.urel\.rvct.*'", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + armtargets + [ + "", + "", "outputpath='.*/epoc32/release/armv5/urel'", + "include path='.*/epoc32/include/variant'", + "include path='.*/epoc32/include'", + "preinclude file='.*/epoc32/include/variant/Symbian_OS.hrh'", + "macro name='SBSV2' value='_____SBSV2'/>", + "macro name='ARMCC' value='_____ARMCC'/>", + "macro name='EPOC32' value='_____EPOC32'/>", + "macro name='MARM' value='_____MARM'/>", + "macro name='EABI' value='_____EABI'/>", + "macro name='GENERIC_MARM' value='_____GENERIC_MARM'/>", + "macro name='MARM_ARMV5' value='_____MARM_ARMV5'/>", + "macro name='ARMCC_2' value='_____ARMCC_2'/>", + "macro name='ARMCC_2_2' value='_____ARMCC_2_2'/>", + "macro name='__GNUC__' value='3'/>", + "", "" ] t.mustnotmatch_singleline = [] @@ -69,7 +128,7 @@ t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv" t.mustmatch_singleline = [ "", - "fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'", + "meaning='arm\.v5\.urel\.rvct._.\.test_bv_1'", "outputpath='.*/epoc32/release/armv5\.one/urel'", "" ] @@ -87,7 +146,8 @@ t.mustmatch_singleline = [ "", "outputpath='.*/epoc32/release/winscw/urel'", - "outputpath='.*/epoc32/release/%s/rel'" % t2, + "outputpath='.*/epoc32/release/%s/rel'" % t2 + ] + winscwtargets + tools2targets + [ "" ] t.mustnotmatch_singleline = [] @@ -104,6 +164,17 @@ t.errors = 1 t.returncode = 1 t.run() + + t.name = "query_cli_evaluator_error" + t.command = "sbs --query=config[arm.badenv] --configpath=test/smoke_suite/test_resources/query_cli" + t.mustmatch_singleline = [ + "DONTSETTHISEVER is not set in the environment and has no default", + "DONTSETTHISEVER is not set in the environment and has no default" + ] + t.mustnotmatch_singleline = [] + t.errors = 0 + t.returncode = 0 + t.run() t.name = "query_cli" t.print_result() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/resource.py --- a/sbsv2/raptor/test/smoke_suite/resource.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/resource.py Thu Aug 12 09:00:16 2010 +0100 @@ -39,10 +39,10 @@ t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_HelloWorld_sc.rpp", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"]) + "helloworld_exe/helloworld_HelloWorld.rsc.rpp", + "helloworld_exe/helloworld_HelloWorld.rsc.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.rpp", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d"]) t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] @@ -60,7 +60,7 @@ is used because the weight of 'complete' dependency information would overwhelm make. """ buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf') - res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d" + res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource.rsc.d" t.targets = [ @@ -68,7 +68,6 @@ "$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.rsc", "$(EPOCROOT)/epoc32/data/z/resource/dependentresource/dependentresource.rsc", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", - "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", "$(EPOCROOT)/epoc32/include/testresource.hrh", "$(EPOCROOT)/epoc32/include/testresource.rsg", "$(EPOCROOT)/epoc32/include/onelang.rsg", @@ -86,18 +85,19 @@ "dependentresource_/dependentresource_dependentresource.rsc", "testresource_/testresource_dependentresource.r01", "testresource_/testresource_dependentresource.rsc", - "testresource_/testresource_testresource_01.rpp", - "testresource_/testresource_testresource_01.rpp.d", - "testresource_/testresource_testresource_02.rpp", - "onelang_/onelang_onelang_sc.rpp", - "testresource_/testresource_testresource_sc.rpp"]) + "testheader_/testheader_testresource_sc.rsg.d", + "testheader_/testheader_testresource_sc.rsg.rpp", + "testresource_/testresource_testresource.r02.rpp", + "onelang_/onelang_onelang_sc.rsg.rpp", + "testresource_/testresource_testresource.rsc.rpp"]) - t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && { X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${X%% *}\" != \"${Y%% *}\" ] ; } && wc -l %s " % (res_depfile, res_depfile) + t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.test[^ ]*.rsg' %s && { X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${X%% *}\" != \"${Y%% *}\" ] ; } && wc -l %s " % (res_depfile, res_depfile) + t.mustnotmatch = [] t.mustmatch = [ - "[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d" + "[23] .*.dependentresource_.dependentresource_dependentresource.rsc.d" ] t.run() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/romfile.py --- a/sbsv2/raptor/test/smoke_suite/romfile.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/romfile.py Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -20,12 +20,12 @@ def run(): t = SmokeTest() - t.id = "55" - t.name = "romfile" t.description = """ Tests the creation and content of an .iby romfile for the armv5.test configuration. Also tests for creation of relevant test batch files. """ + t.id = "55a" + t.name = "romfile_general" t.usebash = True t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ + "-c armv5.test ROMFILE -f - " \ @@ -89,4 +89,33 @@ t.warnings = 2 t.run("linux") + + t.id = "55b" + t.name = "romfile_mmp_include_twice" + t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ + + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ + + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \ + + "&& cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" + + t.targets = [ + "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" + ] + + # Check the content of the generated .iby file + t.mustmatch = [ + r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", + r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", + ] + t.mustnotmatch = [ + # These two files are from two mmp files that included in both bld.inf + # They shouldn't be in the ROM + r".*/d_medch.ldd\s.*" + r".*/d_dma.ldd\s.*" + ] + t.warnings = 0 + t.run() + + t.id = "55" + t.name = "romfile" + t.print_result() return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/slim_debug.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/slim_debug.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,44 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "slim_debug" + t.description = """Exercise the slim_debug variant, checking that command line arguments + are applied selectively.""" + t.usebash = True + + t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5.slimdebug -f-" + t.targets = [ + "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", + "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym", + "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso", + "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso", + "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll", + "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll" + ] + t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', + [ + "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", + "createstaticdll_dll/armv5/urel/CreateStaticDLL.o" + ]) + t.mustnotmatch_singleline = ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*--DNDEBUG"] + t.mustmatch_singleline = ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*-D_DEBUG"] + + t.run() + return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/sysdef_layers.py --- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py Thu Aug 12 09:00:16 2010 +0100 @@ -48,7 +48,7 @@ "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", ] t.addbuildtargets('smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [ - "helloworld_/helloworld_HelloWorld_sc.rpp" + "helloworld_/helloworld_HelloWorld.rsc.rpp" ]) t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [ "helloworld_exe/armv5/udeb/HelloWorld_Application.o", @@ -75,11 +75,11 @@ "helloworld_exe/winscw/urel/HelloWorld_Main.o", "helloworld_exe/winscw/urel/helloworld.UID.CPP", "helloworld_exe/winscw/urel/helloworld_UID_.o", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.rpp" ]) t.countmatch = [ - ["", 34], - ["", 4] + ["", 33], + ["", 3] ] t.run() return t diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/inc/macrotests.h diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/metadep.sh diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/group/shutdownsrv.mmp --- a/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/group/shutdownsrv.mmp Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/group/shutdownsrv.mmp Thu Aug 12 09:00:16 2010 +0100 @@ -32,6 +32,8 @@ userinclude . userinclude ../inc +DOCUMENT file01.txt file02.txt + OS_LAYER_SYSTEMINCLUDE_SYMBIAN #if defined (SYMBIAN_SSM_GRACEFUL_SHUTDOWN) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/src/file01.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/src/file01.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,1 @@ +First file for testing the DOCUMENT keyword. diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/src/file02.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/mmp/mmp1/src/file02.txt Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,1 @@ +First file for testing the DOCUMENT keyword. diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/oe/group/symbian_lib.mmp diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/query_cli/badenv.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/query_cli/badenv.xml Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,13 @@ + + + + + + + + + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/refilter/testfilterterminal diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/refilter/testfilterterminal.bat diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp --- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Thu Aug 12 09:00:16 2010 +0100 @@ -42,9 +42,12 @@ END START RESOURCE testresource.rss -TARGETPATH resource/testresource2 +// The header produced here would clash with that of the previous block +// if the target name were the same +TARGET testheader HEADERONLY -LANG 01 sc +// having multiple lang values doesn't make sense with a headeronly. +LANG sc END START RESOURCE testresource.rss diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple/test.cia --- a/sbsv2/raptor/test/smoke_suite/test_resources/simple/test.cia Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/test.cia Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -16,15 +16,15 @@ */ // Some random assembler or a "straight" dummy function -#ifndef __WINSCW__ +#if defined (__WINSCW__) || defined (__X86__) +int fred(int i) + { + return 1; + } +#else EXPORT_C __NAKED__ void dummy() { asm("stmia r0, {r4-r11, sp, lr} "); asm("mov r0, #0"); } -#else -int fred(int i) - { - return 1; - } #endif diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CREATESTATICDLLX86GCC.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CREATESTATICDLLX86GCC.def Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,5 @@ +EXPORTS + _ZN10CMessenger11ShowMessageEv @ 1 NONAME + _ZN10CMessenger5NewLCER12CConsoleBaseRK7TDesC16 @ 2 NONAME + _ZTI10CMessenger @ 3 NONAME ABSENT ; ## + _ZTV10CMessenger @ 4 NONAME ABSENT ; ## \ No newline at end of file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp --- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.cpp Thu Aug 12 09:00:16 2010 +0100 @@ -24,7 +24,7 @@ // construct/destruct -#if !defined(__ARMCC_4__) +#if !defined(__ARMCC_4__) and !defined(__X86__) extern "C" void __ARM_switch8(); void sbs_test() diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.mmp --- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.mmp Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/CreateStaticDLL.mmp Thu Aug 12 09:00:16 2010 +0100 @@ -41,7 +41,9 @@ #if defined(WINS) deffile ./CREATESTATICDLLWINS.def -#elif defined(MARM) +#elif defined(X86GCC) + deffile ./CREATESTATICDLLX86GCC.def +#else deffile ./CREATESTATICDLLARM.def #endif nostrictdef diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_export/executable_file diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_lib/bld.inf diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_lib/simple.mmp diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/simple_lib/test_lib.cpp diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +PRJ_PLATFORMS +ARMV5 WINSCW + +PRJ_MMPFILES +traceon.mmp +../traces_keyword.mmp + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/group/traceon.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/group/traceon.mmp Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,16 @@ + +TARGET traceon.exe +TARGETTYPE EXE + +UID 0x10003901 0x11100010 +LIBRARY euser.lib +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/platform + +SOURCEPATH ../src +SOURCE traceon.cpp + +TRACES +// the above equals below: +// USERINCLUDE ../traces/traceon_exe +// diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/src/traceon.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/src/traceon.cpp Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,15 @@ +// Trace compile macro and header +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "traceonTraces.h" +#endif + +#include "e32def.h" + +char test[] = "test traces keyword"; + +TInt E32Main() +{ + OstTrace0( TRACE_NORMAL, PLACE0, "Test TRACES mmpkeyword" ); + return 0; +} diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/src/traces_keyword.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/src/traces_keyword.cpp Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,15 @@ +// Trace compile macro and header +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "traces_keywordTraces.h" +#endif + +#include "e32def.h" + +char test[] = "test traces keyword with a parameter"; + +TInt E32Main() +{ + OstTrace0( TRACE_NORMAL, PLACE0, "Test TRACES mmpkeyword" ); + return 0; +} diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traceon_exe/OstTraceDefinitions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traceon_exe/OstTraceDefinitions.h Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,7 @@ +#ifndef __OSTTRACEDEFINITIONS_H__ +#define __OSTTRACEDEFINITIONS_H__ +// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler +// REMOVE BEFORE CHECK-IN TO VERSION CONTROL +#define OST_TRACE_COMPILER_IN_USE +#include +#endif diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traces_keyword_exe/OstTraceDefinitions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traces_keyword_exe/OstTraceDefinitions.h Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,7 @@ +#ifndef __OSTTRACEDEFINITIONS_H__ +#define __OSTTRACEDEFINITIONS_H__ +// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler +// REMOVE BEFORE CHECK-IN TO VERSION CONTROL +#define OST_TRACE_COMPILER_IN_USE +#include +#endif diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces_keyword.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/traceon/traces_keyword.mmp Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,16 @@ + +TARGET traces_keyword.exe +TARGETTYPE EXE + +UID 0x10003902 0x11100011 +LIBRARY euser.lib +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/platform + +SOURCEPATH ./src +SOURCE traces_keyword.cpp + +TRACES ./ +// the above equals below: +// USERINCLUDE ./traces/traces_keyword_exe +// diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/tracecompiler_new.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_new.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,50 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.description = "test mmpkeyword: traces" + t.id = "108a" + t.name = "traces_mmpkeyword" + t.command = "sbs -b smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf -c armv5.tracecompiler" + t.targets = [ + "$(EPOCROOT)/epoc32/release/armv5/udeb/traceon.exe", + "$(EPOCROOT)/epoc32/release/armv5/urel/traceon.exe", + "$(EPOCROOT)/epoc32/release/armv5/udeb/traces_keyword.exe", + "$(EPOCROOT)/epoc32/release/armv5/urel/traces_keyword.exe", + "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traceon_exe/traceonTraces.h", + "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traces_keyword_exe/traces_keywordTraces.h", + "$(EPOCROOT)/epoc32/ost_dictionaries/traceon_exe_0x11100010_Dictionary.xml", + "$(EPOCROOT)/epoc32/ost_dictionaries/traces_keyword_exe_0x11100011_Dictionary.xml", + "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traceon_exe_0x11100010_TraceDefinitions.h", + "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traces_keyword_exe_0x11100011_TraceDefinitions.h" + ] + t.addbuildtargets('smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf', [ + "traceon_exe/armv5/udeb/traceon.o", + "traceon_exe/armv5/urel/traceon.o", + "traceon_exe/tracecompile_traceon_exe_11100010.done", + "traces_keyword_exe/armv5/udeb/traces_keyword.o", + "traces_keyword_exe/armv5/urel/traces_keyword.o", + "traces_keyword_exe/tracecompile_traces_keyword_exe_11100011.done", + ]) + t.run() + + t.id = "108" + t.name = "tracecompiler_new" + return t + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/smoke_suite/whatlog_cache.py --- a/sbsv2/raptor/test/smoke_suite/whatlog_cache.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/whatlog_cache.py Thu Aug 12 09:00:16 2010 +0100 @@ -61,8 +61,8 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_HelloWorld_sc.rpp", - "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld.rsc.rpp", + "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -123,7 +123,7 @@ "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", - "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d" ]) t.countmatch = [ ["\$self->{abldcache}->{.*\\\\test\\\\smoke_suite\\\\test_resources\\\\simple_gui target (armv5|winscw) (udeb|urel) -what\'} =", 4], diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/data/ignore.xml diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/data/old_bad.xml diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/data/old_ok.xml diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/mmpparser_unit.py --- a/sbsv2/raptor/test/unit_suite/mmpparser_unit.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/mmpparser_unit.py Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -83,7 +83,13 @@ for i in toks[1]: self.log(self.sourcepath + "\\" + i) return "OK" - + + def doDocumentAssignment(self,s,loc,toks): + self.log("Setting "+toks[0]+" to " + str(toks[1])) + for i in toks[1]: + self.log(self.sourcepath + "\\" + i) + return "OK" + def doStartBitmap(self,s,loc,toks): self.log("BITMAP Create "+toks[0]+" to " + str(toks[1])) return "OK" diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/raptor_api_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_api_unit.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/raptor_api_unit.py Thu Aug 12 09:00:16 2010 +0100 @@ -18,6 +18,7 @@ import raptor import raptor_api import unittest +import raptor_tests class TestRaptorApi(unittest.TestCase): @@ -30,7 +31,7 @@ def testAliases(self): r = raptor.Raptor() - r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + r.cache.Load( generic_path.Join(r.home, "test", "configapi", "api.xml") ) api = raptor_api.Context(r) @@ -39,6 +40,9 @@ self.failUnlessEqual(set(["alias_A","alias_B","s1","s2"]), set(a.name for a in aliases)) + aliaslist = [a.name for a in aliases] # verify that the list is sorted + self.failUnlessEqual(["alias_A","alias_B","s1","s2"], aliaslist) + aliases = api.getaliases(raptor_api.ALL) # ignore type self.failUnlessEqual(len(aliases), 6) @@ -49,7 +53,7 @@ def testConfig(self): r = raptor.Raptor() - r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + r.cache.Load( generic_path.Join(r.home, "test", "configapi", "api.xml") ) api = raptor_api.Context(r) @@ -59,24 +63,59 @@ path = "C:/home/raptor/foo/bar" config = api.getconfig("buildme") - self.failUnlessEqual(config.fullname, "buildme") + self.failUnlessEqual(config.meaning, "buildme") self.failUnlessEqual(config.outputpath, path) + # metadata + + metadatamacros = map(lambda x: str(x.name+"="+x.value) if x.value else str(x.name), config.metadata.platmacros) + metadatamacros.sort() + results = ['SBSV2=_____SBSV2', '__GNUC__=3'] + results.sort() + self.failUnlessEqual(metadatamacros, results) + + includepaths = map(lambda x: str(x.path), config.metadata.includepaths) + includepaths.sort() + expected_includepaths = [raptor_tests.ReplaceEnvs("$(EPOCROOT)/epoc32/include/variant"), + raptor_tests.ReplaceEnvs("$(EPOCROOT)/epoc32/include"), "."] + expected_includepaths.sort() + self.failUnlessEqual(includepaths, expected_includepaths) + + preincludefile = str(config.metadata.preincludeheader.file) + self.failUnlessEqual(preincludefile, raptor_tests.ReplaceEnvs("$(EPOCROOT)/epoc32/include/variant/Symbian_OS.hrh")) + + # build + + sourcemacros = map(lambda x: str(x.name+"="+x.value) if x.value else str(x.name), config.build.sourcemacros) + results = ['__BBB__', '__AAA__', '__DDD__=first_value', '__CCC__', '__DDD__=second_value'] + self.failUnlessEqual(sourcemacros, results) + + compilerpreincludefile = str(config.build.compilerpreincludeheader.file) + self.failUnlessEqual(compilerpreincludefile, raptor_tests.ReplaceEnvs("$(EPOCROOT)/epoc32/include/preinclude.h")) + + expectedtypes = ["one", "two"] + expectedtypes.sort() + types = map(lambda t:t.name, config.build.targettypes) + types.sort() + self.failUnlessEqual(types, expectedtypes) + + # general + config = api.getconfig("buildme.foo") - self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.meaning, "buildme.foo") self.failUnlessEqual(config.outputpath, path) config = api.getconfig("s1") - self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.meaning, "buildme.foo") self.failUnlessEqual(config.outputpath, path) config = api.getconfig("s2.product_A") - self.failUnlessEqual(config.fullname, "buildme.foo.bar.product_A") + self.failUnlessEqual(config.meaning, "buildme.foo.bar.product_A") self.failUnlessEqual(config.outputpath, path) def testProducts(self): r = raptor.Raptor() - r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + r.cache.Load( generic_path.Join(r.home, "test", "configapi", "api.xml") ) api = raptor_api.Context(r) @@ -84,6 +123,8 @@ self.failUnlessEqual(len(products), 2) self.failUnlessEqual(set(["product_A","product_C"]), set(p.name for p in products)) + productlist = [p.name for p in products] # verify that the list is sorted + self.failUnlessEqual(["product_A","product_C"], productlist) # run all the tests diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/test/unit_suite/raptor_meta_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py Thu Aug 12 09:00:16 2010 +0100 @@ -40,6 +40,7 @@ self.__platmacros_armv6 = "ARMCC EPOC32 MARM EABI ARMCC_2 ARMCC_2_2 GENERIC_MARM MARM_ARMV5 ARMV6" self.__platmacros_armv7 = "ARMCC EPOC32 MARM EABI ARMCC_2 ARMCC_2_2 GENERIC_MARM MARM_ARMV5 ARMV7" self.__platmacros_winscw = "CW32 WINS WINSCW" + self.__platmacros_x86gcc = "X86GCC EPOC32" self.variant_hrh = self.__testRoot.Append('metadata/include/test_hrh.hrh') @@ -136,8 +137,21 @@ 'SBS_BUILD_DIR' : str(self.__epocroot) + "/epoc32/build", 'METADEPS' : [] } + + self.X86GCC = { 'PLATFORM': 'X86GCC', + 'EPOCROOT': self.__epocroot, + 'VARIANT_HRH': self.variant_hrh, + 'SYSTEMINCLUDE' : '', + 'id': 2, + 'key': '2222222222222222', + 'key_md5': '2222222222222222', + 'ISFEATUREVARIANT' : False, + 'PLATMACROS' : self.__platmacros_x86gcc, + 'SBS_BUILD_DIR' : str(self.__epocroot) + "/epoc32/build", + 'METADEPS' : [] + } - self.testPlats = [self.ARMV5, self.ARMV5SMP, self.ARMV6, self.ARMV7, self.ARMV7SMP, self.WINSCW] + self.testPlats = [self.ARMV5, self.ARMV5SMP, self.ARMV6, self.ARMV7, self.ARMV7SMP, self.WINSCW, self.X86GCC] # Get the version of CPP that we are using and hope it's correct # since there is no tool check. @@ -222,17 +236,17 @@ bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs') self.__testBuildPlatforms(bldInfTestRoot, 'no_prj_platforms.inf', - [], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML']) + [], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML', 'X86GCC']) self.__testBuildPlatforms(bldInfTestRoot, 'no_plats.inf', - [], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML']) + [], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML', 'X86GCC']) self.__testBuildPlatforms(bldInfTestRoot, 'default_plats.inf', - ['DEFAULT'], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML']) + ['DEFAULT'], ['ARMV7', 'ARMV5', 'WINSCW', 'GCCXML', 'X86GCC']) self.__testBuildPlatforms(bldInfTestRoot, 'default_plats_minus_plat.inf', - ['DEFAULT', '-WINSCW'], ['ARMV7', 'ARMV5', 'GCCXML']) + ['DEFAULT', '-WINSCW'], ['ARMV7', 'ARMV5', 'GCCXML', 'X86GCC']) self.__testBuildPlatforms(bldInfTestRoot, 'single_plat.inf', - ['ARMV5'], ['ARMV5', 'GCCXML']) + ['ARMV5'], ['ARMV5', 'GCCXML', 'X86GCC']) self.__testBuildPlatforms(bldInfTestRoot, 'multiple_plats.inf', - ['ARMV5', 'WINSCW', 'TOOLS'], ['ARMV5', 'WINSCW', 'TOOLS', 'GCCXML']) + ['ARMV5', 'WINSCW', 'TOOLS'], ['ARMV5', 'WINSCW', 'TOOLS', 'GCCXML', 'X86GCC']) return def __testBldInfTestCode(self, aTestRoot, aBldInf, aActual, aExpected): @@ -686,8 +700,9 @@ class DefFileTest(object): """ Test resolveDefFile for a particular set of mmp options """ - def __init__(self, resolveddeffile, mmpfilename, deffilekeyword, target, nostrictdef, platform): - self.resolveddeffile = resolveddeffile + def __init__(self, primarydeffile, secondarydeffile, mmpfilename, deffilekeyword, target, nostrictdef, platform): + self.primarydeffile = primarydeffile + self.secondarydeffile = secondarydeffile self.mmpfilename=mmpfilename self.deffilekeyword=deffilekeyword self.target=target @@ -698,43 +713,58 @@ m = raptor_meta.MMPRaptorBackend(raptor, self.mmpfilename, "") m.deffile = self.deffilekeyword m.nostrictdef = self.nostrictdef - f = m.resolveDefFile(self.target, self.platform) + (resolvedDefFile, isSecondaryDefFile) = m.resolveDefFile(self.target, self.platform) - return path_compare_notdrivelettercase(self.resolveddeffile,f) + expectedDefFile = self.primarydeffile + if isSecondaryDefFile: + expectedDefFile = self.secondarydeffile + + return path_compare_notdrivelettercase(expectedDefFile, resolvedDefFile) defFileTests = [] for testPlat in self.testPlats: epocroot = str(testPlat['EPOCROOT']) releaseDir = testPlat['PLATFORM'].lower() - defFileDir = "eabi" + + # Some configurations support both a primary location and a secondary location for .def files + # In these cases, if the primary location .def file doesn't exist the secondary is used. + primaryDefFileDir = "eabi" + secondaryDefFileLoc = "" if testPlat['PLATFORM'] == "WINSCW": - defFileDir = "bwins" - + primaryDefFileDir = "bwins" + elif testPlat['PLATFORM'] == "X86GCC": + primaryDefFileDir = "bx86gcc" + secondaryDefFileLoc = self.__OSRoot+'/test/eabi' + defFileTests.extend([ DefFileTest( - self.__OSRoot+'/test/'+defFileDir+'/targetu.def', + self.__OSRoot+'/test/'+primaryDefFileDir+'/targetu.def', + secondaryDefFileLoc+'/targetu.def', '/test/component/mmpfile.mmp', '', 'target.exe', False, testPlat), DefFileTest( - self.__OSRoot+'/test/'+defFileDir+'/target.def', + self.__OSRoot+'/test/'+primaryDefFileDir+'/target.def', + secondaryDefFileLoc+'/target.def', '/test/component/mmpfile.mmp', '', 'target.exe', True, testPlat), DefFileTest( - self.__OSRoot+'/test/'+defFileDir+'/targetu.DEF', + self.__OSRoot+'/test/'+primaryDefFileDir+'/targetu.DEF', + secondaryDefFileLoc+'/targetu.DEF', '/test/component/mmpfile.mmp', 'target.DEF', 'target.exe', False, testPlat), DefFileTest( - self.__OSRoot+'/test/'+defFileDir+'/target2.DEF', + self.__OSRoot+'/test/'+primaryDefFileDir+'/target2.DEF', + secondaryDefFileLoc+'/target2.DEF', '/test/component/mmpfile.mmp', 'target2.DEF', 'target.exe', @@ -742,6 +772,7 @@ testPlat), DefFileTest( self.__OSRoot+'/test/component/target2u.DEF', + secondaryDefFileLoc+'/target2u.DEF', '/test/component/mmpfile.mmp', './target2.DEF', 'target.exe', @@ -749,20 +780,23 @@ testPlat), DefFileTest( self.__OSRoot+'/test/component/target2.DEF', + secondaryDefFileLoc+'/target2.DEF', '/test/component/mmpfile.mmp', './target2.DEF', 'target.exe', True, testPlat), DefFileTest( - self.__OSRoot+'/test/component/'+defFileDir+'/target3u.DEF', + self.__OSRoot+'/test/component/'+primaryDefFileDir+'/target3u.DEF', + secondaryDefFileLoc+'/target3u.DEF', '/test/component/mmpfile.mmp', './~/target3.DEF', 'target.exe', False, testPlat), DefFileTest( - epocroot+'/epoc32/include/def/'+defFileDir+'/targetu.def', + epocroot+'/epoc32/include/def/'+primaryDefFileDir+'/targetu.def', + secondaryDefFileLoc+'/targetu.def', '/test/component/mmpfile.mmp', '/epoc32/include/def/~/target.def', 'target.exe', @@ -770,6 +804,7 @@ testPlat), DefFileTest( epocroot+'/epoc32/release/'+releaseDir+'/target.def', + secondaryDefFileLoc+'/target.def', '/test/component/mmpfile.mmp', '/epoc32/release/'+releaseDir+'/target.def', 'target.exe', @@ -777,6 +812,7 @@ testPlat), DefFileTest( self.__OSRoot+'/deffiles/targetu.def', + secondaryDefFileLoc+'/targetu.def', '/test/component/mmpfile.mmp', '/deffiles/target.def', 'target.exe', @@ -785,7 +821,7 @@ ]) for t in defFileTests: - result = t.test(self.raptor) + result = t.test(self.raptor) self.assertEquals(result, True) def dummyMetaReader(self): diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/Makefile --- a/sbsv2/raptor/util/Makefile Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/Makefile Thu Aug 12 09:00:16 2010 +0100 @@ -17,8 +17,14 @@ SHELL:=bash +ifeq ($(CLEANMODE),) .PHONY:: all all:: +else +.PHONY:: clean +clean:: + +endif include utilbuild.mk # need general settings e.g. INSTALLROOT @@ -26,42 +32,23 @@ include gccprogram.mk -# Actual programs -include descramble/Makefile - -include talon/Makefile - -include ransleep/Makefile - -# Some tools not built for windows -ifneq ($(filter $(HOSTPLATFORM),win),win) -ifeq ($(CLEANMODE),) -include bash.mk - -include make.mk - -# Build pvm and pvmgmake later when they have been corrected -#include pvmgmake.mk - -#include pvm.mk - -include python.mk - -include codewarrior.mk - -include bvcpp.mk - -include gccxml.mk - -include dialog.mk +################################################# +ifeq ($(TARGETS),) + TARGETS:=descramble talon ransleep tmkdir + ifneq ($(filter $(HOSTPLATFORM),win),win) + # Some tools not built for windows + # Some of these don't support our special clean mode + TARGETS:=$(TARGETS) bash make python codewarrior bvcpp gccxml dialog + # Build pvm and pvmgmake later when they have been corrected + # pvmgmake pvm + endif endif -endif +$(foreach T,$(TARGETS),$(eval include $(T).mk)) else - clean: @echo "Cleaning" - make $(MAKEFILE) CLEANMODE:=1 | grep '' |sed -r 's#.*(.*).*#\1#' | (read F; while [ $$? -eq 0 ]; do rm -f "$$F"; read F; done; true ) + make $(MAKEFILE) CLEANMODE:=1 | grep '' |sed -r 's#.*(.*).*#\1#' | (read F; while [ $$? -eq 0 ]; do rm -f "$$F"; echo " [rm] $$F"; read F; done; true ) endif diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/descramble.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/descramble.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,29 @@ +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Utility makefile +# +# + +TARGET:=sbs_descramble +SOURCES:=$(SBS_HOME:\=/)/util/descramble/descramble.cpp + +ifeq ($(filter win,$(HOSTPLATFORM)),win) +CFLAGS:=-DWIN32 +LDFLAGS:= +else +CFLAGS:= +LDFLAGS:=-lpthread +endif + +$(eval $(cppprogram)) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/descramble/Makefile --- a/sbsv2/raptor/util/descramble/Makefile Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/descramble/Makefile Thu Aug 12 09:00:16 2010 +0100 @@ -15,15 +15,8 @@ # # -TARGET:=sbs_descramble -SOURCES:=$(SBS_HOME:\=/)/util/descramble/descramble.cpp + +.PHONY: all -ifeq ($(filter win,$(HOSTPLATFORM)),win) -CFLAGS:=-DWIN32 -LDFLAGS:= -else -CFLAGS:= -LDFLAGS:=-lpthread -endif - -$(eval $(cppprogram)) +all: + cd .. && make descramble diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/ext/Python-2.6.2.tgz Binary file sbsv2/raptor/util/ext/Python-2.6.2.tgz has changed diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/ext/Python-2.7.tar.bz2 Binary file sbsv2/raptor/util/ext/Python-2.7.tar.bz2 has changed diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-linux/hudson.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/install-linux/hudson.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,120 @@ + +# hudson runs this from the raptor/util/install-linux directory + +import datetime +import os +import re +import shutil +import subprocess +import sys + +# run "hg id" to get the current branch name and tip changeset + +hgid = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE) +stdout = hgid.communicate()[0] + +if hgid.returncode == 0 and len(stdout) >= 12: + changeset = stdout[0:12] + print "CHANGESET", changeset + + prototype = ("wip" in stdout or "fix" in stdout) + print "PROTOTYPE", prototype +else: + sys.stderr.write("error: failed to get tip mercurial changeset.\n") + sys.exit(1) + +# get today's date in ISO format YYYY-MM-DD + +today = datetime.date.today().isoformat() +print "DATE", today + +# insert the date and changeset into the raptor_version.py file + +filename = "../../python/raptor_version.py" +lines = [] +try: + file = open(filename, "r") + for line in file.readlines(): + if "ISODATE" in line and "CHANGESET" in line: + line = line.replace("ISODATE", today) + line = line.replace("CHANGESET", changeset) + if prototype: + line = line.replace("system", "system PROTOTYPE") + lines.append(line) + else: + lines.append(line) +except IOError, ex: + sys.stderr.write("error: failed to read file '%s'\n%s" % (filename, str(ex))) + sys.exit(1) +finally: + file.close() + +# ... and write the modified raptor_version.py file + +try: + file = open(filename, "w") + for line in lines: + file.write(line) +except IOError, ex: + sys.stderr.write("error: failed to write file '%s'\n%s" % (filename, str(ex))) + sys.exit(1) +finally: + file.close() + +# check that we really did change the raptor version string + +sbs_v = subprocess.Popen(["../../bin/sbs", "-v"], stdout=subprocess.PIPE) +version = sbs_v.communicate()[0] + +if sbs_v.returncode == 0: + print "VERSION", version + if not today in version or not changeset in version: + sys.stderr.write("error: date or changeset does not match the sbs version.\n") + sys.exit(1) + if prototype and not "PROTOTYPE" in version: + sys.stderr.write("error: the sbs version should be marked PROTOTYPE.\n") + sys.exit(1) +else: + sys.stderr.write("error: failed to get sbs version.\n") + sys.exit(1) + +# run the Linux installer maker script + +package_sbs = subprocess.Popen(["./package_sbs.sh", "-s"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) +(stdout, stderr) = package_sbs.communicate() + +if package_sbs.returncode != 0: + sys.stderr.write("error: failed to create linux package of sbs.\n") + sys.exit(1) + +# find the name of the archive in /tmp + +match = re.search('archive "([^"]+)" successfully created', stdout) +if match: + tmp_archive = "/tmp/" + match.group(1) + print "TMP ARCHIVE", tmp_archive +else: + sys.stderr.write("error: failed to find linux archive file.\n") + sys.exit(1) + +# move it to the WORKSPACE root + +if 'WORKSPACE' in os.environ: + name = re.sub(r'/tmp/(sbs-\d+\.\d+\.\d+-).*', r'\1', tmp_archive) + if prototype: + fullname = name + "PROTOTYPE-" + changeset + ".run" + else: + fullname = name + changeset + ".run" + final_archive = os.path.join(os.environ['WORKSPACE'], fullname) + print "WORKSPACE ARCHIVE", final_archive +else: + sys.stderr.write("error: no WORKSPACE is set.\n") + sys.exit(1) + +try: + shutil.move(tmp_archive, final_archive) +except Error, err: + sys.stderr.write("error: could not rename '%s' as '%s'.\n" % (tmp_archive, final_archive)) + sys.exit(1) + +# the end diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-linux/package_sbs.sh --- a/sbsv2/raptor/util/install-linux/package_sbs.sh Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/install-linux/package_sbs.sh Thu Aug 12 09:00:16 2010 +0100 @@ -61,7 +61,7 @@ fi - cd $SBS_HOME && find license.txt RELEASE-NOTES.html bin lib notes $BINARIES python test schema util | + cd $SBS_HOME && find license.txt RELEASE-NOTES.html bin examples lib notes $BINARIES python schema style util | grep -v "$TMPSBS"'/python/\.py$' | grep -v 'flm/test' | grep -v 'util/build' | @@ -74,7 +74,7 @@ echo "VERSION=\"$VERSION\"" >> $TMPSBS/.version if [[ "$packtype" == "binary" ]]; then -chmod a+x $TMPSBS/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/python262/bin/* +chmod a+x $TMPSBS/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/python265/bin/* chmod a+x $TMPSBS/util/pvm3/bin/LINUX/* chmod a+x $TMPSBS/util/$HOSTPLATFORM_DIR/cw_build470msl19/release/Symbian_Tools/Command_Line_Tools/* fi diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-windows/NSIS.zip Binary file sbsv2/raptor/util/install-windows/NSIS.zip has changed diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-windows/hudson.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/install-windows/hudson.py Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,112 @@ + +# hudson runs this from the raptor/util/install-windows directory + +import os +import re +import shutil +import subprocess +import sys + +# run "hg id" to get the current branch name and tip changeset + +hgid = subprocess.Popen(["hg", "id"], stdout=subprocess.PIPE) +stdout = hgid.communicate()[0] + +if hgid.returncode == 0 and len(stdout) >= 12: + changeset = stdout[0:12] + print "CHANGESET", changeset + + prototype = ("wip" in stdout or "fix" in stdout) + print "PROTOTYPE", prototype +else: + sys.stderr.write("error: failed to get tip mercurial changeset.\n") + sys.exit(1) + +# get the raptor version string + +sbs_v = subprocess.Popen(["../../bin/sbs", "-v"], stdout=subprocess.PIPE) +version = sbs_v.communicate()[0] + +if sbs_v.returncode == 0: + print "VERSION", version + if not changeset in version: + sys.stderr.write("error: changeset does not match the sbs version.\n") + sys.exit(1) + if prototype and not "PROTOTYPE" in version: + sys.stderr.write("error: the sbs version should be marked PROTOTYPE.\n") + sys.exit(1) +else: + sys.stderr.write("error: failed to get sbs version.\n") + sys.exit(1) + +# find the SBS_HOME and WIN32_SUPPORT + +if 'SBS_HOME' in os.environ: + sbs_home = os.environ['SBS_HOME'] +else: + sys.stderr.write("error: no SBS_HOME is set.\n") + sys.exit(1) + +if 'WIN32_SUPPORT' in os.environ: + win32_support = os.environ['WIN32_SUPPORT'] +else: + sys.stderr.write("error: no WIN32_SUPPORT is set.\n") + sys.exit(1) + +# run the Windows installer maker script + +if prototype: + postfix = "-PROTOTYPE-" + changeset +else: + postfix = "-" + changeset + +package_sbs = subprocess.Popen(["python", "raptorinstallermaker.py", + "-s", sbs_home, "-w", win32_support, + "--postfix=" + postfix], + stdout=subprocess.PIPE) #, stderr=subprocess.PIPE) +(stdout, stderr) = package_sbs.communicate() + +if package_sbs.returncode == 0: + match = re.search('Output: "([^"]+)"', stdout) + zip_match = re.search('Zipoutput: "([^"]+)"', stdout) + if match: + tmp_archive = match.group(1) + print "TMP ARCHIVE", tmp_archive + else: + sys.stderr.write("error: failed to find packaged filename.\n") + sys.exit(1) + + if zip_match: + tmp_zip_archive = zip_match.group(1) + print "TMP ZIP ARCHIVE", tmp_zip_archive + else: + sys.stderr.write("error: failed to find zip filename.\n") + sys.exit(1) +else: + sys.stderr.write("error: failed to create windows package of sbs.\n") + sys.exit(1) + +# move the results to WORKSPACE + +if 'WORKSPACE' in os.environ: + final_archive = os.path.join(os.environ['WORKSPACE'], os.path.basename(tmp_archive)) + final_zip_archive = os.path.join(os.environ['WORKSPACE'], os.path.basename(tmp_zip_archive)) + print "WORKSPACE ARCHIVE", final_archive + print "WORKSPACE ZIP ARCHIVE", final_zip_archive +else: + sys.stderr.write("error: no WORKSPACE is set.\n") + sys.exit(1) + +try: + shutil.move(tmp_archive, final_archive) +except Error, err: + sys.stderr.write("error: could not rename '%s' as '%s'.\n" % (tmp_archive, final_archive)) + sys.exit(1) + +try: + shutil.move(tmp_zip_archive, final_zip_archive) +except Error, err: + sys.stderr.write("error: could not rename '%s' as '%s'.\n" % (tmp_zip_archive, final_zip_archive)) + sys.exit(1) + +# the end diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-windows/raptorinstallermaker.py --- a/sbsv2/raptor/util/install-windows/raptorinstallermaker.py Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/install-windows/raptorinstallermaker.py Thu Aug 12 09:00:16 2010 +0100 @@ -1,4 +1,3 @@ -# # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available @@ -12,110 +11,23 @@ # Contributors: # # Description: -# -#! python +# Raptor installer maker script - generates a Windows installer for Raptor using +# the NSIS package in the accompanying directory. Works on Windows and Linux. -# Raptor installer maker! - +import optparse import os import os.path +import re +import shutil +import stat import subprocess -import re -import optparse import sys import tempfile -import shutil import unzip +import zipfile tempdir = "" -parser = optparse.OptionParser() - -parser.add_option("-s", "--sbs-home", dest="sbshome", help="Path to use as SBS_HOME environment variable. If not present the script exits.") - -parser.add_option("-w", "--win32-support", dest="win32support", help="Path to Win32 support directory. If not present the script exits.") - -parser.add_option("-b", "--bv", dest="bv", help="Path to Binary variation CPP \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") - -parser.add_option("-c", "--cygwin", dest="cygwin", help="Path to Cygwin \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") - -parser.add_option("-m", "--mingw", dest="mingw", help="Path to MinGW \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") - -parser.add_option("-p", "--python", dest="python", help="Path to Python \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") - -parser.add_option("--prefix", dest="versionprefix", help="A string to use as a prefix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="") - -parser.add_option("--postfix", dest="versionpostfix", help="A string to use as a postfix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="") - -(options, args) = parser.parse_args() - -# Required directories inside the win32-support repository -win32supportdirs = {"bv":"bv", "cygwin":"cygwin", "mingw":"mingw", "python":"python264"} - -if options.sbshome == None: - print "ERROR: no SBS_HOME passed in. Exiting..." - sys.exit(2) - -if options.win32support == None: - print "ERROR: no win32support directory specified. Unable to proceed. Exiting..." - sys.exit(2) -else: - # Check for command line overrides to defaults - for directory in win32supportdirs: - print "TEST %s" % directory - value = getattr(options,directory) - print "value = %s" % str(value) - if value != None: # Command line override - if value.lower().startswith("win32support"): - # Strip off "WIN32SUPPORT\" and join to Win32 support location - win32supportdirs[directory] = os.path.join(options.win32support, value[13:]) - else: - # Relative to current directory - win32supportdirs[directory] = value - - else: # Use default location - win32supportdirs[directory] = os.path.join(options.win32support, win32supportdirs[directory]) - - print "\n\nwin32supportdirs = %s\n\n" % win32supportdirs - - # Check that all the specified directories exist and exit if any of them is missing. - for directory in win32supportdirs: - dir = win32supportdirs[directory] - if os.path.isdir(dir): - print "Found directory %s" % dir - else: - print "ERROR: directory %s does not exist. Cannot build installer. Exiting..." % dir - sys.exit(2) - -def generateinstallerversionheader(sbshome = None): - shellenv = os.environ.copy() - shellenv["PYTHONPATH"] = os.path.join(sbshome, "python") - - raptorversioncommand = "python -c \"import raptor_version; print raptor_version.numericversion()\"" - - # Raptor version is obtained from raptor_version module's numericversion function. - sbs_version_matcher = re.compile(".*(\d+\.\d+\.\d+).*", re.I) - - # Create Raptor subprocess - versioncommand = subprocess.Popen(raptorversioncommand, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=shellenv) - raptorversion = "" - # Get all the lines matching the RE - for line in versioncommand.stdout.readlines(): - res = sbs_version_matcher.match(line) - if res: - raptorversion = res.group(1) - print "Successfully determined Raptor version %s" % raptorversion - - versioncommand.wait() # Wait for process to end - - raptorversion_nsis_header_string = "# Raptor version file\n\n!define RAPTOR_VERSION %s\n" % raptorversion - - fh = open("raptorversion.nsh", "w") - fh.write(raptorversion_nsis_header_string) - fh.close() - print "Wrote raptorversion.nsh" - return 0 - def generateinstallerversion(sbshome = None): shellenv = os.environ.copy() shellenv["PYTHONPATH"] = os.path.join(sbshome, "python") @@ -140,15 +52,25 @@ return raptorversion def unzipnsis(pathtozip): - global tempdir - tempdir = tempfile.mkdtemp() - un = unzip.unzip() - print "Unzipping NSIS to %s..." % tempdir - un.extract(pathtozip, tempdir) - print "Done." - - return os.path.join(tempdir, "NSIS", "makensis.exe") - + global tempdir + tempdir = tempfile.mkdtemp() + un = unzip.unzip() + print "Unzipping NSIS to %s..." % tempdir + un.extract(pathtozip, tempdir) + print "Done." + + # Ensure the correct executable is called + dotexe="" + if "win" in sys.platform.lower(): + dotexe=".exe" + + makensispath = os.path.join(tempdir, "NSIS", "makensis" + dotexe) + + if not "win" in sys.platform.lower(): + os.chmod(makensispath, stat.S_IRWXU) + + return makensispath + def runmakensis(nsiscommand): # Create makensis subprocess print "Running NSIS command\n%s" % nsiscommand @@ -160,23 +82,198 @@ global tempdir print "Cleaning up temporary directory %s" % tempdir shutil.rmtree(tempdir,True) - try: - os.remove("raptorversion.nsh") - print "Successfully deleted raptorversion.nsh." - except: - print "ERROR: failed to remove raptorversion.nsh - remove manually if needed." print "Done." -makensispath = unzipnsis(".\\NSIS.zip") -# generateinstallerversionheader(options.sbshome) +def __writeDirTreeToArchive(zip, dirlist, sbshome, win32supportdirs=False): + """Auxilliary function to write all files in each directory trees of dirlist into the + open archive "zip" assuming valid sbshome; destination path is tweaked for win32supportdirs, + so set this to true when writing files into $SBS_HOME/win32""" + for name in dirlist: + files = os.walk(os.path.join(sbshome, name)) + for dirtuple in files: + filenames = dirtuple[2] + dirname = dirtuple[0] + for file in filenames: + # Filter out unwanted files + if not file.lower().endswith(".pyc") and \ + not file.lower().endswith(".project") and \ + not file.lower().endswith(".cproject") and \ + not file.lower().endswith(".pydevproject"): + origin = os.path.join(dirname, file) + + # For the win32 support directories, the destination is different + if win32supportdirs: + destination = os.path.join("sbs", "win32", os.path.basename(name.rstrip(os.sep)), + dirname.replace(name, "").strip(os.sep), file) + else: + destination = os.path.join("sbs", dirname.rstrip(os.sep).replace(sbshome, "").strip(os.sep), file) + + print "Compressing", origin, "\tto\t", destination + zip.write(origin, destination) + +def writeZip(filename, sbshome, sbsbvdir, sbscygwindir, sbsmingwdir, sbspythondir): + """Write a zip archive with file name "filename" assuming SBS_HOME is sbshome, and + that sbsbvdir, sbscygwindir, sbsmingwdir, sbspythondir are the win32 support directories.""" + + # *Files* in the top level SBS_HOME directory + sbshome_files = ["RELEASE-NOTES.html", "license.txt"] + + # Directories in SBS_HOME + sbshome_dirs = ["bin", "examples", "lib", "notes", "python", + "schema", "style", os.sep.join(["win32", "bin"])] + + # Win32 support directories + win32_dirs = [sbsbvdir, sbscygwindir, sbsmingwdir, sbspythondir] + + try: + # Open the zip archive for writing; if a file with the same + # name exists, it will be truncated to zero bytes before + # writing commences + zip = zipfile.ZipFile(filename, "w", zipfile.ZIP_DEFLATED) + + # Write the files in the top-level of SBS_HOME into the archive + for name in sbshome_files: + origin = os.path.join(sbshome, name) + destination = os.path.join("sbs", name) + print "Compressing", origin, "\tto\t", destination + zip.write(origin, destination) + + # Write all files in the the directories in the top-level of SBS_HOME into the archive + print "Reading the sbs directories..." + __writeDirTreeToArchive(zip, sbshome_dirs, sbshome, win32supportdirs=False) + print "Writing sbs directories to the archive is complete." + + # Write all files in the the win32 support directories in the top-level of SBS_HOME into the archive + print "Reading the win32 support directories" + __writeDirTreeToArchive(zip, win32_dirs, sbshome, win32supportdirs=True) + print "Writing win32 support directories to the archive is complete." + + zip.close() + print "Zipoutput: \"" + os.path.join(os.getcwd(), filename) + "\"" + print "Zip file creation successful." + except Exception, e: + print "Error: failed to create zip file: %s" % str(e) + sys.exit(2) + +# Create CLI and parse it +parser = optparse.OptionParser() + +parser.add_option("-s", "--sbs-home", dest="sbshome", help="Path to use as SBS_HOME environment variable. If not present the script exits.") + +parser.add_option("-w", "--win32-support", dest="win32support", help="Path to Win32 support directory. If not present the script exits.") + +parser.add_option("-b", "--bv", dest="bv", help="Path to Binary variation CPP \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") + +parser.add_option("-c", "--cygwin", dest="cygwin", help="Path to Cygwin \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") + +parser.add_option("-m", "--mingw", dest="mingw", help="Path to MinGW \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") + +parser.add_option("-p", "--python", dest="python", help="Path to Python \"root\" directory. Can be a full/relatitve path; prefix with \"WIN32SUPPORT\\\" to be relative to the Win32 support directory. Omitting this value will assume a default to a path inside the Win32 support directory.") + +parser.add_option("--prefix", dest="versionprefix", help="A string to use as a prefix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="") + +parser.add_option("--postfix", dest="versionpostfix", help="A string to use as a postfix to the Raptor version string. This will be present in the Raptor installer's file name, the installer's pages as well as the in output from sbs -v.", type="string", default="") + +parser.add_option("--noclean", dest="noclean", help="Do not clean up the temporary directory created during the run.", action="store_true" , default=False) + +parser.add_option("--noexe", dest="noexe", help="Do not create a Windows .exe installer of the Raptor installation.", action="store_true" , default=False) + +parser.add_option("--nozip", dest="nozip", help="Do not create a zip archive of the Raptor installation.", action="store_true" , default=False) + +(options, args) = parser.parse_args() + +# Required directories inside the win32-support directory (i.e. the win32-support repository). +win32supportdirs = {"bv":"bv", "cygwin":"cygwin", "mingw":"mingw", "python":"python264"} + +if options.sbshome == None: + print "ERROR: no SBS_HOME passed in. Exiting..." + sys.exit(2) +elif not os.path.isdir(options.sbshome): + print "ERROR: the specified SBS_HOME directory \"%s\" does not exist. Cannot build installer. Exiting..." + sys.exit(2) + +if options.win32support == None: + print "ERROR: no win32support directory specified. Unable to proceed. Exiting..." + sys.exit(2) +else: + # Check for command line overrides to defaults + for directory in win32supportdirs: + print "Checking for location \"%s\"..." % directory + value = getattr(options,directory) + print "Directory is %s" % str(value) + if value != None: # Command line override + if value.lower().startswith("win32support"): + # Strip off "WIN32SUPPORT\" and join to Win32 support location + win32supportdirs[directory] = os.path.join(options.win32support, value[13:]) + else: + # Relative to current directory + win32supportdirs[directory] = value + + else: # Use default location + win32supportdirs[directory] = os.path.join(options.win32support, win32supportdirs[directory]) + + print "\n\nIdentified win32supportdirs are = %s\n\n" % win32supportdirs + + # Check that all the specified directories exist and exit if any of them is missing. + for directory in win32supportdirs: + dir = win32supportdirs[directory] + if os.path.isdir(dir): + print "Found directory %s" % dir + else: + print "ERROR: directory %s does not exist. Cannot build installer. Exiting..." % dir + sys.exit(2) + + raptorversion = options.versionprefix + generateinstallerversion(options.sbshome) + options.versionpostfix -nsiscommand = makensispath + " /DRAPTOR_LOCATION=%s /DBV_LOCATION=%s /DCYGWIN_LOCATION=%s /DMINGW_LOCATION=%s /DPYTHON_LOCATION=%s /DRAPTOR_VERSION=%s raptorinstallerscript.nsi" % (options.sbshome, - win32supportdirs["bv"], + +print "Using Raptor version %s ..." % raptorversion + +if not options.noexe: + makensispath = unzipnsis("." + os.sep + "NSIS.zip") + if "win" in sys.platform.lower(): + switch="/" + else: + switch="-" + + nsiscommand = (makensispath + " " + + switch + "DRAPTOR_LOCATION=%s " + + switch + "DBV_LOCATION=%s " + + switch + "DCYGWIN_LOCATION=%s " + + switch + "DMINGW_LOCATION=%s " + + switch + "DPYTHON_LOCATION=%s " + + switch + "DRAPTOR_VERSION=%s " + + "%s" ) % \ + ( options.sbshome, + win32supportdirs["bv"], win32supportdirs["cygwin"], win32supportdirs["mingw"], win32supportdirs["python"], - raptorversion) -print "nsiscommand = %s" % nsiscommand -runmakensis(nsiscommand) -cleanup() + raptorversion, + os.path.join(options.sbshome, "util", "install-windows", "raptorinstallerscript.nsi") + ) + + # On Linux, we need to run makensis via Bash, so that is can find all its + # internal libraries and header files etc. Makensis fails unless it + # is executed this way on Linux. + if "lin" in sys.platform.lower(): + nsiscommand = "bash -c \"%s\"" % nsiscommand + + runmakensis(nsiscommand) +else: + print "Not creating .exe as requested." +# Only clean NSIS installation in the temporary directory if requested +if not options.noclean: + cleanup() +else: + print "Not cleaning makensis in %s" % makensispath + +# Only create zip archive if required +if not options.nozip: + filename = "sbs-" + raptorversion + ".zip" + writeZip(filename, options.sbshome, win32supportdirs["bv"], win32supportdirs["cygwin"], win32supportdirs["mingw"], win32supportdirs["python"]) +else: + print "Not creating zip archive as requested." + +print "Finished." + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi --- a/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/install-windows/raptorinstallerscript.nsi Thu Aug 12 09:00:16 2010 +0100 @@ -13,6 +13,10 @@ # Description: # Raptor installer/uninstaller script +# Set compression type - the advice in the NSIS user manual +# is to have this at the top of the main .nsi file. +SetCompressor /SOLID lzma + # Standard NSIS Library includes !include "MUI2.nsh" !include "LogicLib.nsh" @@ -77,6 +81,7 @@ ShowInstDetails show ##################### Pages in the installer ##################### +!define MUI_WELCOMEPAGE_TITLE_3LINES !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE ${RAPTOR_LOCATION}\license.txt !define MUI_PAGE_HEADER_TEXT "Installation type" @@ -84,6 +89,7 @@ !define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirLeave # Directory page exit function - disallow spaces in $INSTDIR !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES +!define MUI_FINISHPAGE_TITLE_3LINES !insertmacro MUI_PAGE_FINISH ######################## .onInit function ######################## @@ -107,9 +113,11 @@ SetOutPath "$INSTDIR\lib" File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\lib\*.* SetOutPath "$INSTDIR\python" - File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\python\*.* + File /r /x distribution.policy.s60 /x *.pyc /x *.pydevproject /x *.project ${RAPTOR_LOCATION}\python\*.* SetOutPath "$INSTDIR\schema" File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\schema\*.* + SetOutPath "$INSTDIR\style" + File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\style\*.* SetOutPath "$INSTDIR\win32\bin" File /r /x distribution.policy.s60 ${RAPTOR_LOCATION}\win32\bin\*.* SetOutPath "$INSTDIR\win32\bv" @@ -200,7 +208,6 @@ ${EndUnless} # Write the uninstaller - # WriteUninstaller "$INSTDIR\${UNINSTALLER_FILENAME}" WriteUninstaller "$INSTDIR\${UNINSTALLER_FILENAME}" # Unload registry plug in ${registry::Unload} @@ -320,9 +327,11 @@ ShowUninstDetails show #################### Pages in the uninstaller #################### +!define MUI_WELCOMEPAGE_TITLE_3LINES !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES +!define MUI_FINISHPAGE_TITLE_3LINES !insertmacro MUI_UNPAGE_FINISH ################## Sections in the uninstaller ################## @@ -334,6 +343,7 @@ RmDir /r $INSTDIR\lib RmDir /r $INSTDIR\python RmDir /r $INSTDIR\schema + RmDir /r $INSTDIR\style RmDir /r $INSTDIR\win32 Delete $INSTDIR\RELEASE-NOTES.html RmDir /r $INSTDIR\notes diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/python.mk --- a/sbsv2/raptor/util/python.mk Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/python.mk Thu Aug 12 09:00:16 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -17,10 +17,10 @@ # Build Python for Raptor -RAPTOR_PYTHON_VER:=2.6.2 +RAPTOR_PYTHON_VER:=2.7 PYTHON_SOURCEDIR:=$(OUTPUTPATH)/Python-$(RAPTOR_PYTHON_VER) -PYTHON_TAR:=$(SBS_HOME)/util/ext/Python-$(RAPTOR_PYTHON_VER).tgz +PYTHON_TAR:=$(SBS_HOME)/util/ext/Python-$(RAPTOR_PYTHON_VER).tar.bz2 PYINSTALLROOT:=$(INSTALLROOT)/python$(subst .,,$(RAPTOR_PYTHON_VER)) define b_python @@ -33,12 +33,16 @@ $(PYINSTALLROOT)/bin/python: $(PYTHON_TAR) rm -rf $(PYTHON_SOURCEDIR) && \ cd $(OUTPUTPATH) && \ - tar -xzf $(PYTHON_TAR) && \ + tar -xjf $(PYTHON_TAR) && \ ( \ cd $(PYTHON_SOURCEDIR) && \ CFLAGS="-O3 $(GCCTUNE) -s" ./configure --prefix=$(PYINSTALLROOT) --enable-shared --with-threads && \ $(MAKE) -j8 && $(MAKE) install \ ) + +CLEANFILES:=$(PYINSTALLROOT)/bin/python +$(cleanlog) + endef $(eval $(b_python)) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/ransleep.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/ransleep.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,29 @@ +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Utility makefile +# +# + +TARGET:=ransleep +SOURCES:=$(SBS_HOME:\=/)/util/ransleep/ransleep.c + +ifeq ($(filter win,$(HOSTPLATFORM)),win) +CFLAGS:=-DWIN32 +LDFLAGS:= +else +CFLAGS:= +LDFLAGS:=-lpthread +endif + +$(eval $(cprogram)) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/ransleep/Makefile --- a/sbsv2/raptor/util/ransleep/Makefile Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/ransleep/Makefile Thu Aug 12 09:00:16 2010 +0100 @@ -15,15 +15,6 @@ # # -TARGET:=ransleep -SOURCES:=$(SBS_HOME:\=/)/util/ransleep/ransleep.c +all: + cd .. && make ransleep -ifeq ($(filter win,$(HOSTPLATFORM)),win) -CFLAGS:=-DWIN32 -LDFLAGS:= -else -CFLAGS:= -LDFLAGS:=-lpthread -endif - -$(eval $(cprogram)) diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/talon.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/talon.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,71 @@ +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Utility makefile +# +# + + +SHELL:=bash + +include $(SBS_HOME:\=/)/util/gccprogram.mk + +ifeq ($(filter win,$(HOSTPLATFORM)),win) +CHOMP_C:=chomp.c +PROCESS_C:=process_win.c +CFLAGS:=-DHOST_WIN +ifeq ($(SBS_MINGW),) +LDFLAGS:=$(subst \,/,$(SBS_HOME:\=/)\win32\mingw\lib\libiberty.a) +else +LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a) +endif +LDFLAGS:=$(LDFLAGS) -Wl,-lws2_32 +else +CHOMP_C:= +PROCESS_C:=process.c +CFLAGS:=-g +linux_PTHREADLIBS:=-lpthread +LDFLAGS:=$(linux_PTHREADLIBS) -lrt +endif + + +SOURCEDIR:=$(subst \,/,$(SBS_HOME))/util/talon + + +# remember how to clean up: +MANIFEST:=$(SOURCEDIR)/manifest + +TARGET:=talon +SOURCES:=$(addprefix $(SOURCEDIR)/,talon.c buffer.c sema.c log.c $(PROCESS_C) $(CHOMP_C)) +$(eval $(cprogram)) + +TARGET:=talonctl +SOURCES:=$(addprefix $(SOURCEDIR)/,talonctl.c sema.c log.c) +$(eval $(cprogram)) + +TARGET:=testbuffer +SOURCES:=$(addprefix $(SOURCEDIR)/,testbuffer.c buffer.c log.c) +$(eval $(cprogram)) + +TARGET:=testprocess +SOURCES:=$(addprefix $(SOURCEDIR)/,testprocess.c buffer.c log.c $(PROCESS_C)) +$(eval $(cprogram)) + +TARGET:=talonlock +SOURCES:=$(addprefix $(SOURCEDIR)/,lock.c sema.c log.c) +$(eval $(cprogram)) + +TARGET:=testchomp +SOURCES:=$(addprefix $(SOURCEDIR)/,testchomp.c chomp.c log.c) +$(eval $(cprogram)) + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/talon/Makefile --- a/sbsv2/raptor/util/talon/Makefile Wed Jul 28 13:20:46 2010 +0100 +++ b/sbsv2/raptor/util/talon/Makefile Thu Aug 12 09:00:16 2010 +0100 @@ -14,58 +14,6 @@ # Utility makefile # # - - -SHELL:=bash - -include $(SBS_HOME:\=/)/util/gccprogram.mk - -ifeq ($(filter win,$(HOSTPLATFORM)),win) -CHOMP_C:=chomp.c -PROCESS_C:=process_win.c -CFLAGS:=-DHOST_WIN -ifeq ($(SBS_MINGW),) -LDFLAGS:=$(subst \,/,$(SBS_HOME:\=/)\win32\mingw\lib\libiberty.a) -else -LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a) -endif -LDFLAGS:=$(LDFLAGS) -Wl,-lws2_32 -else -CHOMP_C:= -PROCESS_C:=process.c -CFLAGS:=-g -linux_PTHREADLIBS:=-lpthread -LDFLAGS:=$(linux_PTHREADLIBS) -lrt -endif - - -SOURCEDIR:=$(subst \,/,$(SBS_HOME))/util/talon - - -# remember how to clean up: -MANIFEST:=$(SOURCEDIR)/manifest - -TARGET:=talon -SOURCES:=$(addprefix $(SOURCEDIR)/,talon.c buffer.c sema.c log.c $(PROCESS_C) $(CHOMP_C)) -$(eval $(cprogram)) - -TARGET:=talonctl -SOURCES:=$(addprefix $(SOURCEDIR)/,talonctl.c sema.c log.c) -$(eval $(cprogram)) - -TARGET:=testbuffer -SOURCES:=$(addprefix $(SOURCEDIR)/,testbuffer.c buffer.c log.c) -$(eval $(cprogram)) - -TARGET:=testprocess -SOURCES:=$(addprefix $(SOURCEDIR)/,testprocess.c buffer.c log.c $(PROCESS_C)) -$(eval $(cprogram)) - -TARGET:=talonlock -SOURCES:=$(addprefix $(SOURCEDIR)/,lock.c sema.c log.c) -$(eval $(cprogram)) - -TARGET:=testchomp -SOURCES:=$(addprefix $(SOURCEDIR)/,testchomp.c chomp.c log.c) -$(eval $(cprogram)) - +.PHONY: all +all: + cd .. && make talon diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/talon/tests/settings.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/talon/tests/settings.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,5 @@ +SHELL:=/home/tnmurphy/x/build/sbsv2/raptor/linux-unknown-libc2_10/bin/talon +TALON_SHELL:=/bin/bash +TALON_BUILDID:=100 +TALON_DEBUG:="" +export TALON_SHELL TALON_BUILDID TALON_DEBUG diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/tmkdir.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/tmkdir.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,8 @@ +SOURCEDIR:=$(subst \,/,$(SBS_HOME))/util/tmkdir +TALONDIR:=$(subst \,/,$(SBS_HOME))/util/talon + +TARGET:=tmkdir +CFLAGS:=$(CFLAGS) -g -I$(TALONDIR) +SOURCES:=$(addprefix $(SOURCEDIR)/,tmkdir.c) $(addprefix $(TALONDIR)/,log.c) +$(eval $(cprogram)) + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/tmkdir/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/tmkdir/Makefile Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,21 @@ +# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Utility makefile +# +# + +.PHONY: all + +akk: + cd .. && make tmkdir diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/tmkdir/makepath.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/tmkdir/makepath.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,63 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + + +# Macros for creating Standard targets + +ifeq ($(_METAFLM_MK_),) +_METAFLM_MK_:=1 + +## path creation ######################### +# Make the destination directory if neccessary. For some +# make engines we must do this outside the rule or they +# get confused by the apparent way in which different rules +# can create a particular directory and they infer some kind +# of dependency. + +# Makepath. Copyright (C) 2008 Symbian Software Ltd. +# buffering with repeat prevention, makes directories after every 30 calls. Any more might overload +# the createprocess limit on arguments. +# +# makepathLIST is initialised in globals.mk +define makepath_single +$(if $(findstring $1,$(makepathLIST)),,$(eval makepathLIST:=$(makepathLIST) $1)) +$(if $(subst 90,,$(words $(makepathLIST))),,$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=)) +endef + +# The following turns out to be extremely slow - something to do with using eval +# or to do with creating huge numbers of TARGET_ variables? BTW, this is an attempt +# to not make things that we have already made. +# define makepath +# $(info makepath_start)$(foreach DIR,$1,$(if $(TARGET_$(1)),,$(call makepath_single,$(DIR))$(eval TARGET_$(1):=1)))$(info makepath_end) +# endef + +# In general, makepath creates directories during FLM evaluation. +# However, if the WHAT target is being processed then it should do nothing. +define makepath +$(strip $(foreach DIR,$(sort $1),$(call makepath_single,$(DIR)))) +endef + + +define makepathfor +$(call makepath,$(dir $1)) +endef + +# Make any remaining paths in the path buffer +define makepathfinalise +$(strip $(if $(makepathLIST),$(shell $(GNUMKDIR) $(makepathLIST))$(eval makepathLIST:=),)) +endef + +## END TEST BATCH FILES MACRO diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/tmkdir/testmakepath.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/tmkdir/testmakepath.mk Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,35 @@ +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Utility makefile +# +# + + +$(info $(PWD)) + +FLMHOME:=$(PWD) + +include makepath.mk + +$(info makepath: $(makepath)) + +GNUMKDIR:=mkdir -p +#GNUMKDIR:=tmkdir + +B:=$(PWD)/tmp + +totalpaths:= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 +$(foreach pp,$(totalpaths),$(foreach p,1 1 1 1 1 1 1,$(call makepath,$(B)/$(pp)/$(p)))) + + diff -r f70b728ea30c -r a1925fb7753a sbsv2/raptor/util/tmkdir/tmkdir.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/tmkdir/tmkdir.c Thu Aug 12 09:00:16 2010 +0100 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +* Program for making directory hierarchies +* +*/ + +#include +#include +#include +#include +#include +#include "log.h" +#include "../config.h" + + + +int mkpath(char *path) +{ + int pathlen; + char *pathend; + char *p; + int ret = 255; + + + pathlen=strlen(path); + pathend = path + pathlen; + + p = path; + + // Find the first level at which we *can* make a directory + // go down one level at a time until we make something that works + DEBUG(("down: %s\n", path)); + while ( 0 != mkdir(path, 0777)) + { + // ENOENT means that the parent directory doesn't exist so it's ok + // any other error is not ok and means that we must give up + if (errno != ENOENT) + return 1; + + p = strrchr(path,'/'); + if (!p) + break; + *p = '\0'; + } + + // So we found the point at which a pre-existing tree starts + do + { + p = index(path, '\0'); + if (p >= pathend) + { + ret = 0; + break; + } + + *p = '/'; + DEBUG(("up: %s\n", path)); + } + while (0 == mkdir(path, 0777)); + + return ret; +} + +int main(int argc, char *argv[]) +{ + int i; + + //loglevel=LOGDEBUG; + for (i=1; i < argc; i++) + { + if ( 0 != mkpath(argv[i])) + return 255; + } + + return 0; +} +