Makefile revision 1
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# CDDL HEADER START
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# The contents of this file are subject to the terms of the
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# Common Development and Distribution License (the "License").
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# You may not use this file except in compliance with the License.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# or http://www.opensolaris.org/os/licensing.
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# See the License for the specific language governing permissions
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# and limitations under the License.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# If applicable, add the following below this CDDL HEADER, with the
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# fields enclosed by brackets "[]" replaced with your own identifying
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# information: Portions Copyright [yyyy] [name of copyright owner]
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# CDDL HEADER END
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# Extra arguments needed to fool MakeMaker into building in the distrib tree.
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# Note we fake up an extra directory for contrib scripts under distrib - the
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# modified installperl knows how to handle the contents.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'AmorePERL_MM_ARGS += INST_ARCHLIB=$(PERL_DISTRIB)/lib INST_LIB=$(PERL_DISTRIB)/lib \
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov INST_BIN=$(PERL_DISTRIB)/contrib_bin PERL_SRC=$(PERL_DISTRIB)
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# All SMI perl libraries should be prefixed with this.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# Add any XS extensions here.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# Add any pure-perl extensions here.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'AmorePERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'AmorePERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amoreall: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# Note: this is a dummy install target; during 'make all' this Makefile
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# populates ../distrib/lib with the modules that it is responsible for building,
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# and the install target of ../distrib/Makefile subsequently copies the modules
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# into the proto area.
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# copy_contrib copies the clearfiles from ../../contrib to here.
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov @ ../../contrib/copy_contrib ../../contrib . $(PERL_EXT)
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore if [ -d $$ext ]; then \
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov if [ -d $$ext ]; then \
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore [ ! -z "$$mf" ] && $(MAKE) -f $$mf realclean; \
260e9a87725c090ba5835b1f9f0b62fa2f96036fYuri Pankov# Pattern-matching rule for Makefiles.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore @ cd $(@D); pwd; $(RUN_MINIPERL) $(<F) $(PERL_MM_ARGS) > /dev/null
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# Pattern-matching rule for extensions.
371584c2eae4cf827fd406ba26c14f021adaaa70Yuri Pankov# Additional rule to make sure changes to the ::Exacct sub-module Makefile.PL
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore# files results in the parent Makefile.PL being rerun.
95c635efb7c3b86efc493e0447eaec7aecca3f0fGarrett D'Amore$(SUN_SOLARIS)/Exacct/Makefile: $(SUN_SOLARIS)/Exacct/Makefile.PL \