Arreglar la generación de compile_commands.json
Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								build.sh
									
									
									
									
									
								
							@@ -1,17 +1,28 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function build() {
 | 
					function build() {
 | 
				
			||||||
    cd gdextension || exit
 | 
					    cd gdextension || return 1
 | 
				
			||||||
    scons -j 12
 | 
					    scons
 | 
				
			||||||
    return 1
 | 
					    cd ..
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function build_db() {
 | 
					function build_db() {
 | 
				
			||||||
    cd gdextension || exit
 | 
					    cd gdextension || return 1
 | 
				
			||||||
    scons --clean
 | 
					    scons --clean
 | 
				
			||||||
    bear -- scons -j 12
 | 
					    bear -- scons
 | 
				
			||||||
    ln -s compile_commands.json ../
 | 
					
 | 
				
			||||||
    return 1
 | 
					    if [ ! -d ../build ]; then
 | 
				
			||||||
 | 
					        mkdir ../build
 | 
				
			||||||
 | 
					        touch ../build/.gdignore
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [ -f ../build/compile_commands.json ]; then
 | 
				
			||||||
 | 
					        rm ../build/compile_commands.json
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cp compile_commands.json ../build/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cd ..
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
while getopts "bdh:" flag; do
 | 
					while getopts "bdh:" flag; do
 | 
				
			||||||
@@ -25,3 +36,4 @@ while getopts "bdh:" flag; do
 | 
				
			|||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user