bake.py
author Tom Henderson <tomh@tomh.org>
Mon, 03 Sep 2018 21:41:12 -0700
changeset 423 0eb3789eef50
parent 268 fa12f30fc8fb
permissions -rwxr-xr-x
Update module specs for castxml source build
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
2254dd4d8e9e cleanup
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
#!/usr/bin/env python
2254dd4d8e9e cleanup
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
268
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     3
###############################################################################
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     4
# Copyright (c) 2013 INRIA
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     5
# 
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     6
# This program is free software; you can redistribute it and/or modify
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     7
# it under the terms of the GNU General Public License version 2 as
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     8
# published by the Free Software Foundation;
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
     9
# 
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    10
# This program is distributed in the hope that it will be useful,
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    13
# GNU General Public License for more details.
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    14
#
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    15
# You should have received a copy of the GNU General Public License
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    16
# along with this program; if not, write to the Free Software
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    18
#
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    19
# Authors: Daniel Camara  <daniel.camara@inria.fr>
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    20
#          Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
fa12f30fc8fb Added the compyright comment on the main file
daniel
parents: 245
diff changeset
    21
###############################################################################
97
ea8a50671cc4 Main changes are related to formmating for the review. What was added:
daniel
parents: 4
diff changeset
    22
# bake.py
ea8a50671cc4 Main changes are related to formmating for the review. What was added:
daniel
parents: 4
diff changeset
    23
#
ea8a50671cc4 Main changes are related to formmating for the review. What was added:
daniel
parents: 4
diff changeset
    24
# Bake executable, in fact it is just a wrapper for the main Bake class.  
ea8a50671cc4 Main changes are related to formmating for the review. What was added:
daniel
parents: 4
diff changeset
    25
4
2254dd4d8e9e cleanup
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
import sys
2254dd4d8e9e cleanup
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
import bake
2254dd4d8e9e cleanup
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
153
cff8d184eefe modification of cleandist and fullclean option
daniel
parents: 97
diff changeset
    29
try:
cff8d184eefe modification of cleandist and fullclean option
daniel
parents: 97
diff changeset
    30
    b = bake.Bake()
cff8d184eefe modification of cleandist and fullclean option
daniel
parents: 97
diff changeset
    31
    b.main(sys.argv)
169
04b9da811cf7 Mac Bug fixing and return of the system error
daniel
parents: 153
diff changeset
    32
except SystemExit as e: 
04b9da811cf7 Mac Bug fixing and return of the system error
daniel
parents: 153
diff changeset
    33
    sys.exit(e)
153
cff8d184eefe modification of cleandist and fullclean option
daniel
parents: 97
diff changeset
    34
except: 
241
a394e0406191 Fix for unexpected error message
daniel
parents: 169
diff changeset
    35
    print("  > Unexpected exception!\n" 
a394e0406191 Fix for unexpected error message
daniel
parents: 169
diff changeset
    36
          "    Please register the error at https://www.nsnam.org/bugzilla, \n"
a394e0406191 Fix for unexpected error message
daniel
parents: 169
diff changeset
    37
          "    with a copy of the trace below and, if possible, a list of steps to reproduce the error!<")
a394e0406191 Fix for unexpected error message
daniel
parents: 169
diff changeset
    38
    sys.stdout.flush()
a394e0406191 Fix for unexpected error message
daniel
parents: 169
diff changeset
    39
    bake.Utils.print_backtrace()