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, Version 1.0 only
1N/A# (the "License"). You may not use this file except in compliance
1N/A# 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/Ause ExtUtils::MakeMaker;
1N/Ause Config;
1N/A
1N/A# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
1N/A# to automatically include Makefile code for the targets
1N/A# config, all, clean, realclean and sdbm/Makefile
1N/A# which perform the corresponding actions in the subdirectory.
1N/A
1N/A$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
1N/Aif ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
1N/Aelse { $myextlib = 'sdbm/libsdbm$(LIB_EXT)'; }
1N/A
1N/AWriteMakefile(
1N/A NAME => 'SDBM_File',
1N/A MYEXTLIB => $myextlib,
1N/A MAN3PODS => {}, # Pods will be built by installman.
1N/A XSPROTOARG => '-noprototypes', # XXX remove later?
1N/A VERSION_FROM => 'SDBM_File.pm',
1N/A DEFINE => $define,
1N/A PERL_MALLOC_OK => 1,
1N/A );
1N/A
1N/Asub MY::postamble {
1N/A if ($^O =~ /MSWin32/ && Win32::IsWin95()) {
1N/A if ($Config{'make'} =~ /dmake/i) {
1N/A # dmake-specific
1N/A return <<'EOT';
1N/A$(MYEXTLIB): sdbm/Makefile
1N/A@[
1N/A cd sdbm
1N/A $(MAKE) all
1N/A cd ..
1N/A]
1N/AEOT
1N/A } elsif ($Config{'make'} =~ /nmake/i) {
1N/A #
1N/A return <<'EOT';
1N/A$(MYEXTLIB): sdbm/Makefile
1N/A cd sdbm
1N/A $(MAKE) all
1N/A cd ..
1N/AEOT
1N/A }
1N/A} elsif ($^O ne 'VMS') {
1N/A '
1N/A$(MYEXTLIB): sdbm/Makefile
1N/A cd sdbm && $(MAKE) all
1N/A';
1N/A }
1N/A else {
1N/A '
1N/A$(MYEXTLIB) : [.sdbm]descrip.mms
1N/A set def [.sdbm]
1N/A $(MMS) all
1N/A set def [-]
1N/A';
1N/A }
1N/A}