]> gitweb.michael.orlitzky.com - bash.d.git/blob - compilation
sage: set SAGE_DEBUG=no.
[bash.d.git] / compilation
1 #!/bin/sh
2
3 # Grab CFLAGS, etc. from our profile after first processing its parent
4 # profiles recursively
5 load_profile_defaults() {
6 local profile="${1}"
7 if [ -f "${profile}/parent" ]; then
8 for parent in $(cat "${profile}/parent"); do
9 local _parent_path="${profile}/${parent}"
10 load_profile_defaults "${_parent_path}"
11 done
12 fi
13
14 if [ -f "${profile}/make.defaults" ]; then
15 if [ -r "${profile}/make.defaults" ]; then
16 . "${profile}/make.defaults"
17 fi
18 fi
19 }
20
21 load_profile_defaults /etc/portage/make.profile
22
23
24 # and from make.conf, allowing the values in make.conf to override the
25 # ones in the profile.
26 if [ -f /etc/portage/make.conf ]; then
27 if [ -r /etc/portage/make.conf ]; then
28 . /etc/portage/make.conf
29 fi
30 fi
31
32 # These are really the only variables that make sense to export to
33 # subsequent commands.
34 export CFLAGS
35 export CXXFLAGS
36 export LDFLAGS