X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=compilation;h=a166d6678bdc9fca71f317b911f5b93c919bc63d;hb=087320ca8226a1e0c2cfcfd196e0fc8373f7cf59;hp=9aab1ac62f274fea8bf2055e805a15af1ad84636;hpb=d8d14246f041acc7b29b2e8946367bcc39c23b85;p=bash.d.git diff --git a/compilation b/compilation index 9aab1ac..a166d66 100644 --- a/compilation +++ b/compilation @@ -1,10 +1,24 @@ #!/bin/bash -# 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 + source /etc/portage/make.profile/make.defaults +fi + +# and from make.conf, allowing the values in make.conf to override the +# ones in the profile. +if [ -f /etc/portage/make.conf ]; then + source /etc/portage/make.conf +fi + + +# Not a portage variable, but it's real handy. +REPOS="${DISTDIR}/../repositories" + +# 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" - -# Portage does this for us. -export MAKE="make ${MAKEOPTS}"