File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,15 @@ to_gnu_triple() {
337337 esac
338338}
339339
340+ # Prints the absolute path of a directory to stdout
341+ abs_path () {
342+ local _path=" $1 "
343+ # Unset CDPATH because it causes havok: it makes the destination unpredictable
344+ # and triggers 'cd' to print the path to stdout. Route `cd`'s output to /dev/null
345+ # for good measure.
346+ (unset CDPATH && cd " $_path " > /dev/null && pwd)
347+ }
348+
340349msg " looking for configure programs"
341350need_cmd cmp
342351need_cmd mkdir
509518
510519DEFAULT_BUILD=" ${CFG_CPUTYPE} -${CFG_OSTYPE} "
511520
512- CFG_SRC_DIR=" $( cd $( dirname $0 ) && pwd ) /"
521+ CFG_SRC_DIR=" $( abs_path $( dirname $0 ) ) /"
513522CFG_BUILD_DIR=" $( pwd) /"
514523CFG_SELF=" $0 "
515524CFG_CONFIGURE_ARGS=" $@ "
You can’t perform that action at this time.
0 commit comments