mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 01:20:56 +08:00
Loosen check for build directory.
* validate_failures.py: Loosen check for build directory. State what failed if we couldn't find the source tree or the target triplet. From-SVN: r198064
This commit is contained in:
parent
23662b9aa8
commit
89cbb85b5f
contrib
@ -1,3 +1,9 @@
|
||||
2013-04-18 Diego Novillo <dnovillo@google.com>
|
||||
|
||||
* validate_failures.py: Loosen check for build directory.
|
||||
State what failed if we couldn't find the source tree or
|
||||
the target triplet.
|
||||
|
||||
2013-03-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gennews (files): Add files for GCC 4.8.
|
||||
|
@ -196,11 +196,9 @@ def GetMakefileValue(makefile_name, value_name):
|
||||
return None
|
||||
|
||||
|
||||
def ValidBuildDirectory(builddir, target):
|
||||
def ValidBuildDirectory(builddir):
|
||||
if (not os.path.exists(builddir) or
|
||||
not os.path.exists('%s/Makefile' % builddir) or
|
||||
(not os.path.exists('%s/build-%s' % (builddir, target)) and
|
||||
not os.path.exists('%s/%s' % (builddir, target)))):
|
||||
not os.path.exists('%s/Makefile' % builddir)):
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -362,14 +360,17 @@ def GetManifestPath(srcdir, target, user_provided_must_exist):
|
||||
Error('Manifest does not exist: %s' % manifest_path)
|
||||
return manifest_path
|
||||
else:
|
||||
assert srcdir and target
|
||||
if not srcdir:
|
||||
Error('Could not determine where the location of GCC\'s source tree. '
|
||||
'The Makefile does not contain a definition for "srcdir".')
|
||||
if not target:
|
||||
Error('Could not determine the target triplet for this build. '
|
||||
'The Makefile does not contain a definition for "target_alias".')
|
||||
return _MANIFEST_PATH_PATTERN % (srcdir, _MANIFEST_SUBDIR, target)
|
||||
|
||||
|
||||
def GetBuildData():
|
||||
srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =')
|
||||
target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')
|
||||
if not ValidBuildDirectory(_OPTIONS.build_dir, target):
|
||||
if not ValidBuildDirectory(_OPTIONS.build_dir):
|
||||
# If we have been given a set of results to use, we may
|
||||
# not be inside a valid GCC build directory. In that case,
|
||||
# the user must provide both a manifest file and a set
|
||||
@ -380,6 +381,8 @@ def GetBuildData():
|
||||
_OPTIONS.build_dir)
|
||||
else:
|
||||
return None, None
|
||||
srcdir = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'srcdir =')
|
||||
target = GetMakefileValue('%s/Makefile' % _OPTIONS.build_dir, 'target_alias=')
|
||||
print 'Source directory: %s' % srcdir
|
||||
print 'Build target: %s' % target
|
||||
return srcdir, target
|
||||
|
Loading…
x
Reference in New Issue
Block a user