Refactor the atom_js2c target to include javascript from multiple dirs.
Before invoking js2c, copy all files that must be embedded into the shared intermediate directory, and modify the js2c wrapper script to include all files from that directory(which is passed as argument). This allows the build system to embed files that don't share a common base directory, such as javascript generated at build time.
This commit is contained in:
		
					parent
					
						
							
								6afe8aa7f2
							
						
					
				
			
			
				commit
				
					
						1713200084
					
				
			
		
					 2 changed files with 20 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/usr/bin/env python
 | 
			
		||||
 | 
			
		||||
import contextlib
 | 
			
		||||
import glob
 | 
			
		||||
import os
 | 
			
		||||
import subprocess
 | 
			
		||||
import sys
 | 
			
		||||
| 
						 | 
				
			
			@ -11,7 +12,7 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 | 
			
		|||
 | 
			
		||||
def main():
 | 
			
		||||
  natives = os.path.abspath(sys.argv[1])
 | 
			
		||||
  js_source_files = sys.argv[2:]
 | 
			
		||||
  js_source_files = glob.glob('{0}/*.js'.format(sys.argv[2]))
 | 
			
		||||
 | 
			
		||||
  call_js2c(natives, js_source_files)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue