diff options
author | Jason Zaman <jason@perfinion.com> | 2018-05-28 21:50:21 +0800 |
---|---|---|
committer | Jason Zaman <jason@perfinion.com> | 2018-05-28 21:56:34 +0800 |
commit | 69095610798ec7def94fc453dfeaff758e0ee9cd (patch) | |
tree | 6a1ecb397136e29cb020d00b00dd147e76dce22f /tensorflow/c/generate-pc.sh | |
parent | dcb10b1d557168646204239bea6ca5bf1abc40a3 (diff) |
generate-pc.sh: add option to set libdir
Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'tensorflow/c/generate-pc.sh')
-rwxr-xr-x | tensorflow/c/generate-pc.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tensorflow/c/generate-pc.sh b/tensorflow/c/generate-pc.sh index 02a6a58b61..7184ad68fb 100755 --- a/tensorflow/c/generate-pc.sh +++ b/tensorflow/c/generate-pc.sh @@ -15,10 +15,12 @@ # ============================================================================== TF_PREFIX='/usr/local' +LIBDIR='lib' usage() { echo "Usage: $0 OPTIONS" echo -e "-p, --prefix\tset installation prefix (default: /usr/local)" + echo -e "-l, --libdir\tset lib directory (default: lib)" echo -e "-v, --version\tset TensorFlow version" echo -e "-h, --help\tdisplay this message" } @@ -26,7 +28,7 @@ usage() { [ $# == 0 ] && usage && exit 0 # read the options -ARGS=$(getopt -o p:v:h --long prefix:,version:,help -n $0 -- "$@") +ARGS=$(getopt -o p:l:v:h --long prefix:,libdir:,version:,help -n $0 -- "$@") eval set -- "$ARGS" # extract options and their arguments into variables. @@ -38,6 +40,11 @@ while true ; do "") shift 2 ;; *) TF_PREFIX=$2 ; shift 2 ;; esac ;; + -l|--libdir) + case "$2" in + "") shift 2 ;; + *) LIBDIR=$2 ; shift 2 ;; + esac ;; -v|--version) case "$2" in "") shift 2 ;; @@ -55,7 +62,7 @@ echo "Generating pkgconfig file for TensorFlow $TF_VERSION in $TF_PREFIX" cat << EOF > tensorflow.pc prefix=${TF_PREFIX} exec_prefix=\${prefix} -libdir=\${exec_prefix}/lib +libdir=\${exec_prefix}/${LIBDIR} includedir=\${prefix}/include Name: TensorFlow |