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

Side by Side Diff: pylib/gyp/generator/make.py

Issue 256020: Make scons 'loadable_module' output consistent with make output location... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « no previous file | pylib/gyp/generator/scons.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Notes: 3 # Notes:
4 # 4 #
5 # This is all roughly based on the Makefile system used by the Linux 5 # This is all roughly based on the Makefile system used by the Linux
6 # kernel, but is a non-recursive make -- we put the entire dependency 6 # kernel, but is a non-recursive make -- we put the entire dependency
7 # graph in front of make and let it figure it out. 7 # graph in front of make and let it figure it out.
8 # 8 #
9 # The code below generates a separate .mk file for each target, but 9 # The code below generates a separate .mk file for each target, but
10 # all are sourced by the top-level Makefile. This means that all 10 # all are sourced by the top-level Makefile. This means that all
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 def ComputeOutput(self, spec): 595 def ComputeOutput(self, spec):
596 """Return the 'output' (full output path) of a gyp spec. 596 """Return the 'output' (full output path) of a gyp spec.
597 597
598 E.g., the loadable module 'foobar' in directory 'baz' will produce 598 E.g., the loadable module 'foobar' in directory 'baz' will produce
599 '$(obj)/baz/libfoobar.so' 599 '$(obj)/baz/libfoobar.so'
600 """ 600 """
601 output = None 601 output = None
602 target = spec['target_name'] 602 target = spec['target_name']
603 if self.type == 'static_library': 603 if self.type == 'static_library':
604 target = 'lib%s.a' % target 604 target = 'lib%s.a' % (target[:3] == 'lib' and [target[3:]] or [target])[0]
605 elif self.type in ('loadable_module', 'shared_library'): 605 elif self.type in ('loadable_module', 'shared_library'):
606 target = 'lib%s.so' % target 606 target = 'lib%s.so' % (target[:3] == 'lib' and [target[3:]] or [target])[0 ]
607 elif self.type == 'none': 607 elif self.type == 'none':
608 target = '%s.stamp' % target 608 target = '%s.stamp' % target
609 elif self.type == 'settings': 609 elif self.type == 'settings':
610 return None 610 return None
611 elif self.type == 'executable': 611 elif self.type == 'executable':
612 target = spec.get('product_name', target) 612 target = spec.get('product_name', target)
613 else: 613 else:
614 print ("ERROR: What output file should be generated?", 614 print ("ERROR: What output file should be generated?",
615 "typ", self.type, "target", target) 615 "typ", self.type, "target", target)
616 616
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 ' '.join(build_files), 869 ' '.join(build_files),
870 gyp.common.EncodePOSIXShellList( 870 gyp.common.EncodePOSIXShellList(
871 [gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth), 871 [gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth),
872 '-fmake'] + 872 '-fmake'] +
873 gyp.RegenerateFlags(options) + 873 gyp.RegenerateFlags(options) +
874 build_files_args))) 874 build_files_args)))
875 875
876 root_makefile.write(SHARED_FOOTER) 876 root_makefile.write(SHARED_FOOTER)
877 877
878 root_makefile.close() 878 root_makefile.close()
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/generator/scons.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698