--- a/make-rules/shared-macros.mk Mon May 23 14:58:25 2011 -0700
+++ b/make-rules/shared-macros.mk Tue May 24 16:16:36 2011 -0700
@@ -235,9 +235,29 @@
JAVA_HOME = /usr/jdk/instances/jdk1.6.0
-PERL = /usr/perl5/bin/perl
+# This is the default BUILD version of perl
+# Not necessarily the system's default version, i.e. /usr/bin/perl
+PERL_VERSION = 5.8.4
+
+PERL_VERSIONS = 5.8.4 5.12
+
+PERL.5.8.4 = /usr/perl5/5.8.4/bin/perl
+PERL.5.12 = /usr/perl5/5.12/bin/perl
+
+PERL = $(PERL.$(PERL_VERSION))
-CCSMAKE = /usr/ccs/bin/make
+PERL_ARCH = $(shell $(PERL) -e 'use Config; print $$Config{archname}')
+# Optimally we should ask perl which C compiler was used but it doesn't
+# result in a full path name. Only "c" is being recorded
+# inside perl builds while we actually need a full path to
+# the studio compiler.
+#PERL_CC = $(shell $(PERL) -e 'use Config; print $$Config{cc}')
+PERL_OPTIMIZE = $(shell $(PERL) -e 'use Config; print $$Config{optimize}')
+
+PKG_MACROS += PERL_ARCH=$(PERL_ARCH)
+PKG_MACROS += PERL_VERSION=$(PERL_VERSION)
+
+CCSMAKE = /usr/ccs/bin/make
GMAKE = /usr/gnu/bin/make
GPATCH = /usr/gnu/bin/patch
PATCH_LEVEL = 1