v.pkgconfig: fix building standalone pkgconfig (#14825)
* Update main.v * add test to prevent future regressions Co-authored-by: Delyan Angelov <delian66@gmail.com>master
							parent
							
								
									c9ab086029
								
							
						
					
					
						commit
						5cd5d551e3
					
				|  | @ -0,0 +1,17 @@ | |||
| import os | ||||
| 
 | ||||
| const vexe = os.getenv('VEXE') | ||||
| 
 | ||||
| const vroot = os.dir(vexe) | ||||
| 
 | ||||
| fn test_pkgconfig_can_be_compiled() ? { | ||||
| 	tmp_exe := os.join_path(os.temp_dir(), '${os.getpid()}_pkgconfig.exe') | ||||
| 	pkgconfig_v_file := os.real_path(os.join_path(vroot, 'vlib/v/pkgconfig/bin/pkgconfig.v')) | ||||
| 	assert !os.exists(tmp_exe) | ||||
| 	res := os.system('${os.quoted_path(vexe)} -o ${os.quoted_path(tmp_exe)} ${os.quoted_path(pkgconfig_v_file)}') | ||||
| 	if res != 0 { | ||||
| 		assert false | ||||
| 	} | ||||
| 	assert os.exists(tmp_exe) | ||||
| 	os.rm(tmp_exe)? | ||||
| } | ||||
|  | @ -3,7 +3,7 @@ module pkgconfig | |||
| import flag | ||||
| import strings | ||||
| 
 | ||||
| struct Main { | ||||
| pub struct Main { | ||||
| pub mut: | ||||
| 	opt         &MainOptions | ||||
| 	res         string | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue