]> gitweb.michael.orlitzky.com - bash.d.git/commitdiff
compilation: load variables from the profile make.defaults, too.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 7 Dec 2017 21:44:35 +0000 (16:44 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 7 Dec 2017 21:44:35 +0000 (16:44 -0500)
compilation

index 609534503dc9fc11e126da16f8082642f97ea140..3368ad2806f28fcd0010088cbd95413b66fdc25f 100644 (file)
@@ -1,7 +1,20 @@
 #!/bin/bash
 
 #!/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"
+
 
 # LDFLAGS comes from.. somewhere else.
 export LDFLAGS="-Wl,-O1 -Wl,--as-needed"
 
 # LDFLAGS comes from.. somewhere else.
 export LDFLAGS="-Wl,-O1 -Wl,--as-needed"