Return-Path: Received: from fk-out-0910.google.com ([209.85.128.187] verified) by mx.softsearch.ru (CommuniGate Pro SMTP 5.1.14) with ESMTP id 86164448 for talk@openhack.ru; Wed, 02 Apr 2008 08:08:57 +0400 Received: by fk-out-0910.google.com with SMTP id 26so3335205fkx.10 for ; Tue, 01 Apr 2008 21:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=1ENB7KO3b93nIac8Qt7eRpoSpVmEyQNhks+shkck+Rs=; b=fEJ1siAA0Udg14L+LsGglX9zb8T1CLQevdEU2VBuFF9/iP7HWi9a4a+hEO9VGpWa7DdIk4O2JHh8j1Jn+rWdJcXdGGTAGBd1XgqFF+mUjkMBq7Os//cQtftnJ+7aIY1eeD2Qj5ueCBdEMKFybRqKMnqyq4BgqeYCsgZFePGY4mQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=atD8VG2iuNG0apT7S9oqYkkCH72oFe3Bc4JoN39vr5PTpfxmisS4jMMWdfXNUmuLhVGoIUaHyiSH6O8Mv4vU1DbrP9dECDFWMzupmhiWrdnR9vJ6nd9gUZUIAaLKaPkct0YaKbYBPw6jpF4SGE4xm3g93v+8ibfDdVBUMD8XQdw= Received: by 10.78.147.6 with SMTP id u6mr28196467hud.39.1207109332317; Tue, 01 Apr 2008 21:08:52 -0700 (PDT) Received: by 10.78.31.20 with HTTP; Tue, 1 Apr 2008 21:08:52 -0700 (PDT) Message-ID: Date: Wed, 2 Apr 2008 08:08:52 +0400 From: "Vladimir Timofeev" To: talk@openhack.ru Subject: patch to makefiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, this patch solves two small problems: 1. optionify optimization flags so by default they sets same as perl itself. This, for example, allow freebsd's ports compile module with default system settings. For old flags: perl Makefile.PL OPTIMIZE='-g -O3' 2. resolve first item in TODO (it not installed libclient.a at all), files after install (on freebsd): > make install DESTDIR=~/tmp/ttt Files found in blib/arch: installing files in blib/lib into architecture dependent library tree Installing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/auto/Cache/Memcached/Fast/Fast.so Installing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/auto/Cache/Memcached/Fast/Fast.bs Installing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/auto/Cache/Memcached/Fast/libclient/extralibs.ld Installing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/Cache/Memcached/Fast.pm Installing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/share/man/man3/Cache::Memcached::Fast.3 Writing /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/auto/Cache/Memcached/Fast/.packlist Appending installation info to /spool/home/vovkasm/tmp/ttt/spool/home/vovkasm/perl5.10/lib/perl5/perllocal.pod Patch valid for fresh version from git. Regards ;-) -- Vladimir Timofeev Patch itself (because this maillist can't restrict mails to don't contain attachments): ====> cut <==== diff --git a/Makefile.PL b/Makefile.PL index e34f675..87e90fc 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,12 +14,11 @@ WriteMakefile( ABSTRACT_FROM => 'lib/Cache/Memcached/Fast.pm', AUTHOR => 'Tomash Brechko ', MYEXTLIB => 'src/libclient$(LIB_EXT)', - OPTIMIZE => '-g -O3', ); sub MY::postamble { ' $(MYEXTLIB): src/Makefile - cd src && $(MAKE) $(PASSTHRU) -' + cd src && $(MAKE) all $(PASTHRU) +'; } diff --git a/src/Makefile.PL b/src/Makefile.PL index bd55155..5821105 100644 --- a/src/Makefile.PL +++ b/src/Makefile.PL @@ -3,31 +3,38 @@ use strict; use warnings; use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. WriteMakefile( - NAME => 'Cache::Memcached::Fast::libclient', - VERSION_FROM => '../lib/Cache/Memcached/Fast.pm', - AUTHOR => 'Tomash Brechko ', - LIBS => [''], # e.g., '-lm' - DEFINE => '', # e.g., '-DHAVE_SOMETHING' - INC => '-I.', # e.g., '-I. -I/usr/include/other' - OBJECT => 'parse_keyword$(OBJ_EXT) compute_crc32$(OBJ_EXT) - $(O_FILES)', - OPTIMIZE => '-g -O3', + NAME => 'Cache::Memcached::Fast::libclient', + DEFINE => '', + INC => '', + OBJECT => 'parse_keyword$(OBJ_EXT) compute_crc32$(OBJ_EXT) $(O_FILES)', + H => [qw(array.h client.h connect.h dispatch_key.h compute_crc32.h parse_keyword.h)], + C => [qw(array.c client.c connect.c dispatch_key.c compute_crc32.c parse_keyword.c)], + SKIP => [qw(dynamic dynamic_lib dlsyms)], + PM => {}, + clean => {FILES => 'compute_crc32.c compute_crc32.h parse_keyword.c parse_keyword.h'}, ); +sub MY::constants { + package MY; + my $self = shift; + $self->{INST_STATIC} = 'libclient$(LIB_EXT)'; + return $self->SUPER::constants(); +} + sub MY::top_targets { ' all :: static + $(NOECHO) $(NOOP) -pure_all :: static +pure_all :: + $(NOECHO) $(NOOP) -static :: libclient$(LIB_EXT) +config :: + $(NOECHO) $(NOOP) -libclient$(LIB_EXT): $(OBJECT) - $(AR) cr libclient$(LIB_EXT) $(OBJECT) - $(RANLIB) libclient$(LIB_EXT) +src/libclient.a: + $(NOECHO) $(NOOP) parse_keyword.c parse_keyword.h :: genparser.pl reply.kw $(PERL) genparser.pl reply.kw parse_keyword.c parse_keyword.h ====> cut <====