Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: native_client_sdk/src/build_tools/build_sdk.py

Issue 11882012: Convert all project to use common.mk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Entry point for both build and try bots 6 """Entry point for both build and try bots
7 7
8 This script is invoked from XXX, usually without arguments 8 This script is invoked from XXX, usually without arguments
9 to package an SDK. It automatically determines whether 9 to package an SDK. It automatically determines whether
10 this SDK is for mac, win, linux. 10 this SDK is for mac, win, linux.
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 579
580 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'), 580 InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'),
581 pepper_ver, 581 pepper_ver,
582 'newlib') 582 'newlib')
583 583
584 584
585 def BuildStepCopyBuildHelpers(pepperdir, platform): 585 def BuildStepCopyBuildHelpers(pepperdir, platform):
586 buildbot_common.BuildStep('Copy build helpers') 586 buildbot_common.BuildStep('Copy build helpers')
587 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'), 587 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'),
588 os.path.join(pepperdir, 'tools')) 588 os.path.join(pepperdir, 'tools'))
589 buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.mk'),
590 os.path.join(pepperdir, 'tools'))
589 if platform == 'win': 591 if platform == 'win':
590 buildbot_common.BuildStep('Add MAKE') 592 buildbot_common.BuildStep('Add MAKE')
591 http_download.HttpDownload(GSTORE + MAKE, 593 http_download.HttpDownload(GSTORE + MAKE,
592 os.path.join(pepperdir, 'tools', 'make.exe')) 594 os.path.join(pepperdir, 'tools', 'make.exe'))
593 595
594 596
595 EXAMPLE_LIST = [ 597 EXAMPLE_LIST = [
596 'debugging', 598 'debugging',
597 'dlopen', 599 'dlopen',
598 'file_histogram', 600 'file_histogram',
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 stdout, _ = process.communicate() 727 stdout, _ = process.communicate()
726 728
727 # Parse environment from "set" command above. 729 # Parse environment from "set" command above.
728 # It looks like this: 730 # It looks like this:
729 # KEY1=VALUE1\r\n 731 # KEY1=VALUE1\r\n
730 # KEY2=VALUE2\r\n 732 # KEY2=VALUE2\r\n
731 # ... 733 # ...
732 return dict(line.split('=') for line in stdout.split('\r\n')[:-1]) 734 return dict(line.split('=') for line in stdout.split('\r\n')[:-1])
733 735
734 736
735 def BuildStepMakeAll(pepperdir, platform, directory, step_name, clean=False): 737 def BuildStepMakeAll(pepperdir, platform, directory, step_name,
738 » » » » » clean=False, deps=True):
736 buildbot_common.BuildStep(step_name) 739 buildbot_common.BuildStep(step_name)
737 make_dir = os.path.join(pepperdir, directory) 740 make_dir = os.path.join(pepperdir, directory)
738 makefile = os.path.join(make_dir, 'Makefile') 741 makefile = os.path.join(make_dir, 'Makefile')
739 if os.path.isfile(makefile): 742 if os.path.isfile(makefile):
740 print "\n\nMake: " + make_dir 743 print "\n\nMake: " + make_dir
741 if platform == 'win': 744 if platform == 'win':
742 # We need to modify the environment to build host on Windows. 745 # We need to modify the environment to build host on Windows.
743 env = GetWindowsEnvironment() 746 env = GetWindowsEnvironment()
744 make = os.path.join(make_dir, 'make.bat') 747 make = os.path.join(make_dir, 'make.bat')
745 else: 748 else:
746 env = os.environ 749 env = os.environ
747 make = 'make' 750 make = 'make'
748 751
749 buildbot_common.Run([make, '-j8'], 752 extra_args = []
753 if not deps:
754 extra_args += 'IGNORE_DEPS=1'
755
756 buildbot_common.Run([make, '-j8', 'all_versions'] + extra_args,
750 cwd=os.path.abspath(make_dir), env=env) 757 cwd=os.path.abspath(make_dir), env=env)
751 if clean: 758 if clean:
752 # Clean to remove temporary files but keep the built libraries. 759 # Clean to remove temporary files but keep the built libraries.
753 buildbot_common.Run([make, '-j8', 'clean'], 760 buildbot_common.Run([make, '-j8', 'clean'] + extra_args,
754 cwd=os.path.abspath(make_dir)) 761 cwd=os.path.abspath(make_dir))
755 762
756 763
757 def BuildStepBuildLibraries(pepperdir, platform, directory, clean=True): 764 def BuildStepBuildLibraries(pepperdir, platform, directory, clean=True):
758 BuildStepMakeAll(pepperdir, platform, directory, 'Build Libraries', 765 BuildStepMakeAll(pepperdir, platform, directory, 'Build Libraries',
759 clean=clean) 766 clean=clean)
760 767
761 768
762 def BuildStepGenerateNotice(pepperdir): 769 def BuildStepGenerateNotice(pepperdir):
763 # Look for LICENSE files 770 # Look for LICENSE files
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 # Archive on non-trybots. 955 # Archive on non-trybots.
949 if options.archive: 956 if options.archive:
950 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) 957 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile)
951 BuildStepArchiveSDKTools() 958 BuildStepArchiveSDKTools()
952 959
953 return 0 960 return 0
954 961
955 962
956 if __name__ == '__main__': 963 if __name__ == '__main__':
957 sys.exit(main(sys.argv)) 964 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/build_examples.py ('k') | native_client_sdk/src/build_tools/generate_make.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698