mirror of
https://github.com/notwa/rc
synced 2024-11-05 08:19:03 -08:00
basic install checking
This commit is contained in:
parent
a9be56a8f3
commit
c7b12d340c
1 changed files with 4 additions and 2 deletions
|
@ -15,13 +15,15 @@ ify() {
|
||||||
$@ | $ex
|
$@ | $ex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has() { which "$1" >/dev/null && which "$1"; }
|
||||||
|
|
||||||
# cleanup in case of inherited exports
|
# cleanup in case of inherited exports
|
||||||
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
|
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
|
||||||
export $x=
|
export $x=
|
||||||
done
|
done
|
||||||
|
|
||||||
export PREFIX="$HOME/opt/local"
|
export PREFIX="$HOME/opt/local"
|
||||||
export CC=clang
|
export CC="$(has clang || has gcc)"
|
||||||
export CFLAGS='-march=native -O2'
|
export CFLAGS='-march=native -O2'
|
||||||
export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
|
export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
|
||||||
export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
|
export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
|
||||||
|
@ -35,7 +37,7 @@ export GOPATH="$HOME/go"
|
||||||
for x in ls dir vdir grep fgrep egrep; do
|
for x in ls dir vdir grep fgrep egrep; do
|
||||||
alias $x="$x --color=auto"
|
alias $x="$x --color=auto"
|
||||||
done
|
done
|
||||||
alias make="colormake"
|
alias make="$(has colormake || has make)"
|
||||||
|
|
||||||
# just flags
|
# just flags
|
||||||
export LESS='-SR'
|
export LESS='-SR'
|
||||||
|
|
Loading…
Reference in a new issue