]> git.lizzy.rs Git - rust.git/commitdiff
use a compatible syntax for grep GNU/BSD
authorSébastien Marie <semarie@users.noreply.github.com>
Sat, 13 Feb 2016 19:03:08 +0000 (20:03 +0100)
committerSébastien Marie <semarie@users.noreply.github.com>
Sat, 13 Feb 2016 19:03:08 +0000 (20:03 +0100)
The BSD grep for "basic regex" don't support \| as alternate operator.
Use multiple -e arguments for expressing alternative.

src/test/run-make/codegen-options-parsing/Makefile

index c1f9065e9d2d621d37bbf8574f0b7725da3ec218..9543fad8e533b55649e17c1c0158ec69e1199680 100644 (file)
@@ -25,7 +25,7 @@ all:
 
        # Should not link dead code...
        $(RUSTC) -Z print-link-args dummy.rs 2>&1 | \
-               grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF'
+               grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF'
        # ... unless you specifically ask to keep it
        $(RUSTC) -Z print-link-args -C link-dead-code dummy.rs 2>&1 | \
-               (! grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF')
+               (! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF')