This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pathenv_add() { | |
if [ ! -d "$1" ]; then | |
return 0 | |
fi | |
DIR=$(unxpath "$1") | |
if [ -z "$PATH" ]; then | |
PATH=$DIR | |
elif [ -d "$DIR" ] && [[ ":$PATH:" != *":$DIR:"* ]] ; then | |
if [ "$2" = "after" ] ; then | |
export PATH=$PATH:$DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ProtocToCpp TARGET : input.proto ; | |
rule ProtocToCpp { | |
local genDir = _pb ; | |
local input = [ FGristFiles $(2) ] ; | |
local cpp = [ FGristFiles [ FDirName $(input:D) $(genDir) $(input:B).pb.cc ] ] ; | |
local h = [ FGristFiles [ FDirName $(input:D) $(genDir) $(input:B).pb.h ] ] ; | |
local outDir = [ FGetAbsolutePath [ FDirName $(input:D) $(genDir) ] ] ; | |
ProtocRun_ $(cpp) $(h) : $(input) : $(genDir) : $(outDir) ; | |
DEPENDS protoc-to-cpp : $(cpp) $(h) ; |
OlderNewer