]> gitweb.michael.orlitzky.com - bash.d.git/blobdiff - compilation
Use POSIX sh compatible syntax where possible.
[bash.d.git] / compilation
index 3368ad2806f28fcd0010088cbd95413b66fdc25f..1dc51dee4bfddf6ea1ee3caf3009808a00130095 100644 (file)
@@ -1,20 +1,24 @@
-#!/bin/bash
+#!/bin/sh
 
 # Grab CFLAGS, etc. from the profile...
 if [ -f /etc/portage/make.profile/make.defaults ]; then
-    source /etc/portage/make.profile/make.defaults
+    . /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
+    . /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"