]> gitweb.michael.orlitzky.com - bash.d.git/blob - compilation.sh
sage.sh: use palp from the system
[bash.d.git] / compilation.sh
1 #
2 # compilation
3 #
4
5 # Grab CFLAGS, etc. from our profile after first processing its parent
6 # profiles recursively
7 load_profile_defaults() {
8 local profile="${1}"
9 if [ -f "${profile}/parent" ]; then
10 for parent in $(cat "${profile}/parent"); do
11 local _parent_path="${profile}/${parent}"
12 load_profile_defaults "${_parent_path}"
13 done
14 fi
15
16 if [ -f "${profile}/make.defaults" ]; then
17 if [ -r "${profile}/make.defaults" ]; then
18 . "${profile}/make.defaults"
19 fi
20 fi
21 }
22
23 load_profile_defaults /etc/portage/make.profile
24
25
26 # and from make.conf, allowing the values in make.conf to override the
27 # ones in the profile.
28 if [ -f /etc/portage/make.conf ]; then
29 if [ -r /etc/portage/make.conf ]; then
30 . /etc/portage/make.conf
31 fi
32 fi
33
34 # These are really the only variables that make sense to export to
35 # subsequent commands.
36 export CFLAGS
37 export CXXFLAGS
38 export FFLAGS
39 export FCFLAGS
40 export LDFLAGS
41
42 # This variable isn't standard, but I've started including it in my
43 # Haskell makefiles so that we don't have to hard-code user preferences
44 # (these flags) in the cabal files that *everyone* uses.
45 export HCFLAGS
46