1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License (the "License").
1N/A# You may not use this file except in compliance with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/A#
1N/A# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
1N/A#
1N/A
1N/Ainclude ../../Makefile.cmd
1N/A
1N/A# To turn KEEP_STATE off the following two environment variables must be unset.
1N/AKEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
1N/A
1N/A# Perl installs files we don't want to ship, so we install to a
1N/A# staging area to postprocess and install the result to $(ROOT)
1N/ASTAGE = $(SRC)/cmd/perl/$(PERL_VERSION)/staging
1N/A
1N/APERL=/usr/perl5/$(PERL_VERSION)/bin/perl
1N/A
1N/APERL_MM_ARGS = INSTALLDIRS=perl CC='$(CC)' LD='$(CC)'
1N/A
1N/A# Prefix for Solaris-specific extensions that are maintained by
1N/A# Sun/Oracle.
1N/ASUN_SOLARIS = Sun/Solaris
1N/A
1N/A# Add any XS extensions here.
1N/APERL_DYNAMIC_EXT = \
1N/A $(SUN_SOLARIS)/Utils \
1N/A $(SUN_SOLARIS)/Kstat \
1N/A $(SUN_SOLARIS)/Intrs \
1N/A $(SUN_SOLARIS)/Project \
1N/A $(SUN_SOLARIS)/Task \
1N/A $(SUN_SOLARIS)/Exacct \
1N/A $(SUN_SOLARIS)/Privilege \
1N/A $(SUN_SOLARIS)/Lgrp \
1N/A $(SUN_SOLARIS)/Ucred
1N/A
1N/A# Add any pure-perl extensions here.
1N/APERL_NONXS_EXT = \
1N/A $(SUN_SOLARIS)/BSM \
1N/A $(SUN_SOLARIS)/PerlGcc \
1N/A $(SUN_SOLARIS)/Pg
1N/A
1N/APERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
1N/APERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
1N/A
1N/Aall: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
1N/A
1N/A.PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
1N/A
1N/Ainstall: all
1N/A for ext in $(PERL_EXT); do \
1N/A if [ -d $$ext ]; then \
1N/A ( \
1N/A cd $$ext; pwd; \
1N/A $(KEEP_STATE_OFF); $(MAKE) $(PERL_MM_ARGS) \
1N/A DESTDIR=$(STAGE) install; \
1N/A cd $(STAGE); \
1N/A find . \( -name ".packlist" -o -name "perllocal.pod" \
1N/A -o -name "*.bc" \) \
1N/A -exec $(RM) {} \; ; \
1N/A /usr/bin/pax -rwpe ./* ${ROOT} ; \
1N/A ) \
1N/A else \
1N/A /bin/false; \
1N/A fi \
1N/A done
1N/A
1N/A#
1N/A# copy_contrib copies the clearfiles from ../contrib to here.
1N/A#
1N/Acopy_contrib:
1N/A @ $(KSH93) ../contrib/copy_contrib.sh ../contrib . $(PERL_EXT)
1N/A
1N/Aclean:
1N/A for ext in $(PERL_EXT); do \
1N/A if [ -d $$ext ]; then \
1N/A ( \
1N/A cd $$ext; pwd; \
1N/A $(KEEP_STATE_OFF); $(MAKE) clean; \
1N/A ) \
1N/A fi \
1N/A done
1N/A
1N/A# Remove Sun/Solaris
1N/Aclobber:
1N/A @ $(RM) -r Sun
1N/A
1N/Atest: all
1N/A for ext in $(PERL_EXT); do \
1N/A ( \
1N/A cd $$ext; pwd; \
1N/A $(KEEP_STATE_OFF); $(MAKE) test; \
1N/A ) \
1N/A done
1N/A
1N/A#
1N/A# Ensure that the extension's makefile is built before
1N/A# trying to build the extension
1N/A#
1N/A%/Makefile: %/Makefile.PL $(PERL_CONFIGDEP)
1N/A @ cd $(@D); pwd; $(PERL) $(<F) $(PERL_MM_ARGS) 2>&1 /dev/null
1N/A
1N/A# Pattern-matching rule for extensions.
1N/A$(SUN_SOLARIS)/%: $(SUN_SOLARIS)/%/Makefile FRC
1N/A @ cd $@; pwd; $(KEEP_STATE_OFF) ; \
1N/A $(PERL_MM_ARGS) $(MAKE) DESTDIR=$(STAGE) all
1N/A
1N/AFRC: