summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge (Mutabah) <acessdev@gmail.com>2016-12-28 16:30:34 +1100
committerGitHub <noreply@github.com>2016-12-28 16:30:34 +1100
commit84d8ce671f485f586ee2c1f21e11854aeaaf0c7c (patch)
tree93566ed2200b0b68d89137e6dd28af5742457417
parent5c64edfd50b334022f0a0ca5414287a9dd8aa3c2 (diff)
parent7fc20e6165e3d3302a07a876c7b86e0b5fd167ab (diff)
downloadmrust-84d8ce671f485f586ee2c1f21e11854aeaaf0c7c.tar.gz
Merge pull request #15 from ubsan/sed-fix
Fix sed to work across unices
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e68801f1..ba78b6e4 100644
--- a/Makefile
+++ b/Makefile
@@ -135,7 +135,10 @@ output/lib%.hir: $(RUSTCSRC)src/lib%/src/lib.rs $(RUSTCSRC) $(BIN)
fcn_extcrate = $(patsubst %,output/lib%.hir,$(1))
-fn_getdeps = $(shell cat $1 | sed -nr 's/.*extern crate ([a-zA-Z_0-9]+)( as .*)?;.*/\1/p' | tr '\n' ' ')
+fn_getdeps = \
+ $(shell cat $1 \
+ | sed -n 's/.*extern crate \([a-zA-Z_0-9][a-zA-Z_0-9]*\)\( as .*\)\{0,1\};.*/\1/p' \
+ | tr '\n' ' ')
output/libarena.hir: output/libcore.hir
output/liballoc.hir: output/libcore.hir