We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93b7b41 commit 0c196fdCopy full SHA for 0c196fd
configure
@@ -337,6 +337,15 @@ to_gnu_triple() {
337
esac
338
}
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
+
349
msg "looking for configure programs"
350
need_cmd cmp
351
need_cmd mkdir
@@ -509,7 +518,7 @@ fi
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="$@"
0 commit comments