Makefile revision 29949e866e40b95795203f3ee46f44a197c946e4
377N/A#
377N/A# CDDL HEADER START
377N/A#
377N/A# The contents of this file are subject to the terms of the
377N/A# Common Development and Distribution License (the "License").
377N/A# You may not use this file except in compliance with the License.
377N/A#
377N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
377N/A# or http://www.opensolaris.org/os/licensing.
377N/A# See the License for the specific language governing permissions
377N/A# and limitations under the License.
377N/A#
377N/A# When distributing Covered Code, include this CDDL HEADER in each
377N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
377N/A# If applicable, add the following below this CDDL HEADER, with the
377N/A# fields enclosed by brackets "[]" replaced with your own identifying
377N/A# information: Portions Copyright [yyyy] [name of copyright owner]
377N/A#
377N/A# CDDL HEADER END
377N/A#
377N/A#
377N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
377N/A# Use is subject to license terms.
377N/A#
377N/A#ident "%Z%%M% %I% %E% SMI"
377N/A#
377N/A
377N/Ainclude ../../../Makefile.cmd
377N/Ainclude ../Makefile.perlcfg
377N/A
377N/A#
377N/A# Extra arguments needed to fool MakeMaker into building in the distrib tree.
377N/A# Note we fake up an extra directory for contrib scripts under distrib - the
377N/A# modified installperl knows how to handle the contents.
377N/A#
377N/APERL_MM_ARGS += INST_ARCHLIB=$(PERL_DISTRIB)/lib INST_LIB=$(PERL_DISTRIB)/lib \
377N/A INST_SCRIPT=$(PERL_DISTRIB)/contrib_bin \
377N/A INST_BIN=$(PERL_DISTRIB)/contrib_bin PERL_SRC=$(PERL_DISTRIB)
377N/A
377N/A# All SMI perl libraries should be prefixed with this.
377N/ASUN_SOLARIS = Sun/Solaris
377N/A
377N/A# Add any XS extensions here.
377N/APERL_DYNAMIC_EXT = \
377N/A $(SUN_SOLARIS)/Utils \
377N/A $(SUN_SOLARIS)/Intrs \
377N/A $(SUN_SOLARIS)/Kstat \
377N/A $(SUN_SOLARIS)/Project \
377N/A $(SUN_SOLARIS)/Task \
377N/A $(SUN_SOLARIS)/Exacct \
377N/A $(SUN_SOLARIS)/Privilege \
377N/A $(SUN_SOLARIS)/Ucred
377N/A
377N/A# Add any pure-perl extensions here.
377N/APERL_NONXS_EXT = \
377N/A $(SUN_SOLARIS)/BSM \
377N/A $(SUN_SOLARIS)/PerlGcc
377N/A
PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
.PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
#
# Note: this is a dummy install target; during 'make all' this Makefile
# populates ../distrib/lib with the modules that it is responsible for building,
# and the install target of ../distrib/Makefile subsequently copies the modules
# into the proto area.
#
install: all
#
# copy_contrib copies the clearfiles from ../../contrib to here.
#
copy_contrib: ../../contrib/copy_contrib
@ ../../contrib/copy_contrib ../../contrib . $(PERL_EXT)
clean:
-@ $(PERL_MM_ENV); \
for ext in $(PERL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
[ -f Makefile.old ] && mf=Makefile.old; \
[ -f Makefile ] && mf=Makefile; \
[ ! -z "$$mf" ] && $(MAKE) -f $$mf clean; \
) \
fi \
done
clobber:
-@ $(PERL_MM_ENV); \
for ext in $(PERL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
[ -f Makefile.old ] && mf=Makefile.old; \
[ -f Makefile ] && mf=Makefile; \
[ ! -z "$$mf" ] && $(MAKE) -f $$mf realclean; \
); \
$(RM) -r $$ext; \
fi \
done
test: all
@ $(PERL_MM_ENV); $(PERL_LD_ENV); \
for ext in $(PERL_EXT); do \
( \
cd $$ext; pwd; \
[ -f Makefile.old ] && mf=Makefile.old; \
[ -f Makefile ] && mf=Makefile; \
[ ! -z "$$mf" ] && $(MAKE) -f $$mf test; \
) \
done
# Pattern-matching rule for Makefiles.
%/Makefile: %/Makefile.PL $(PERL_CONFIGDEP)
@ cd $(@D); pwd; $(RUN_MINIPERL) $(<F) $(PERL_MM_ARGS) > /dev/null
# Pattern-matching rule for extensions.
$(SUN_SOLARIS)/%: $(SUN_SOLARIS)/%/Makefile FRC
@ cd $@; pwd; $(PERL_MM_ENV); $(MAKE) all
#
# Additional rule to make sure changes to the ::Exacct sub-module Makefile.PL
# files results in the parent Makefile.PL being rerun.
#
$(SUN_SOLARIS)/Exacct/Makefile: $(SUN_SOLARIS)/Exacct/Makefile.PL \
$(SUN_SOLARIS)/Exacct/Catalog/Makefile.PL \
$(SUN_SOLARIS)/Exacct/File/Makefile.PL \
$(SUN_SOLARIS)/Exacct/Object/Makefile.PL \
$(PERL_CONFIGDEP)
@ cd $(SUN_SOLARIS)/Exacct; pwd; \
$(RUN_MINIPERL) Makefile.PL $(PERL_MM_ARGS) > /dev/null
FRC: