mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			591 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			591 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from build.ab import Rule, normalrule, Target, filenameof
 | |
| from os.path import basename
 | |
| 
 | |
| 
 | |
| @Rule
 | |
| def objectify(self, name, src: Target, symbol):
 | |
|     normalrule(
 | |
|         replaces=self,
 | |
|         ins=["build/_objectify.py", src],
 | |
|         outs=[basename(filenameof(src)) + ".h"],
 | |
|         commands=["$(PYTHON) {ins[0]} {ins[1]} " + symbol + " > {outs}"],
 | |
|         label="OBJECTIFY",
 | |
|     )
 | |
| 
 | |
| 
 | |
| @Rule
 | |
| def test(self, name, command: Target):
 | |
|     normalrule(
 | |
|         replaces=self,
 | |
|         ins=[command],
 | |
|         outs=["sentinel"],
 | |
|         commands=["{ins[0]}", "touch {outs}"],
 | |
|         label="TEST",
 | |
|     )
 |