Index: Makefile.PL =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/Makefile.PL,v retrieving revision 1.111 diff -u -p -d -r1.111 Makefile.PL --- Makefile.PL 27 Aug 2003 23:22:06 -0000 1.111 +++ Makefile.PL 7 Sep 2003 15:14:58 -0000 @@ -1,84 +1,69 @@ require 5.005; -# RPM builders, or people building in their home dirs: -# -# VARIABLE DEFAULT -# ------------- ----------------- -# PREFIX * /usr -# INST_PREFIX + $PREFIX -# SYSCONFDIR * /etc -# or $(PREFIX)/etc if $(INST_PREFIX) is not "/usr" -# INST_SYSCONFDIR + $SYSCONFDIR -# or $(INST_PREFIX)/etc if $(INST_PREFIX) is not "/usr" -# PKG_DEF_RULES_DIR * $DEF_RULES_DIR or $(PREFIX)/share/spamassassin -# DEF_RULES_DIR + $(INST_PREFIX)/share/spamassassin -# PKG_LOCAL_RULES_DIR * $LOCAL_RULES_DIR -# or $(SYSCONFDIR)/mail/spamassassin -# LOCAL_RULES_DIR + $(INST_SYSCONFDIR)/mail/spamassassin -# INST_SITELIB + $(INSTALLSITELIB) -# -# RUN_RAZOR2_TESTS (prompt if Razor 2 found) -# CONTACT_ADDRESS (prompt: default="the administrator of that system") -# ENABLE_SSL * 'no' -# -# PERL_BIN * current path to Perl -# PERL_VERSION * current Perl version -# PERL_WARN * 'yes' for CVS builds; else 'no' -# -# * means the variable is used for build time -# + means the variable is used for run time -# -# For example, to install in your home dir: -# -# perl Makefile.PL PREFIX=/home/jm/sausr SYSCONFDIR=/home/jm/saetc -# -# Or to build a package in /tmp/build, but with its internal paths -# referring to /usr and /etc: -# -# perl Makefile.PL PREFIX=/tmp/build/usr SYSCONFDIR=/tmp/build/etc \ -# INST_PREFIX=/usr INST_SYSCONFDIR=/etc -# -# The Razor prompt ("run Razor 2 tests?") can be overridden by setting -# RUN_RAZOR2_TESTS to "y" or "n". -# -# Set ENABLE_SSL to "yes" if you want the ability to use encrypted -# connections between spamc and spamd. -# -########################################################################### - use strict; use Config; use ExtUtils::MakeMaker; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'INST_PREFIX'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'SYSCONFDIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'INST_SYSCONFDIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'DEF_RULES_DIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PKG_DEF_RULES_DIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'LOCAL_RULES_DIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PKG_LOCAL_RULES_DIR'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'INST_SITELIB'} = 1; +foreach my $var (qw( + SYSCONFDIR + DEFRULESDIR + LOCALRULESDIR -$ExtUtils::MakeMaker::Recognized_Att_Keys{'RUN_RAZOR2_TESTS'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'ENABLE_SSL'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'CONTACT_ADDRESS'} = 1; + ENABLE_SSL + CONTACT_ADDRESS + RUN_RAZOR_TESTS RUN_RAZOR2_TESTS -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PERL_BIN'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PERL_WARN'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PERL_TAINT'} = 1; -$ExtUtils::MakeMaker::Recognized_Att_Keys{'PERL_VERSION'} = 1; + PERL_BIN PERL_WARN PERL_TAINT PERL_VERSION +)) { + $ExtUtils::MakeMaker::Recognized_Att_Keys{$var} = 1; +} +foreach my $name (qw( + SYSCONFDIR + SHARED + CONFIG +)) { + foreach my $target (qw( + PERL + SITE + VENDOR + )) { + my $var = sprintf('INSTALL%s%s', + ($target ne 'PERL' or $name eq 'SYSCONFDIR') ? $target : '', + $name, + ); + $ExtUtils::MakeMaker::Recognized_Att_Keys{$var} = 1; + } +} use constant RUNNING_ON_WINDOWS => ($^O =~ /^(?:mswin|dos|os2)/oi); +# what a PITA. we can't get at MakeMaker's parsed args. do it ourselves, +# again.... + +my($enablessl, $contactaddr, $runrazor, $gotdestdir, $diediedie); +foreach (@ARGV) { + /^ENABLE_SSL=(.*)$/ ? $enablessl = $1 : + /^CONTACT_ADDRESS=(.*)$/ ? $contactaddr = $1 : + /^RUN_RAZOR2?_TESTS?=(.*)$/ ? $runrazor = $1 : + /^DESTDIR=/ ? $gotdestdir = 1 : + /^( INST_(PREFIX| + SITELIB| + SYSCONFDIR) + | + (PKG_)?(DEF|LOCAL)_RULES_DIR + )=/x ? $diediedie |= 1 : + /^IGNORE_CRUFT/ ? $diediedie |= -1 : + 0; +} + # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. - my $mm_version = $ExtUtils::MakeMaker::VERSION; # Gather the rules files in the range 00-69; we do this in perl because it's more portable my @rulesfiles = map { s,^rules/,,; $_ } (); -my $rulesfiles = join(' ', (grep { /^[0-6][0-9]_/ } @rulesfiles), qw(user_prefs.template triplets.txt languages)); +my $rulesfiles = join(' ', (grep { /^[0-6][0-9]_/ } @rulesfiles), qw(user_prefs.template triplets.txt languages)); # Only build spamd and spamc on non-Windows platforms my @SPAMD_EXE_FILES = (); @@ -86,6 +71,7 @@ if (!RUNNING_ON_WINDOWS) { @SPAMD_EXE_FILES = ('spamd/spamc$(EXE_EXT)', 'spamd/spamd'); } + my %makefile = ( 'NAME' => 'Mail::SpamAssassin', 'VERSION_FROM' => 'lib/Mail/SpamAssassin.pm', # finds $VERSION @@ -95,7 +81,7 @@ my %makefile = ( @SPAMD_EXE_FILES ], - 'MAN1PODS' => { + 'MAN1PODS' => { 'spamassassin' => '$(INST_MAN1DIR)/spamassassin.$(MAN1EXT)', 'sa-learn' => '$(INST_MAN1DIR)/sa-learn.$(MAN1EXT)', 'spamd/spamc.pod' => '$(INST_MAN1DIR)/spamc.$(MAN1EXT)', @@ -106,7 +92,7 @@ my %makefile = ( 'PMLIBDIRS' => [ 'lib' ], - 'PM_FILTER' => '$(PERL) build/preprocessor -Mconditional $(FIXBYTES) -Mvars -DVERSION="$(VERSION)" -DPREFIX="$(INST_PREFIX)"', + 'PM_FILTER' => '$(PERL) build/preprocessor -Mconditional $(FIXBYTES) -Mvars -DVERSION="$(VERSION)" -DPREFIX="$(I_PREFIX)"', 'macro' => { RULES => $rulesfiles, @@ -148,59 +134,128 @@ my %makefile = ( 'NORECURS' => 1, ); + +# All the $(*MAN1*) stuff is empty/zero if Perl was Configured with -Dman1dir=none +unless($Config{installman1dir}) { + delete $makefile{MAN1PODS}; +} + + +if ($diediedie == 1) { + ($_=<<" OLDCRUFT") =~ s/^ {4}//gm; + + *********************************************************************** + You tried to use one of the variables + INST_PREFIX + INST_SITELIB + INST_SYSCONFDIR + DEF_RULES_DIR + LOCAL_RULES_DIR + Those are not supported anymore. Please read the documents INSTALL and + PACKAGING to find out about the new way of changing these values. + + Thanks and sorry for the inconvenience. + *********************************************************************** + + OLDCRUFT + die $_; +} + +# MakeMaker prior to 6.11 doesn't support DESTDIR which is needed for +# packaging with builddir!=destdir. See bug 2388. +my $mm_has_destdir = $ExtUtils::MakeMaker::Recognized_Att_Keys{DESTDIR}; +my $mm_has_good_destdir = $mm_version >= 6.11; +my $mm_needs_destdir = $gotdestdir && !$mm_has_destdir; + $mm_has_destdir ||= $mm_needs_destdir; +$ExtUtils::MakeMaker::Recognized_Att_Keys{DESTDIR} = $mm_has_destdir; + +if ($mm_needs_destdir) { + ($_=<<" DESTDIRHACK") =~ s/^ {4}//gm; + + *********************************************************************** + You used the variable + DESTDIR + but your installation of ExtUtils::MakeMaker ${mm_version} doesn't support + that directive natively. + + This script includes a kludge to make it work with older versions, too. + If something does not work as expected, please report a bug to + + including your version of ExtUtils::MakeMaker. We might also ask you to + attach the generated Makefile to that bug. + + If you want to be on the safe side, you might want to upgrade your + ExtUtils::MakeMaker to at least version 6.11. It is available via CPAN. + You can use either the CPAN shell or go to + + to get an up-to-date version. + + This is needed only for packaging, the end-users will not need to have + to upgrade to use SpamAssassin. + *********************************************************************** + + DESTDIRHACK + warn $_; +} elsif ($gotdestdir and !$mm_has_good_destdir) { + ($_=<<" DESTDIRBUG") =~ s/^ {4}//gm; + + *********************************************************************** + You used the variable + DESTDIR + but the implementation in your version of ExtUtils::MakeMaker ${mm_version} + is said to be buggy. + + If you want to be on the safe side, you might want to upgrade your + ExtUtils::MakeMaker to at least version 6.11. It is available via CPAN. + You can use either the CPAN shell or go to + + to get an up-to-date version. + + This is needed only for packaging, the end-users will not need to have + to upgrade to use SpamAssassin. + *********************************************************************** + + DESTDIRBUG + warn $_; +} + # MakeMaker prior to 5.46 doesn't support PM_FILTER, so we have to # implement it ourselves. Also bear in mind that MakeMaker (5.45) from # Perl 5.6.1 supports that option while the one from 5.6.0 doesn't; they # do have the same version though! See bug 1652. -my $pm_filter = $mm_version > 5.45 || ($mm_version == 5.45 && $] > 5.006); - -if(!$pm_filter) { -warn < 5.45 + || ($mm_version == 5.45 && $] > 5.006); +if(!$mm_has_pm_filter) { + ($_=<<" ITSALLSOSTUPID") =~ s/^ {4}//gm; -*********************************************************************** -Your version of ExtUtils::MakeMaker does not support PM_FILTER. -We need to include a nasty workaround to make it work with our make -routines. You will get loads of warnings and it is very likely to break -at various places. + *********************************************************************** + Your version of ExtUtils::MakeMaker does not support PM_FILTER. + We need to include a nasty workaround to make it work with our make + routines. You will get loads of warnings and it is very likely to break + at various places. -*Please* consider updating to a version later than 5.45. It's available -on CPAN . + *Please* consider updating to a version later than 5.45. Its available + on CPAN . -Hint: Perl 5.6.1 and later ship good versions of ExtUtils::MakeMaker -by default. + Hint: Perl 5.6.1 and later ship good versions of ExtUtils::MakeMaker + by default. -If anything breaks while building Mail::SpamAssassin, please file a bug -at . -*********************************************************************** + If anything breaks while building Mail::SpamAssassin, please file a bug + at . + *********************************************************************** -ITSALLSOSTUPID + ITSALLSOSTUPID + warn $_; $makefile{SKIP} = [ 'pm_to_blib' ]; $makefile{macro}{PM_FILTER} = $makefile{PM_FILTER}; delete $makefile{PM_FILTER}; } -# All the $(*MAN1*) stuff is empty/zero if Perl was Configured with -Dman1dir=none -unless($Config{installman1dir}) { - delete $makefile{MAN1PODS}; -} - -####################################################################### -# what a PITA. we can't get at MakeMaker's parsed args. do it ourselves, -# again.... - -my $contactaddr; -my $runrazor; - -for my $arg (@ARGV) { - if ($arg =~ /^CONTACT_ADDRESS=(.*)/) { - $contactaddr = $1; - } - elsif ($arg =~ /^RUN_RAZOR2?_TESTS?=(.)/) { - $runrazor = $1; - } -} +$enablessl ||= 'no'; +$_ = ($enablessl =~ /^\s*[Y1]/i) ? 'yes' : 'no'; +$makefile{'macro'}{'ENABLE_SSL'} = $_; if (!defined $contactaddr) { $contactaddr = prompt( @@ -211,6 +266,7 @@ if (!defined $contactaddr) { ); print "\n"; } +$makefile{'macro'}{'CONTACT_ADDRESS'} = $contactaddr; if (!defined $runrazor) { $runrazor = eval { require Razor2::Client::Agent }; @@ -223,18 +279,19 @@ if (!defined $runrazor) { print "\n"; } } -$runrazor = substr($runrazor, 0, 1); -$runrazor =~ tr/y1/0/c; -if ($runrazor) { +$_ = ($runrazor =~ /^\s*[Y1]/i) ? 'yes' : 'no'; +if (/yes/) { open(FLAG, "> t/do_razor2"); close(FLAG); } else { unlink("t/do_razor2"); } +$makefile{'macro'}{'TEST_RUN_RAZOR'} = $_; # Now dump the Makefile WriteMakefile(%makefile); +print "Makefile written by ExtUtils::MakeMaker ${mm_version}\n"; ####################################################################### @@ -249,108 +306,207 @@ sub MY::libscan { sub MY::install { my $self = shift; - my $inherited = $self->SUPER::install (@_); + my @code = split(/\n/, $self->SUPER::install(@_)); - $inherited =~ s/^(install :: .*)$/$1 inst_cfs/gm; - $inherited; -} + foreach (@code) { + s/^(install(?:_[a-z]+)?\s*::?\s*.*)$/$1 config__install shared__install/; -sub MY::postamble { - # import some C-linkage stuff from %Config. We can't seem to - # do this with MakeMaker without it trying to build the perl - # modules as .so's :( + next if !$mm_needs_destdir; + next if /installed into/; # write the correct path to perllocal.pod + + # replace all other $(INSTALL*) vars (except $(INSTALLDIRS of course) with + # their $(DESTINSTALL*) counterparts + s/\Q$(\E(INSTALL[^D][^I][^R][^S][A-Z]+)\Q)\E/\$(DEST$1)/g; + } + + return join("\n", @code); +} +sub MY::constants { my $self = shift; + my @code = split(/\n/, $self->SUPER::constants(@_)); - my $prefix = $self->{PREFIX} - || ''; - my $instprefix = $self->{INST_PREFIX} - || $prefix; + foreach (@code) { + # add the (PERL|SITE|VENDOR)PREFIX macros if necessary (in old EU::MMs) + if (/^(PREFIX)(\s*=\s*)/) { + foreach my $target (qw(PERL SITE VENDOR)) { + my $prefix = "${target}PREFIX"; + if (!defined($self->{$prefix})) { + $self->{$prefix} = q{$(PREFIX)}; + $_ .= qq{\n$prefix$2$self->{$prefix}}; + } + } + } - my $is_sys_build = ($prefix =~ m{^(/usr/?)?$}); - my $is_sys_inst = ($instprefix =~ m{^(/usr/?)?$}); + # add DESTDIR support if necessary + if ($mm_needs_destdir) { + $_ .= + # add $(DESTDIR) below $(INSTALLDIRS) + /^(INSTALLDIRS)(\s*=\s*)/ ? qq{\nDESTDIR$2$self->{DESTDIR}} : + # add $(DESTINSTALL*) macros for all $(INSTALL*) ones; cf. MY::install + /^(INSTALL[A-Z]+)(\s*=\s*)/ ? qq{\nDEST$1$2\$(DESTDIR)\$($1)} : + # don't do anything for not $(INSTALL*) macros + qq{}; + } + } - my $sysconfdir = $self->{SYSCONFDIR} - || ''; - my $instsysconfdir = $self->{INST_SYSCONFDIR} - || $sysconfdir - || ($is_sys_inst ? '' : '$(INST_PREFIX)') . '/etc'; - $sysconfdir ||= ($is_sys_build ? '' : '$(PREFIX)') . '/etc'; + # add some additional target dirs + { + $self->{SYSCONFDIR} ||= ''; + push(@code, qq{}); + push(@code, qq{SYSCONFDIR = $self->{SYSCONFDIR}}); - my $pkgdefrulesdir = $self->{PKG_DEF_RULES_DIR} - || $self->{DEF_RULES_DIR} - || '$(PREFIX)/share/spamassassin'; - my $defrulesdir = $self->{DEF_RULES_DIR} - || '$(INST_PREFIX)/share/spamassassin'; - my $pkglocalrulesdir = $self->{PKG_LOCAL_RULES_DIR} - || $self->{LOCAL_RULES_DIR} - || '$(SYSCONFDIR)/mail/spamassassin'; - my $localrulesdir = $self->{LOCAL_RULES_DIR} - || '$(INST_SYSCONFDIR)/mail/spamassassin'; - my $instsitelib = $self->{INST_SITELIB} - || '$(INSTALLSITELIB)'; + foreach (qw(PERL SITE VENDOR)) { + my($target, $prefix); + $target = $_; + $prefix = $self->{"${target}PREFIX"}; + $prefix =~ s/\Q$(\E([^)]+)\Q)\E/$self->{$1} || ''/ge; # expand vars - my $enablessl = $self->{ENABLE_SSL} - || 'no'; + $self->{"${target}SYSCONFDIR"} = + $self->{"${target}SYSCONFDIR"} + || ($self->{SYSCONFDIR} ? '$(SYSCONFDIR)' : '') + || ( ($prefix =~ m{^$}) ? '' : + ($prefix =~ m{^/usr(/local)?/?$}) ? '/etc' : + ($prefix =~ m{^/opt(/|$)}) ? '/etc/opt' : + sprintf('$(%sPREFIX)/etc', + $target + ) + ); - my $perl_bin = $self->{PERL_BIN} - || 'this'; - my $perl_warn = $self->{PERL_WARN} - || 'auto'; - my $perl_taint = $self->{PERL_TAINT} - || 'auto'; - my $perl_version = $self->{PERL_VERSION} - || 'this'; + $target = '' if $target eq 'PERL'; + $self->{"INSTALL${target}SHARED"} = + $self->{"INSTALL${target}SHARED"} + || $self->{DEFRULESDIR} + || sprintf('$(%sPREFIX)/share/spamassassin', + $target || 'PERL' + ); + $self->{"INSTALL${target}CONFIG"} = + $self->{"INSTALL${target}CONFIG"} + || $self->{LOCALRULESDIR} + || sprintf('$(%sSYSCONFDIR)/mail/spamassassin', + $target || 'PERL' + ); + foreach (qw(SYSCONFDIR SHARED CONFIG)) { + my $v = sprintf('%s%s%s', + $_ ne 'SYSCONFDIR' ? 'INSTALL' : '', + $target || ($_ eq 'SYSCONFDIR' ? 'PERL' : ''), + $_ + ); + push(@code, qq{$v = $self->{$v}}); + push(@code, qq{DEST$v = \$(DESTDIR)\$($v)}) if $v =~ /^INSTALL/ and $mm_has_destdir; + } + } + } - my $gotpods = keys(%{$self->{MAN1PODS}}) - || keys(%{$self->{MAN3PODS}}) - || keys(%{$self->{EXTRAPODS}}) - || 0; + # set the PERL_* stuff + { + push(@code, qq{}); + my($perl_bin, $perl_ver); + $self->{PERL_BIN} ||= '$(FULLPERL)'; + $perl_bin = $self->{PERL_BIN}; + $perl_bin =~ s/\Q$(\E([^)]+)\Q)\E/$self->{$1} || ''/ge; # expand vars -qq( -#PREFIX = $prefix # just for reference -INST_PREFIX = $instprefix -SYSCONFDIR = $sysconfdir -INST_SYSCONFDIR = $instsysconfdir -PKG_DEF_RULES_DIR = $pkgdefrulesdir -DEF_RULES_DIR = $defrulesdir -PKG_LOCAL_RULES_DIR = $pkglocalrulesdir -LOCAL_RULES_DIR = $localrulesdir -INST_SITELIB = $instsitelib -ENABLE_SSL = $enablessl -CONTACT_ADDRESS = $contactaddr + $perl_ver = $self->{PERL_VERSION}; + unless ($perl_ver) { + if (-x $perl_bin) { + $perl_ver = qx{$perl_bin -V:version}; + $perl_ver =~ s/^version='([0-9.]+).*$/$1/s; + } + $perl_ver = $] unless $perl_ver; + if ($perl_ver =~ /^\d\.\d+$/) { + $perl_ver = sprintf("%1.6f", $perl_ver); + $perl_ver =~ s/[.0]+([1-9]+)/.$1/g; + } + $self->{PERL_VERSION} = $perl_ver; + } + $self->{PERL_WARN} ||= ''; + $self->{PERL_TAINT} ||= ''; + foreach (qw(BIN VERSION WARN TAINT)) { + my $v = sprintf('PERL_%s', + $_ + ); + push(@code, qq{$v = $self->{$v}}); + } + } -PERL_BIN = $perl_bin -PERL_WARN = $perl_warn -PERL_TAINT = $perl_taint -PERL_VERSION = $perl_version + return join("\n", @code); +} -) . q# +sub MY::postamble { + # import some C-linkage stuff from %Config. We can't seem to + # do this with MakeMaker without it trying to build the perl + # modules as .so's :( + + my $self = shift; + my $code = ''; + + my($target); + $target = $self->{INSTALLDIRS} + || 'site'; + $target = uc($target); + + foreach (qw(PREFIX SYSCONFDIR)) { + $code .= sprintf('I_%s = $(%s%s)', + $_, + $target, + $_, + ) . "\n"; + } + + $target = '' if $target eq 'PERL'; + foreach (qw(SHARED CONFIG LIB)) { + $code .= sprintf('I_%s = $(%s%s%s)', + $_, + 'INSTALL', + $target, + $_, + ) . "\n"; + $code .= sprintf('B_%s = $(%s%s%s)', + $_, + $mm_has_destdir ? 'DESTINSTALL' : 'I_', + $mm_has_destdir ? $target : '', + $_, + ) . "\n"; + } + + my $gotpods = keys(%{$self->{MAN1PODS}}) + || keys(%{$self->{MAN3PODS}}) + || keys(%{$self->{EXTRAPODS}}) + || 0; + + $code .= <<' EOD'; FIXVARS = -Mvars \ -DVERSION="$(VERSION)" \ - -DPREFIX="$(INST_PREFIX)" \ - -DDEF_RULES_DIR="$(DEF_RULES_DIR)" \ - -DLOCAL_RULES_DIR="$(LOCAL_RULES_DIR)" \ - -DINSTALLSITELIB="$(INST_SITELIB)" \ + -DPREFIX="$(I_PREFIX)" \ + -DDEF_RULES_DIR="$(I_SHARED)" \ + -DLOCAL_RULES_DIR="$(I_CONFIG)" \ + -DINSTALLSITELIB="$(I_LIB)" \ -DCONTACT_ADDRESS="$(CONTACT_ADDRESS)" FIXBYTES = -Mbytes \ -DPERL_VERSION="$(PERL_VERSION)" - + FIXBANG = -Msharpbang \ -DPERL_BIN="$(PERL_BIN)" \ -DPERL_WARN="$(PERL_WARN)" -SPAMC_SOURCES = spamd/spamc.c qmail/qmail-spamc.c spamd/libspamc.c spamd/utils.c +SPAMC_SOURCES = spamd/spamc.c spamd/libspamc.c spamd/utils.c qmail/qmail-spamc.c -# . (!$pm_filter ? q# + EOD + + if (!$mm_has_pm_filter) { + $code .= <<' EOD'; pm_to_blib: $(TO_INST_PM) @ $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \ "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -Ibuild \ -MExtUtils::Install -Mpreprocessor \ - -e "ExtUtils::Install::Post545::pm_to_blib({qw{$(PM_TO_BLIB)}}, '$(INST_LIB)/auto', '$(PM_FILTER)')"# : '') . q# + -e "ExtUtils::Install::Post545::pm_to_blib({qw{$(PM_TO_BLIB)}}, '$(INST_LIB)/auto', '$(PM_FILTER)')" + EOD + } + + $code .= <<' EOD'; spamassassin: spamassassin.raw $(PERL) build/preprocessor $(FIXBYTES) $(FIXVARS) $(FIXBANG) -i$? -o$@ @@ -385,13 +541,15 @@ qmail/qmail-spamc: spamd/binaries.mk $(S spamd/binaries.mk: spamd/configure cd spamd; ./configure --enable-ssl=$(ENABLE_SSL) -inst_cfs: - -$(MKPATH) $(PKG_LOCAL_RULES_DIR) - $(PERL) -e "use File::Copy; (-f '$(PKG_LOCAL_RULES_DIR)/local.cf') or copy ('rules/local.cf', '$(PKG_LOCAL_RULES_DIR)/local.cf');" - $(MKPATH) $(PKG_DEF_RULES_DIR) - $(RM_RF) $(PKG_DEF_RULES_DIR)/* - $(PERL) build/preprocessor $(FIXVARS) -m$(PERM_RW) -Irules -O$(PKG_DEF_RULES_DIR) $(RULES) - $(CHMOD) $(PERM_RWX) $(PKG_DEF_RULES_DIR) +config__install: + -$(MKPATH) $(B_CONFIG) + $(PERL) -e "use File::Copy; (-f '$(B_CONFIG)/local.cf') or copy ('rules/local.cf', '$(B_CONFIG)/local.cf');" + +shared__install: + $(MKPATH) $(B_SHARED) + $(RM_RF) $(B_SHARED)/* + $(PERL) build/preprocessor $(FIXVARS) -m$(PERM_RW) -Irules -O$(B_SHARED) $(RULES) + $(CHMOD) $(PERM_RWX) $(B_SHARED) text_html_doc: made-doc-stamp $(NOOP) @@ -399,12 +557,11 @@ text_html_doc: made-doc-stamp doc: $(MKPATH) $@ -made-doc-stamp: doc#. ($gotpods ? q# $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS) +made-doc-stamp: doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS) $(PERL) build/convert_pods_to_doc $(MAN1PODS) $(MAN3PODS) $(EXTRAPODS) - # : '') . q# $(TOUCH) made-doc-stamp $(RM_F) pod2htm* + EOD -#; - + return $code; }