X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=compilation;h=1dc51dee4bfddf6ea1ee3caf3009808a00130095;hb=f798b14aba7f6c0b9a30c7d169fe6b997613ed1c;hp=b13a39120562d3b8b0c2c3b4235c0a99bb307b8f;hpb=b6c4c9f624a48c7c9740793b7d0cfdd238b42246;p=bash.d.git diff --git a/compilation b/compilation index b13a391..1dc51de 100644 --- a/compilation +++ b/compilation @@ -1,10 +1,24 @@ -#!/bin/bash +#!/bin/sh -# Grab CFLAGS, etc. from make.conf. -source /etc/portage/make.conf +# Grab CFLAGS, etc. from the profile... +if [ -f /etc/portage/make.profile/make.defaults ]; then + . /etc/portage/make.profile/make.defaults +fi -# LDFLAGS comes from.. somewhere else. -LDFLAGS="-Wl,-O1 -Wl,--as-needed" +# and from make.conf, allowing the values in make.conf to override the +# ones in the profile. +if [ -f /etc/portage/make.conf ]; then + . /etc/portage/make.conf +fi + + +# Not a portage variable, but it's real handy. +REPOS="${DISTDIR}/../repositories" -# Portage does this for us. -MAKE="make ${MAKEOPTS}" +# These are really the only two that make sense to export to +# subsequent commands. +export CFLAGS +export CXXFLAGS + +# LDFLAGS comes from.. somewhere else. +export LDFLAGS="-Wl,-O1 -Wl,--as-needed"