Makefile revision 80ab886d233f514d54c2a6bdeb9fdfd951bd6881
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley#
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# CDDL HEADER START
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# The contents of this file are subject to the terms of the
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# Common Development and Distribution License (the "License").
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# You may not use this file except in compliance with the License.
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley#
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# or http://www.opensolaris.org/os/licensing.
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# See the License for the specific language governing permissions
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# and limitations under the License.
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley#
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# When distributing Covered Code, include this CDDL HEADER in each
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# If applicable, add the following below this CDDL HEADER, with the
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob Halley# fields enclosed by brackets "[]" replaced with your own identifying
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# information: Portions Copyright [yyyy] [name of copyright owner]
e85ffb301b294d70ddc1d90234788403666bb944David Lawrence#
e85ffb301b294d70ddc1d90234788403666bb944David Lawrence# CDDL HEADER END
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Use is subject to license terms.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# ident "%Z%%M% %I% %E% SMI"
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
828a5beda384130d5e2913dadd862924c53405bfAndreas Gustafsson
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
828a5beda384130d5e2913dadd862924c53405bfAndreas Gustafsson# The perl5 installation for Solaris differs from that generated by the
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Perl Configure procedure. The configuration appropriate for the current
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# build is automatically generated from pre-existing configuration files
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# for the build platform.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonPROG = perl
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Some of the Makefile.master and Makefile.cmd flags are overridden by
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# ../Makefile.perlcfg which is in turn generated from config.sh by
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# ../extract_config.sh - check there first before overriding anything in this
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Makefile.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyinclude ../../../Makefile.cmd
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyinclude ../Makefile.perlcfg
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# DynaLoader is a special extension as it has to be built statically.
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyDYNALOADER=lib/auto/DynaLoader/DynaLoader.a
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# Because autosplit generates a lot of files, we create a dummy timestamp file
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# so that dependency checking can be performed.
5fbced719b71e659322b4ce3e4a39c9b039674c7Bob HalleyAUTOSPLIT = lib/auto/.tstamp
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
81e92fbafaa07bd8ccbbeb4b5926d548b5c4560eDavid LawrenceCLEANFILES = miniperlmain.o perlmain.o opmini.o perlmain.c writemain cflags \
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson ext.libs
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
81e92fbafaa07bd8ccbbeb4b5926d548b5c4560eDavid LawrenceCLOBBERFILES = $(MINIPERL) $(PROG) $(PERL_CONFIGDEP) libperl.so lib/re.pm \
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson lib/ExtUtils/Miniperl.pm t/perl
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafssonclobber := CLOBBERFILES += CLEANFILES
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# Add in the perl-specific flags (including largefile flags).
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyCPPFLAGS += $(PERL_COREFLAGS) $(PERL_LFFLAGS)
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Add in the libraries perl needs to be linked against.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas GustafssonLDLIBS += $(PERL_LDLIBS)
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# Compiler replacement rules
178f6ad061e54bc5babfca3577f72058fa0797c1Bob HalleySED_UN_CC = -e "s!'$(CC) -_gcc=-w!'cc!"
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob HalleySED_UN_CC_E = -e "s!'$(REAL_CC)!'cc!"
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceall := TARGET = all
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceinstall := TARGET = install
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceclobber := TARGET = clobber
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceclean := TARGET = clean
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleytest := TARGET = test
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyall: perl extensions utilities
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Expand template files that depend on config.sh.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley$(PERL_CONFIG_H): config_h.SH config.sh
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(CHMOD) 0555 config_h.SH
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence ./config_h.SH
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceperlmain.c: writemain $(PERL_CONFIG_H)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence ./writemain $(DYNALOADER) > perlmain.c
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halleywritemain: writemain.SH $(PERL_CONFIG_H)
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley $(CHMOD) 0555 writemain.SH
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley ./writemain.SH
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Build the libperl.so and libperl.so.1 shared objects using Makefile.lib,
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# which uses the correct library build environment.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrencelibperl.so: $(PERL_CONFIG_H) FRC
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley @ $(ECHO) "Building libperl.so"; $(MAKE) -f Makefile.lib $(TARGET)
efd6c944a4ebd3fb65dc39f9172d322198b2b1d3Bob Halley
efd6c944a4ebd3fb65dc39f9172d322198b2b1d3Bob Halley#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# Build miniperl, the bootstrap perl executable, and check it executes OK.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley$(MINIPERL): miniperlmain.o opmini.o libperl.so
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(LINK.c) -o $@ miniperlmain.o opmini.o \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence -R \$$ORIGIN -L. -lperl $(LDLIBS)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ $(MINIPERL) -w -Ilib -MExporter -e 'exit(0);' || \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence { $(ECHO) "error building miniperl"; $(RM) $(MINIPERL); exit 2; }
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceminiperlmain.o: miniperlmain.c $(PERL_CONFIG_H)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# opmini.o is a version of op.o compiled with -DPERL_EXTERNAL_GLOB. Perl has
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# an internal implementation of glob, but it isn't available at this point.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyopmini.o: op.c $(PERL_CONFIG_H)
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley $(COMPILE.c) -o $@ op.c -DPERL_EXTERNAL_GLOB
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley $(POST_PROCESS_O)
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley.PARALLEL: miniperlmain.o opmini.o libperl.so
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley#
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# Prepare for building perl modules by:
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# * Building miniperl.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# * Copying re.pm from ext/re into lib.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# * Creating Config.pm from config.sh.
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# * Autosplitting any ./lib modules that require it.
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# * Creating a fake cflags file. ExtUtils::MM_Unix (used to build extensions)
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# checks to see if there is a non-zero sized file called 'cflags' in this
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# directory, so we fool it by creating one.
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleypreplibrary: $(MINIPERL) $(PERL_CONFIG_PM) lib/ExtUtils/Miniperl.pm cflags \
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(AUTOSPLIT)
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley$(PERL_CONFIG_PM): configpm $(PERL_CONFIG_H) myconfig.SH $(MINIPERL) lib/re.pm
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(MINIPERL) configpm $@
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleylib/re.pm : ext/re/re.pm
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(CP) -f ext/re/re.pm $@
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleylib/ExtUtils/Miniperl.pm: $(PERL_CONFIGDEP) $(MINIPERL) \
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley miniperlmain.c minimod.pl
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(MINIPERL) minimod.pl > minimod.tmp
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(MV) minimod.tmp $@
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# Note: cflags needs to be non-zero sized, so $(TOUCH) won't do.
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleycflags:
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(ECHO) > cflags
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence.PARALLEL: $(PERL_CONFIGDEP) lib/re.pm lib/ExtUtils/Miniperl.pm \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence cflags $(AUTOSPLIT)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Because autosplit generates a lot of files, we create a dummy timestamp file
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence$(AUTOSPLIT): $(PERL_CONFIGDEP)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ $(MKDIR) -p lib/auto
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley $(MINIPERL) -Ilib -MAutoSplit -e 'autosplit_lib_modules(@ARGV)' \
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley `find lib -name SCCS -prune -o -name '*.pm' -print`
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley @ $(TOUCH) $(AUTOSPLIT)
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley#
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley# Make DynaLoader. DynaLoader is statically linked into the perl executable
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# because it is used to load in all the other dynamically loaded modules.
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley# Note: VERSION is used by ON as a environment variable and by perl module
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley# makefiles as a make macro, so we need to unset it before building any modules.
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley#
19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77Bob Halley
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceext/DynaLoader/Makefile: ext/DynaLoader/Makefile.PL $(PERL_CONFIGDEP) cflags
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd ext/DynaLoader; pwd; $(PERL_MM_ENV); \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(MINIPERL) Makefile.PL INSTALLDIRS=perl \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence LIBPERL_A=libperl.so $(PERL_MM_ARGS)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence$(DYNALOADER): ext/DynaLoader/Makefile $(PERL_CONFIGDEP) cflags FRC
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd ext/DynaLoader; pwd; $(PERL_MM_ENV); \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(MAKE) LINKTYPE=static CCCDLFLAGS=
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Create the perl executable.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceperl: libperl.so $(DYNALOADER) $(PERL_STATIC_TGT) perlmain.o
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(LINK.c) -R$(PERL_REAL_CORE_DIR) -o $@ perlmain.o $(DYNALOADER) \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence -L. -lperl $(LDLIBS)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(POST_PROCESS)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceperlmain.o: perlmain.c $(PERL_CONFIG_H)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(COMPILE.c) -o $@ $<
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(POST_PROCESS_O)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence.PARALLEL: perlmain.o
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Build all the extensions. The rules for this are in the generated
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# ext/Makefile file.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceextensions: preplibrary FRC
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd ext; pwd; $(MAKE) $(TARGET)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Build utilities and pod pages.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceutilities: perl FRC
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd x2p; pwd; $(MAKE) $(TARGET)
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley @ cd pod; pwd; $(MAKE) $(TARGET)
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley @ cd utils; pwd; $(MAKE) $(TARGET)
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Install targets. The bin, lib and pod symlinks are created here. The man
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# link is created by the SUNWpl5m package. Also we overwrite the Config.pm we
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# used to build our modules with one sanitized of the /ws/on*-tools dependency.
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleyinstall_files:
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley $(RM) $(PERL_CORE_DIR)/libperl.so
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ LD_LIBRARY_PATH=$(PERL_DISTRIB) $(PERL_DISTRIB)/perl ./installperl
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ $(MAKE) -f Makefile.lib install_lib
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson umask 022; $(MKDIR) -p $(PERL_VENDOR_DIR)
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(RM) $(PERL_ARCHLIB_DIR)/Config.pm
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(SED) $(SED_UN_CC) $(SED_UN_CC_E) $(PERL_CONFIG_PM) \
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley > $(PERL_ARCHLIB_DIR)/Config.pm
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(CHMOD) 444 $(PERL_ARCHLIB_DIR)/Config.pm
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ $(CHOWN) -R $(OWNER):$(GROUP) $(PERL_ROOT_STEM)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceinstall: all .WAIT install_files
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence# Perl test suite target.
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence#
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrencetest: all
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ unset VERSION; \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence LD_LIBRARY_PATH=$(PERL_DISTRIB) export LD_LIBRARY_PATH; \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence PERL5LIB=../lib; export PERL5LIB; \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence cd t; pwd; \
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(CP) ../perl .; \
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley $(CHMOD) 755 TEST; \
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson ./TEST
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson# Cleaning targets.
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson#
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafssonclean_pod:
5a6e6c2c9b2f6cf426aa2a682aa800765e26d540Andreas Gustafsson @ cd pod; pwd; $(MAKE) clean
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyclean_utilities:
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd utils; pwd; $(MAKE) clean
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
b897c52f865b2fc4e220e2110b874e59c716456bBob Halleyclean_x2p:
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley @ cd x2p; pwd; $(MAKE) clean
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halleyclean_extensions:
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence -@ unset VERSION; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence cd ext; pwd; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence ( \
541ed6feaf687e97990ad19748faeec744158559David Lawrence cd DynaLoader; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ -f Makefile.old ] && mf=Makefile.old; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ -f Makefile ] && mf=Makefile; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ ! -z "$$mf" ] && $(MAKE) -f $$mf clean; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence ); \
541ed6feaf687e97990ad19748faeec744158559David Lawrence $(MAKE) clean
541ed6feaf687e97990ad19748faeec744158559David Lawrence
541ed6feaf687e97990ad19748faeec744158559David Lawrenceclean_lib:
541ed6feaf687e97990ad19748faeec744158559David Lawrence $(MAKE) -f Makefile.lib clean
541ed6feaf687e97990ad19748faeec744158559David Lawrence
541ed6feaf687e97990ad19748faeec744158559David Lawrenceclean: clean_pod clean_utilities clean_x2p clean_extensions clean_lib
541ed6feaf687e97990ad19748faeec744158559David Lawrence $(RM) $(CLEANFILES)
541ed6feaf687e97990ad19748faeec744158559David Lawrence
541ed6feaf687e97990ad19748faeec744158559David Lawrence#
541ed6feaf687e97990ad19748faeec744158559David Lawrence# Clobber targets
541ed6feaf687e97990ad19748faeec744158559David Lawrence#
541ed6feaf687e97990ad19748faeec744158559David Lawrence
541ed6feaf687e97990ad19748faeec744158559David Lawrenceclobber_extensions:
e85ffb301b294d70ddc1d90234788403666bb944David Lawrence -@ unset VERSION; \
e85ffb301b294d70ddc1d90234788403666bb944David Lawrence cd ext; pwd; \
e85ffb301b294d70ddc1d90234788403666bb944David Lawrence ( \
541ed6feaf687e97990ad19748faeec744158559David Lawrence cd DynaLoader; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ -f Makefile.old ] && mf=Makefile.old; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ -f Makefile ] && mf=Makefile; \
541ed6feaf687e97990ad19748faeec744158559David Lawrence [ ! -z "$$mf" ] && $(MAKE) -f $$mf realclean; \
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley ); \
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley $(MAKE) clobber
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
59a6d9cbcdbec6960d47e5871fb7e7c0253e1fb2Mark Andrewsclobber_lib:
59a6d9cbcdbec6960d47e5871fb7e7c0253e1fb2Mark Andrews $(MAKE) -f Makefile.lib $(TARGET)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(RM) -r lib/auto
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence $(RM) `find ./lib -name .exists`
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceclobber_pod:
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence @ cd pod; pwd; $(MAKE) $(TARGET)
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrence
4b598d8ae578861d5f3fc1333c9f84c9c9c8be7cDavid Lawrenceclobber_utilities:
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley @ cd utils; pwd; $(MAKE) $(TARGET)
clobber_x2p:
@ cd x2p; pwd; $(MAKE) $(TARGET)
clobber_contrib_bin:
@ $(RM) -r contrib_bin
clobber: clobber_extensions clobber_lib clobber_pod clobber_utilities \
clobber_x2p clobber_contrib_bin
include ../../../Makefile.targ
FRC: