summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-04-29 15:14:01 -0700
committerJosh Gao <jmgao@google.com>2016-04-29 15:14:01 -0700
commit895e961e2cdce2d7a385fc8293c846e3da0a460f (patch)
treeb217f4f5e13a9d2f3309c385a492e44c306d72eb
parent87aef1e33cdb0dca0b78b64b7bfecdc7cb7f83cc (diff)
downloadgdb-895e961e2cdce2d7a385fc8293c846e3da0a460f.tar.gz
Handle darwin's crappy touch(1).
Change-Id: I35549f7dc21399d6a7be786ef087557dc2990f8e
-rwxr-xr-xbuild-gdb.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/build-gdb.sh b/build-gdb.sh
index 970f0d77d..98acd5d11 100755
--- a/build-gdb.sh
+++ b/build-gdb.sh
@@ -179,8 +179,17 @@ build_lzma ()
# HACK: git doesn't keep track of file modification date, so autoconf will sometimes (usually?)
# want to regenerate itself. Trick it into not doing so by touching all of the source files.
- local NOW=`date`
- run find $SRCDIR -exec touch -d "$now" {} + &&
+ case "$BH_BUILD_CONFIG" in
+ *darwin*)
+ # Darwin's touch sucks.
+ run find $SRCDIR -exec touch -t 197001010000 {} +
+ ;;
+
+ *)
+ run find $SRCDIR -exec touch -d "`date`" {} +
+ ;;
+ esac
+
run "$SRCDIR"/configure $ARGS &&
run make -j$NUM_JOBS &&
run make -j$NUM_JOBS install