On 01/26/2011 09:33 AM, Bruno Haible wrote: > I agree with Eli that a bit of hand-written renaming in the script > is feasible and maintainable.
A bit is, yes. However, we should strive to put the burden of renaming-for-DOS into the DOS-related source files, and so this bit shouldn't be precedent for much more renaming. On the contrary, I'd like to remove this bit once a more-general solution can be found. > if test -f m4/gl-cache.m4; then mv m4/gl-cache.m4 m4/gnulib-cache.m4; done > if test -f m4/gl-comp.m4; then mv m4/gl-comp.m4 m4/gnulib-comp.m4; done > gnulib-tool ...<many options> > mv m4/gnulib-cache.m4 m4/gl-cache.m4 > mv m4/gnulib-comp.m4 m4/gl-comp.m4 Thanks for the suggestion. We can simplify that part further as shown in the patch below (which I just put into the Emacs trunk). There's no need to keep gnulib-cache.m4, since gnulib-tool is invoked only from Makefile.in. However, some extra stuff is needed as well, as we need to modify ACLOCAL_INPUTS to reflect the MS-DOS-oriented name for the renamed file. === modified file 'ChangeLog' --- ChangeLog 2011-01-26 08:36:39 +0000 +++ ChangeLog 2011-01-27 07:26:48 +0000 @@ -1,3 +1,18 @@ +2011-01-27 Paul Eggert <egg...@cs.ucla.edu> + + fix two m4/gnulib-*.m4 file names that clashed under MS-DOS + * Makefile.in (DOS-gnulib-comp.m4): New macro. + (sync-from-gnulib): Rename m4/gnulib-comp.m4 to m4/gl-comp.m4 to avoid + problems with MS-DOS 8+3 file name restrictions. + Remove m4/gnulib-cache.m4, as we can live without it. If we kept + it, it would also cause problems when extracting Emacs distribution + tarballs on MS-DOS hosts. + (ACLOCAL_INPUTS): Adjust to file renaming. + * aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate. + * config.guess, config.sub: Sync from gnulib. + * m4/gnulib-cache.m4: Remove from repository. + * m4/gl-comp.m4: Rename from m4/gnulib-comp.m4. + 2011-01-25 Glenn Morris <r...@gnu.org> * README: Add a note about ranges in copyright years. === modified file 'Makefile.in' --- Makefile.in 2011-01-26 08:36:39 +0000 +++ Makefile.in 2011-01-27 07:26:48 +0000 @@ -324,6 +324,9 @@ $(gnulib_srcdir): git clone git://git.savannah.gnu.org/gnulib.git $@ +# A shorter name that satisfies MS-DOS 8+3 constraints. +DOS-gnulib-comp.m4 = gl-comp.m4 + # Update modules from gnulib, for maintainers, who should have it in # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools # as per $(gnulib_srcdir)/DEPENDENCIES. @@ -333,7 +336,8 @@ sync-from-gnulib: $(gnulib_srcdir) cd $(srcdir) && \ $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES) - rm $(srcdir)/m4/warn-on-use.m4 + cd $(srcdir)/m4 && rm gnulib-cache.m4 warn-on-use.m4 + cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS-gnulib-comp.m4) cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc cp \ $(gnulib_srcdir)/build-aux/config.sub \ @@ -406,7 +410,7 @@ $(srcdir)/configure: $(AUTOCONF_INPUTS) cd ${srcdir} && autoconf -ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/gnulib-comp.m4 +ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/$(DOS-gnulib-comp.m4) $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS) cd $(srcdir) && aclocal -I m4 [The remaining part of the patch is automatically generated.]