@@ -43,13 +43,16 @@ function print_help {
4343 # LPF's lpfcxx doesn't recognize "--help", just "-help"
4444 help_arg=" -help"
4545 fi
46+ local ALL_BACKENDS=" ${BACKENDS[@]} "
4647
4748 echo " * Compiles an ALP/GraphBLAS application by calling an underlying compiler and by passing needed flags."
4849 echo
49- echo " USAGE : ${this_bin} [ALP-specific options...] [--] <compiler arguments...>"
50+ echo " Usage : ${this_bin} [ALP-specific options...] [--] <compiler arguments...>"
5051 echo
5152 echo " ALP-specific options:"
52- echo " -b,--backend <backend> compile against the ALP/GraphBLAS backend <backend>; possible values: ${BACKENDS[@]} ; default: reference"
53+ echo " -b,--backend <backend> compile against the ALP/GraphBLAS backend <backend>;"
54+ echo " possible values: ${ALL_BACKENDS// / , } ;"
55+ echo " default: ${BACKENDS[0]} "
5356 echo " --link-alp-static link the specified ALP/GraphBLAS backend statically (default linking is dynamic)"
5457 echo " --show show the full compilation command WITHOUT executing it"
5558 echo " --version display the current ALP/GraphBLAS version"
@@ -117,7 +120,13 @@ then
117120fi
118121
119122if [[ " ${help} " == " yes" ]]; then
120- print_help " $( realpath $0 ) " ${BACKEND} ${COMPILER}
123+ full_path=" $0 "
124+ # try calling realpath (if it exists) to get the full path
125+ real_path=" $( realpath $0 2>&1 ) "
126+ if [[ " $? " == " 0" ]]; then
127+ full_path=${real_path}
128+ fi
129+ print_help " ${full_path} " " ${BACKEND} " " ${COMPILER} "
121130 exit 0
122131fi
123132
0 commit comments