#!/bin/bash # # Miscellaneous scripts for figuring out OVM. # # Usage: # ./ovm.sh set -o nounset set -o pipefail set -o errexit source build/common.sh # $PY27 proc grep-python { find $PY27 -type f | xargs grep @Argv } # https://stackoverflow.com/questions/2224334/gcc-dump-preprocessor-defines # 493 variables. proc pp-vars { gcc -E -dM - < $PY27/pyconfig.h } @Argv (CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (C {(source)} {(build/common.sh)}) (FuncDef name: grep-python body: (BraceGroup children: [ (Pipeline children: [ (C {(find)} {($ VSub_Name "$PY27")} {(-type)} {(f)}) (C {(xargs)} {(grep)} {(DQ ($ VSub_At "$@"))}) ] negated: False ) ] spids: [50] ) spids: [46 49] ) (FuncDef name: pp-vars body: (BraceGroup children: [ (SimpleCommand words: [{(gcc)} {(-E)} {(-dM)} {(-)}] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {($ VSub_Name "$PY27") (/pyconfig.h)} spids: [96] ) ] ) ] spids: [85] ) spids: [81 84] ) (C {(DQ ($ VSub_At "$@"))}) ] )