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() {
337
337
esac
338
338
}
339
339
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
+
340
349
msg " looking for configure programs"
341
350
need_cmd cmp
342
351
need_cmd mkdir
509
518
510
519
DEFAULT_BUILD=" ${CFG_CPUTYPE} -${CFG_OSTYPE} "
511
520
512
- CFG_SRC_DIR=" $( cd $( dirname $0 ) && pwd ) /"
521
+ CFG_SRC_DIR=" $( abs_path $( dirname $0 ) ) /"
513
522
CFG_BUILD_DIR=" $( pwd) /"
514
523
CFG_SELF=" $0 "
515
524
CFG_CONFIGURE_ARGS=" $@ "
You can’t perform that action at this time.
0 commit comments