diff --git a/ChangeLog b/ChangeLog index 72e2053690..751483991c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Dec 17 17:17:49 2007 Nobuyoshi Nakada + + * configure.in (EXTERNAL_ENCOBJS, ENCSOS): removed. + + * enc/Makefile.in (BUILTIN_ENCS): includes .c suffix. + + * enc/depend: splitted from Makefile.in. + + * {bcc32,win32,wince}/setup.mak (-encs-): extracts BUILTIN_ENCOBJS. + Mon Dec 17 17:07:53 2007 Tanaka Akira * string.c (rb_enc_str_asciionly_p): use rb_enc_str_coderange. diff --git a/bcc32/setup.mak b/bcc32/setup.mak index 483292ed51..28eb39e4ab 100644 --- a/bcc32/setup.mak +++ b/bcc32/setup.mak @@ -147,6 +147,11 @@ $(BANG)endif @$(APPEND) PROCESSOR_LEVEL = 6 @$(APPEND) !endif +-epilogue-: -encs- + +-encs-: nul + @$(MAKE) -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE) + -epilogue-: nul @type >> $(MAKEFILE) &&| diff --git a/configure.in b/configure.in index c352118fd7..7f2cb64a32 100644 --- a/configure.in +++ b/configure.in @@ -1735,39 +1735,17 @@ else fi tr -d '\015' < largefile.h > confdefs.h -test -d enc || mkdir enc BUILTIN_ENCS=["`sed -n -e '/^BUILTIN_ENCS[ ]*=/{' \ -e s/// -e :l -e '/\\\\$/N' -e 's/\\\\\\n/ /' -e 't l' -e p \ -e '}' "${srcdir}/enc/Makefile.in"`"] BUILTIN_ENCS="`echo $BUILTIN_ENCS`" -EXTERNAL_ENCS= -for e in "${srcdir}/enc"/*.c; do - e=`basename "$e" .c` - case " $BUILTIN_ENCS " in - *" $e "*) ;; - *) EXTERNAL_ENCS="$EXTERNAL_ENCS $e";; - esac -done -echo $EX BUILTIN_ENCOBJS= -for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS $e"'.$(OBJEXT)'; done -EXTERNAL_ENCOBJS= -for e in $EXTERNAL_ENCS; do EXTERNAL_ENCOBJS="$EXTERNAL_ENCOBJS $e"'.$(OBJEXT)'; done -ENCSOS= -for e in $EXTERNAL_ENCS; do ENCSOS="$ENCSOS "'$(ENCSODIR)/'"$e"'.$(DLEXT)'; done +for e in $BUILTIN_ENCS; do BUILTIN_ENCOBJS="$BUILTIN_ENCOBJS `basename $e .c`"'.$(OBJEXT)'; done +AC_SUBST(BUILTIN_ENCS) AC_SUBST(BUILTIN_ENCOBJS) -AC_SUBST(EXTERNAL_ENCOBJS) -AC_SUBST(ENCSOS) AC_CONFIG_FILES($FIRSTMAKEFILE) -AC_CONFIG_FILES(enc/Makefile, [{ - for e in $ENCS; do - echo '' - echo '$(ENCSODIR)/'"$e"'.$(DLEXT): '"$e"'.$(OBJEXT)' - echo ' $(LDSHARED) $(DLDFLAGS) $< $(OUTFLAG)$''@' - done >> enc/Makefile -}], [ENCS="$EXTERNAL_ENCS"]) AC_CONFIG_FILES(Makefile, [{ sed '/^MISSING/s/\$U\././g' Makefile echo; test x"$EXEEXT" = x || echo 'miniruby: miniruby$(EXEEXT)' diff --git a/enc/Makefile.in b/enc/Makefile.in index 86ed944262..9f9473adde 100644 --- a/enc/Makefile.in +++ b/enc/Makefile.in @@ -1,7 +1,7 @@ srcdir = @srcdir@ top_srcdir = $(srcdir:/enc=) arch = @arch@ -EXTOUT = $(top_srcdir)/@EXTOUT@ +EXTOUT = @EXTOUT@ hdrdir = $(top_srcdir)/include arch_hdrdir = $(EXTOUT)/include/$(arch) VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(top_srcdir):$(srcdir) @@ -9,9 +9,9 @@ ENCSODIR = $(EXTOUT)/$(arch)/enc DLEXT = @DLEXT@ OBJEXT = @OBJEXT@ -BUILTIN_ENCS = ascii \ - euc_jp sjis \ - unicode utf8 +BUILTIN_ENCS = ascii.c \ + euc_jp.c sjis.c \ + unicode.c utf8.c ENCOBJS = @EXTERNAL_ENCOBJS@ ENCSOS = @ENCSOS@ @@ -26,8 +26,3 @@ XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS) LIBS = @LIBS@ $(EXTLIBS) LDSHARED = @LDSHARED@ DLDFLAGS = @DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@ - -all: $(ENCOBJS) $(ENCSOS) - -.c.@OBJEXT@: - $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c $< diff --git a/win32/setup.mak b/win32/setup.mak index f27423b6b4..abf3aaeb8e 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -197,6 +197,11 @@ $(CPU) = $(PROCESSOR_LEVEL) -i686-: -ix86- @$(APPEND) $(CPU) = 6 +-epilogue-: -encs- + +-encs-: nul + @$(MAKE) -l -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE) + -epilogue-: nul !if exist(confargs.c) @$(CPP) confargs.c >> $(MAKEFILE) diff --git a/wince/setup.mak b/wince/setup.mak index 8521b0e72f..ca4a42b145 100644 --- a/wince/setup.mak +++ b/wince/setup.mak @@ -219,6 +219,11 @@ INCLUDE = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/include/$$(ARCHFOLDER) LIB = $$(CE_TOOLS4_DIR)/wce410/sigmarionIII SDK/lib/$$(ARCHFOLDER) << +-epilogue-: -encs- + +-encs-: nul + @$(MAKE) -l -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE) + -epilogue-: nul @type << >>$(MAKEFILE) !ifdef RUBY_INSTALL_NAME