source: rtems-tools/specbuilder/specbuilder/windows.py @ faa8181

4.104.115
Last change on this file since faa8181 was faa8181, checked in by Chris Johns <chrisj@…>, on 02/22/11 at 03:46:44

2011-02-22 Chris Johns <chrisj@…>

  • specbuilder/sb-versions, specbuilder/specbuilder/version.py: New. Print a suitable version message for automatic documentation updating from the spec files in CVS.
  • specbuilder/specbuilder/build.py: Add xz support. Add a function to return the name of a package.
  • specbuilder/specbuilder/crossgcc.py: Use the build name in the tmp path.
  • specbuilder/specbuilder/darwin.py: Add xz support.
  • specbuilder/specbuilder/defaults.py: Add xz support. Add Windows and Linux support.
  • specbuilder/specbuilder/setup.py: Reference the correct shell opts. Use the shell setup in the version probe command. Fix the version check. Add autotools to the list of spec files to install.
  • specbuilder/specbuilder/spec.py: Add changelog and configure tests. Manage sub-packages better.
  • specbuilder/specbuilder/version.py, specbuilder/specbuilder/windows.py: New.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1#
2# $Id$
3#
4# RTEMS Tools Project (http://www.rtems.org/)
5# Copyright 2010 Chris Johns (chrisj@rtems.org)
6# All rights reserved.
7#
8# This file is part of the RTEMS Tools package in 'rtems-tools'.
9#
10# RTEMS Tools is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# RTEMS Tools is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with RTEMS Tools.  If not, see <http://www.gnu.org/licenses/>.
22#
23
24#
25# Windows specific support and overrides.
26#
27
28import pprint
29import os
30
31import execute
32
33def load():
34    uname = 'win32'
35    if os.environ.has_key('NUMBER_OF_PROCESSORS'):
36        ncpus = int(os.environ['NUMBER_OF_PROCESSORS'])
37    else:
38        ncpus = 0
39    if ncpus > 1:
40        smp_mflags = '-j' + str(ncpus)
41    else:
42        smp_mflags = ''
43    if os.environ.has_key('HOSTTYPE'):
44        hosttype = os.environ['HOSTTYPE']
45    else:
46        hosttype = 'i686'
47    system = 'mingw32'
48    defines = {
49        '_os':                     'win32',
50        '_host':                   hosttype + '-pc-' + system,
51        '_host_vendor':            'microsoft',
52        '_host_os':                'win32',
53        '_host_cpu':               hosttype,
54        '_host_alias':             '%{nil}',
55        '_host_arch':              hosttype,
56        '_usr':                    '/opt/local',
57        '_var':                    '/opt/local/var',
58        'optflags':                '-O2 -fasynchronous-unwind-tables',
59        '_smp_mflags':             smp_mflags,
60        '__sh':                    'sh',
61        '_buildshell':             '%{__sh}',
62        '___setup_shell':          '%{__sh}'
63        }
64    return defines
65
66if __name__ == '__main__':
67    pprint.pprint(load())
Note: See TracBrowser for help on using the repository browser.