Subject: | Syntax error in src/Makefile |
The latest CPAN version 0.10 introduced a makefile syntax error in its
src/Makefile:
<output>
CPAN.pm: Going to build K/KR/KROKI/Cache-Memcached-Fast-0.10.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Cache::Memcached::Fast::libclient
Writing Makefile for Cache::Memcached::Fast
cp lib/Cache/Memcached/Fast.pm blib/lib/Cache/Memcached/Fast.pm
cd src && /usr/bin/make LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic"
PREFIX="" OPTIMIZE="-O2" PASTHRU_DEFINE="" PASTHRU_INC=""
make[1]: Entering directory
`/home/zhaoyi/.cpan/build/Cache-Memcached-Fast-0.10/src'
Makefile:468: *** missing separator (did you mean TAB instead of 8
spaces?). Stop.
make[1]: Leaving directory
`/home/zhaoyi/.cpan/build/Cache-Memcached-Fast-0.10/src'
make: *** [src/libclient.a] Error 2
/usr/bin/make -- NOT OK
</output>
It should be mentioned that GNU make 3.81 is smart enough to accept it
while the old 3.80 does not. Sadly it's too hard for us to upgrade all
the make 3.80 on our hundreds of production machines.
So here is the patch (essentially just remove the newline character on
line 464 or so):
--- Makefile 2008-07-10 18:00:57.000000000 +0800
+++ Makefile.new 2008-07-10 18:00:18.000000000 +0800
@@ -464,8 +464,7 @@
# the Makefile here so a later make realclean still has a
makefile to use.
clean :: clean_subdirs
- -$(RM_RF) compute_crc32.c compute_crc32.h
- parse_keyword.c
parse_keyword.h ./blib $(MAKE_APERL_FILE)
$(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld
perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT)
*$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso
$(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core
core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9]
core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9][0-9]
+ -$(RM_RF) compute_crc32.c compute_crc32.h
parse_keyword.c parse_keyword.h ./blib $(MAKE_APERL_FILE)
$(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld
perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT)
*$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso
$(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core
core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9]
core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9][0-9]
-$(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)