From 9d9d12cdf35151946d2429845a72149c5a7309e4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 17:57:35 +0200 Subject: [PATCH 1/8] Initial version of fix for the MS-DOS build, not yet tested. config.bat: Configure in `lib'. msdos/sedlibmk.inp: New file. msdos/sedlibcf.inp: New file. msdos/sed1v2.inp (NS_OBJC_OBJ): Edit to empty. (@true): Edit to "@rem". (move-if-change): Edit to "update". (echo): Edit to "djecho". (cd $(lib) && ...): Edit to "$(MAKE) -C ...". msdos/mainmake.v2 (version): Remove, no longer needed (config.in defines VERSION). (all): Add lib. (lib): New target and recipe. (lib-src): Depend on lib. (src): Depend on lib and lib-src. (clean, mostlyclean, distclean, maintainer-clean, extraclean) (bootstrap-clean): Recurse into lib. msdos/sed2v2.inp: Remove workaround for the "#if ! HAVE_MKTIME || BROKEN_MKTIME" stuff -- it's no longer in src/config.in. (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV) (HAVE__BOOL): Edit to 1. (VERSION, inline, restrict): Edit for DJGPP. src/s/msdos.h (strtold): Define to _strtold. admin/admin.el (set-version): Add msdos/sed2v2.inp. --- ChangeLog | 4 ++++ admin/ChangeLog | 4 ++++ admin/admin.el | 4 ++++ config.bat | 19 ++++++++++++++++++- msdos/ChangeLog | 27 +++++++++++++++++++++++++++ msdos/mainmake.v2 | 26 ++++++++++++++++++++------ msdos/sed1v2.inp | 6 ++++++ msdos/sed2v2.inp | 16 +++++++--------- src/ChangeLog | 4 ++++ src/s/msdos.h | 9 +++++++++ 10 files changed, 103 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index c574311d45c..701150d0cab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-02-19 Eli Zaretskii + + * config.bat: Configure in `lib'. + 2011-02-18 Paul Eggert Import IRIX 6.5 getloadavg fixes from gnulib. diff --git a/admin/ChangeLog b/admin/ChangeLog index 64d6de69d10..87ba151dc34 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2011-02-19 Eli Zaretskii + + * admin.el (set-version): Add msdos/sed2v2.inp. + 2011-02-16 Paul Eggert Remove no-longer needed getloadavg symbols. diff --git a/admin/admin.el b/admin/admin.el index 9f87e9b2590..717bfee702d 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -77,6 +77,10 @@ Root must be the root of an Emacs source tree." (rx (and bol "#" (0+ blank) "define" (1+ blank) "VERSION" (1+ blank) (submatch (1+ (in "0-9.")))))) + (set-version-in-file root "msdos/sed2v2.inp" version + (rx (and bol "/^#undef " (1+ not-newline) + "define VERSION" (1+ space) + (submatch (1+ (in "0-9.")))))) (set-version-in-file root "nt/makefile.w32-in" version (rx (and "VERSION" (0+ space) "=" (0+ space) (submatch (1+ (in "0-9.")))))) diff --git a/config.bat b/config.bat index f87bcd13a5d..730a33770e9 100644 --- a/config.bat +++ b/config.bat @@ -2,7 +2,8 @@ rem ---------------------------------------------------------------------- rem Configuration script for MSDOS rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 -rem 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +rem 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +rem Inc. rem This file is part of GNU Emacs. @@ -273,6 +274,22 @@ Rem supports long file names but DJGPP does not for %%d in (emacs lispref lispintro lispintr misc) do sed -f ../msdos/sed6.inp < %%d\Makefile.in > %%d\Makefile cd .. rem ---------------------------------------------------------------------- +Echo Configuring the lib directory... +If Exist c++defs.h update c++defs.h cxxdefs.h +cd lib +Rem Rename files like djtar on plain DOS filesystem would. +If Exist c++defs.h update c++defs.h cxxdefs.h +If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stddef.in.h update stddef.in.h stddef.in-h +If Exist stdbool.in.h update stdbool.in.h stdbool.in-h +If Exist stdlib.in.h update stdlib.in.h stdlib.in-h +If Exist time.in.h update time.in.h time.in-h +If Exist unistd.in.h update unistd.in.h unistd.in-h +sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp +sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile +rm -f makefile.tmp +cd .. +rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... cd lisp If Exist gnus\.dir-locals.el update gnus/.dir-locals.el gnus/_dir-locals.el diff --git a/msdos/ChangeLog b/msdos/ChangeLog index b9b829c4554..9a98352ff23 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,30 @@ +2011-02-19 Eli Zaretskii + + * sedlibmk.inp: New file. + + * sedlibcf.inp: New file. + + * sed1v2.inp (NS_OBJC_OBJ): Edit to empty. + (@true): Edit to "@rem". + (move-if-change): Edit to "update". + (echo): Edit to "djecho". + (cd $(lib) && ...): Edit to "$(MAKE) -C ...". + + * mainmake.v2 (version): Remove, no longer needed (config.in + defines VERSION). + (all): Add lib. + (lib): New target and recipe. + (lib-src): Depend on lib. + (src): Depend on lib and lib-src. + (clean, mostlyclean, distclean, maintainer-clean, extraclean) + (bootstrap-clean): Recurse into lib. + + * sed2v2.inp: Remove workaround for the "#if ! HAVE_MKTIME || + BROKEN_MKTIME" stuff -- it's no longer in src/config.in. + (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV) + (HAVE__BOOL): Edit to 1. + (VERSION, inline, restrict): Edit for DJGPP. + 2011-01-08 Glenn Morris * sedleim.inp (RUN-EMACS): -batch implies --no-init-file. diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2 index 2e389b15bc9..0e77a68940a 100644 --- a/msdos/mainmake.v2 +++ b/msdos/mainmake.v2 @@ -63,9 +63,6 @@ MAKESHELL=/xyzzy/command # Generate a full pathname of the top-level installation directory top_srcdir := $(subst \,/,$(shell cd)) -# Find out which version of Emacs this is. -version := ${shell sed -n -e '/^static const char emacs_version/s/^[^"]*\("[^"]*"\).*/\1/p' src/emacs.c} - # Q: Do we need to bootstrap? # A: Only if we find admin/admin.el, i.e. we are building out of # a VCS-checkout (not a release) and src/b-emacs.exe does not exist. @@ -82,9 +79,14 @@ endif # compiled lisp files are part of the distribution. (If we are # bootstrapping, the src target will run Make in `lisp' as well.) # leim is not included because it is part of the src target. -all: lib-src src emacs misc lispref lispintro +all: lib lib-src src emacs misc lispref lispintro -lib-src: FRC +lib: FRC + cd lib + $(MAKE) top_srcdir=${top_srcdir} version=${version} + cd .. + +lib-src: lib FRC cd lib-src $(MAKE) top_srcdir=${top_srcdir} version=${version} cd .. @@ -98,7 +100,7 @@ lib-src: FRC # file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling # all preloaded elisp files, and only then dump the actual src/emacs, which # is not wrong, but is overkill in 99.99% of the cases. -src: FRC +src: lib lib-src FRC cd src $(MAKE) top_srcdir=${top_srcdir} BOOTSTRAPEMACS="${boot}" djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ @@ -168,6 +170,9 @@ check: @echo "We don't have any tests for GNU Emacs yet." clean mostlyclean: + cd lib + $(MAKE) $(MFLAGS) $@ + cd .. cd lib-src $(MAKE) $(MFLAGS) $@ cd .. @@ -199,6 +204,9 @@ distclean maintainer-clean: FRC $(MAKE) $(MFLAGS) $@ if exist bootlisp rm -f bootlisp cd .. + cd lib + $(MAKE) $(MFLAGS) $@ + cd .. cd lib-src $(MAKE) $(MFLAGS) $@ cd .. @@ -228,6 +236,9 @@ extraclean: cd src $(MAKE) $(MFLAGS) $@ cd .. + cd lib + $(MAKE) $(MFLAGS) $@ + cd .. cd lib-src $(MAKE) $(MFLAGS) $@ cd .. @@ -257,6 +268,9 @@ extraclean: .PHONY: bootstrap bootstrap-clean: FRC + cd lib + $(MAKE) $(MFLAGS) $@ + cd .. cd src $(MAKE) $(MFLAGS) $@ cd .. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 1cfd4f803c2..49e45b5e0d8 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -98,6 +98,7 @@ s/\.h\.in/.h-in/ /^ns_appbindir *=/s/@ns_appbindir@// /^ns_appsrc *=/s/@ns_appsrc@// /^NS_OBJ *=/s/@NS_OBJ@// +/^NS_OBJC_OBJ *=/s/@NS_OBJC_OBJ@// /^NS_SUPPORT *=/s/@NS_SUPPORT@// /^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// /^LIBRESOLV *=/s/@LIBRESOLV@// @@ -145,6 +146,11 @@ s/\.h\.in/.h-in/ stubedit emacs.exe minstack=2048k s/ || exit 1\; \\$// s/ || true\; \\$// +s/ @true *$/ @rem/ +s/^ [^ ]*move-if-change /update / +/^ echo[ ][ ]*timestamp/s/echo /djecho / +/^ cd \$(lib) && \$(MAKE)/c\ + $(MAKE) $(MFLAGS) -C $(lib) libgnu.a /^RUN_TEMACS *=/s|`/bin/pwd`|.| /^ *@\$(MKDEPDIR) *$/d /^ mv \.\/\.gdbinit/d diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index 98e398053e3..d885bbc97e2 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -34,6 +34,8 @@ /^#undef HAVE_FREXP *$/s/^.*$/#define HAVE_FREXP 1/ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ +/^#undef HAVE_ATTRIBUTE_ALIGNED *$/s/^.*$/#define HAVE_ATTRIBUTE_ALIGNED 1/ +/^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ /^#undef HAVE_FPATHCONF *$/s/^.*$/#define HAVE_FPATHCONF 1/ @@ -56,8 +58,13 @@ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ +/^#undef VERSION/s/^.*$/#define VERSION "24.0.50"/ +/^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ /^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/ +/^#undef HAVE__BOOL/s/^.*$/#define HAVE__BOOL 1/ +/^#undef inline/s/^.*$/#define inline __inline__/ +/^#undef restrict/s/^.*$/#define restrict __restrict/ /^#undef GNU_MALLOC *$/s/^.*$/#define GNU_MALLOC 1/ /^#undef REL_ALLOC *$/s/^.*$/#define REL_ALLOC 1/ @@ -69,15 +76,6 @@ s!^#undef config_opsysfile *$!#define config_opsysfile "s/msdos.h"! s!^#undef config_machfile *$!#define config_machfile "m/intel386.h"! s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ -# ------------------------------------------------------------ -# Without this ifndef, gcc -E -traditional barfs with GCC 3.0 -# on the line which says if ! HAVE_MKTIME... -# ------------------------------------------------------------ -/^#if ! HAVE_MKTIME || BROKEN_MKTIME/i\ -#ifndef __DJGPP__ -/^#define mktime emacs_mktime/a\ -#endif - /^#undef HAVE_STDINT_H/c\ #if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3\ #define HAVE_STDINT_H 1\ diff --git a/src/ChangeLog b/src/ChangeLog index dea7b2547fd..31e778043f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-02-19 Eli Zaretskii + + * s/msdos.h (strtold): Define to _strtold. + 2011-02-18 Stefan Monnier * process.c (Fstart_process, Fmake_serial_process) diff --git a/src/s/msdos.h b/src/s/msdos.h index a1d23521a0a..8debd28dccb 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -73,6 +73,15 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #define HAVE_INVERSE_HYPERBOLIC #define FLOAT_CHECK_DOMAIN +/* Start of gnulib-related stuff */ + +/* lib/ftoastr.c wants strtold, but DJGPP only has _strtold. DJGPP > + 2.03 has it, but it also has _strtold as a stub that jumps to + strtold, so use _strtold in all versions. */ +#define strtold _strtold + +/* End of gnulib-related stuff. */ + /* When $TERM is "internal" then this is substituted: */ #define INTERNAL_TERMINAL "pc|bios|IBM PC with color display:\ :co#80:li#25:Co#16:pa#256:km:ms:cm=:cl=:ce=:\ From 9d9ce65995706640591a4e798c354896ab5ac027 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 18:05:27 +0200 Subject: [PATCH 2/8] Commit new Sed scripts in msdos/. --- msdos/sedlibcf.inp | 22 ++++ msdos/sedlibmk.inp | 307 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 msdos/sedlibcf.inp create mode 100644 msdos/sedlibmk.inp diff --git a/msdos/sedlibcf.inp b/msdos/sedlibcf.inp new file mode 100644 index 00000000000..17584a796f7 --- /dev/null +++ b/msdos/sedlibcf.inp @@ -0,0 +1,22 @@ +# -sedlibcf.inp----------------------------------------------------------- +# Configuration script for lib/Makefile.in under DJGPP v2.x +# +# This script is run by config.bat to account for renaming of +# files whose names are invalid on DOS 8+3 filesystems. +# ---------------------------------------------------------------------- +# +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Emacs. +# +# This file is free software; as a special exception, the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# ---------------------------------------------------------------------- +s/c++defs/cxxdefs/g +s/\([a-zA-Z0-9_]*\)\.in\.h/\1.in-h/g diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp new file mode 100644 index 00000000000..2ee342eb29a --- /dev/null +++ b/msdos/sedlibmk.inp @@ -0,0 +1,307 @@ +# -sedlibmk.inp----------------------------------------------------------- +# Configuration script for lib/Makefile under DJGPP v2.x +# ---------------------------------------------------------------------- +# +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Emacs. +# +# This file is free software; as a special exception, the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# ---------------------------------------------------------------------- +# +# Replace @..@ constants. +/^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! +/^@SET_MAKE@$/s/@SET_MAKE@// +/^VPATH *=/s/@[^@\n]*@/./ +s/@PACKAGE@/emacs/ +/^am__cd *=/c\ +am__cd = cd +/^ALLOCA *=/s/@[^@\n]*@// +/^ALSA_CFLAGS *=/s/@[^@\n]*@// +/^ALSA_LIBS *=/s/@[^@\n]*@// +/^AWK *=/s/@[^@\n]*@/gawk/ +/^CANNOT_DUMP *=/s/@[^@\n]*@/no/ +/^CC *=/s/@[^@\n]*@/gcc/ +/^CPP *=/s/@[^@\n]*@/gcc -e/ +/^CPPFLAGS *=/s/@[^@\n]*@// +/^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/ +/^CFLAGS *=/s/@[^@\n]*@/-g -O2/ +/^CYGPATH_W *=/s/@[^@\n]*@// +/^CYGWIN_OBJ *=/s/@[^@\n]*@// +/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// +/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// +/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// +/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// +/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// +/^DEPDIR *=/s/@[^@\n]*@/deps/ +/^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/ +/^ECHO_N *=/s/@[^@\n]*@/-n/ +/^EXEEXT *=/s/@[^@\n]*@/.exe/ +/^GETOPT_H *=/s/@[^@\n]*@/getopt.h/ +# +# Some GNULIB_* are replaced with zero even though DJGPP does not have +# these features. That's because the gnulib replacements cannot +# possibly work for DJGPP, so we prefer to fail the link than have a +# subtly botched executable. +/^GNULIB_ATOLL *=/s/@GNULIB_ATOLL@/1/ +/^GNULIB_CALLOC_POSIX *=/s/@GNULIB_CALLOC_POSIX@/0/ +/^GNULIB_CANONICALIZE_FILE_NAME *=/s/@GNULIB_CANONICALIZE_FILE_NAME@/0/ +/^GNULIB_CHOWN *=/s/@GNULIB_CHOWN@/0/ +/^GNULIB_CLOSE *=/s/@GNULIB_CLOSE@/0/ +/^GNULIB_DUP2 *=/s/@GNULIB_DUP2@/0/ +/^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ +/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/0/ +/^GNULIB_EUIDACCESS *=/s/@GNULIB_EUIDACCESS@/0/ +/^GNULIB_FACCESSAT *=/s/@GNULIB_FACCESSAT@/0/ +/^GNULIB_FCHDIR *=/s/@GNULIB_FCHDIR@/0/ +/^GNULIB_FCHOWNAT *=/s/@GNULIB_FCHOWNAT@/0/ +/^GNULIB_FSYNC *=/s/@GNULIB_FSYNC@/0/ +/^GNULIB_FTRUNCATE *=/s/@GNULIB_FTRUNCATE@/0/ +/^GNULIB_GETCWD *=/s/@GNULIB_GETCWD@/0/ +/^GNULIB_GETDOMAINNAME *=/s/@GNULIB_GETDOMAINNAME@/0/ +/^GNULIB_GETDTABLESIZE *=/s/@GNULIB_GETDTABLESIZE@/0/ +/^GNULIB_GETGROUPS *=/s/@GNULIB_GETGROUPS@/0/ +/^GNULIB_GETHOSTNAME *=/s/@GNULIB_GETHOSTNAME@/0/ +/^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ +/^GNULIB_GETLOGIN *=/s/@GNULIB_GETLOGIN@/0/ +/^GNULIB_GETLOGIN_R *=/s/@GNULIB_GETLOGIN_R@/0/ +/^GNULIB_GETPAGESIZE *=/s/@GNULIB_GETPAGESIZE@/0/ +/^GNULIB_GETSUBOPT *=/s/@GNULIB_GETSUBOPT@/0/ +/^GNULIB_GETUSERSHELL *=/s/@GNULIB_GETUSERSHELL@/0/ +/^GNULIB_GRANTPT *=/s/@GNULIB_GRANTPT@/0/ +/^GNULIB_LCHOWN *=/s/@GNULIB_LCHOWN@/0/ +/^GNULIB_LINK *=/s/@GNULIB_LINK@/0/ +/^GNULIB_LINKAT *=/s/@GNULIB_LINKAT@/0/ +/^GNULIB_LSEEK *=/s/@GNULIB_LSEEK@/0/ +/^GNULIB_MALLOC_POSIX *=/s/@GNULIB_MALLOC_POSIX@/0/ +/^GNULIB_MKDTEMP *=/s/@GNULIB_MKDTEMP@/0/ +/^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/0/ +/^GNULIB_MKOSTEMPS *=/s/@GNULIB_MKOSTEMPS@/0/ +/^GNULIB_MKSTEMP *=/s/@GNULIB_MKSTEMP@/0/ +/^GNULIB_MKSTEMPS *=/s/@GNULIB_MKSTEMPS@/0/ +/^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/0/ +/^GNULIB_NANOSLEEP *=/s/@GNULIB_NANOSLEEP@/0/ +/^GNULIB_PIPE *=/s/@GNULIB_PIPE@/0/ +/^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ +/^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ +/^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ +/^GNULIB_PUTENV *=/s/@GNULIB_PUTENV@/0/ +/^GNULIB_PWRITE *=/s/@GNULIB_PWRITE@/0/ +/^GNULIB_RANDOM_R *=/s/@GNULIB_RANDOM_R@/0/ +/^GNULIB_READLINK *=/s/@GNULIB_READLINK@/0/ +/^GNULIB_READLINKAT *=/s/@GNULIB_READLINKAT@/0/ +/^GNULIB_REALLOC_POSIX *=/s/@GNULIB_REALLOC_POSIX@/0/ +/^GNULIB_REALPATH *=/s/@GNULIB_REALPATH@/0/ +/^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ +/^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ +/^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ +/^GNULIB_SLEEP *=/s/@GNULIB_SLEEP@/0/ +/^GNULIB_STRPTIME *=/s/@GNULIB_STRPTIME@/0/ +/^GNULIB_STRTOD *=/s/@GNULIB_STRTOD@/0/ +/^GNULIB_STRTOLL *=/s/@GNULIB_STRTOLL@/0/ +/^GNULIB_STRTOULL *=/s/@GNULIB_STRTOULL@/0/ +/^GNULIB_SYMLINK *=/s/@GNULIB_SYMLINK@/0/ +/^GNULIB_SYMLINKAT *=/s/@GNULIB_SYMLINKAT@/0/ +/^GNULIB_SYSTEM_POSIX *=/s/@GNULIB_SYSTEM_POSIX@/0/ +/^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/0/ +/^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ +/^GNULIB_TTYNAME_R *=/s/@GNULIB_TTYNAME_R@/0/ +/^GNULIB_UNISTD_H_GETOPT *=/s/@GNULIB_UNISTD_H_GETOPT@/1/ +/^GNULIB_UNISTD_H_SIGPIPE *=/s/@GNULIB_UNISTD_H_SIGPIPE@/0/ +/^GNULIB_UNLINK *=/s/@GNULIB_UNLINK@/0/ +/^GNULIB_UNLINKAT *=/s/@GNULIB_UNLINKAT@/0/ +/^GNULIB_UNLOCKPT *=/s/@GNULIB_UNLOCKPT@/0/ +/^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ +/^GNULIB_USLEEP *=/s/@GNULIB_USLEEP@/0/ +/^GNULIB_WRITE *=/s/@GNULIB_WRITE@/0/ +/^GNULIB__EXIT *=/s/@GNULIB__EXIT@/0/ +/^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ +/^HAVE_CANONICALIZE_FILE_NAME *=/s/@HAVE_CANONICALIZE_FILE_NAME@/0/ +/^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/ +/^HAVE_DECL_ENVIRON *=/s/@HAVE_DECL_ENVIRON@/1/ +/^HAVE_DECL_FCHDIR *=/s/@HAVE_DECL_FCHDIR@/0/ +/^HAVE_DECL_GETDOMAINNAME *=/s/@HAVE_DECL_GETDOMAINNAME@/0/ +/^HAVE_DECL_GETLOADAVG *=/s/@HAVE_DECL_GETLOADAVG@/0/ +/^HAVE_DECL_GETLOGIN_R *=/s/@HAVE_DECL_GETLOGIN_R@/0/ +/^HAVE_DECL_GETPAGESIZE *=/s/@HAVE_DECL_GETPAGESIZE@/1/ +/^HAVE_DECL_GETUSERSHELL *=/s/@HAVE_DECL_GETUSERSHELL@/0/ +/^HAVE_DECL_LOCALTIME_R *=/s/@HAVE_DECL_LOCALTIME_R@/0/ +/^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ +/^HAVE_DECL_TTYNAME_R *=/s/@HAVE_DECL_TTYNAME_R@/0/ +/^HAVE_DECL_UNSETENV *=/s/@HAVE_DECL_UNSETENV@/0/ +/^HAVE_DUP2 *=/s/@HAVE_DUP2@/1/ +/^HAVE_DUP3 *=/s/@HAVE_DUP3@/0/ +/^HAVE_EUIDACCESS *=/s/@HAVE_EUIDACCESS@/0/ +/^HAVE_FACCESSAT *=/s/@HAVE_FACCESSAT@/0/ +/^HAVE_FCHDIR *=/s/@HAVE_FCHDIR@/0/ +/^HAVE_FCHOWNAT *=/s/@HAVE_FCHOWNAT@/0/ +/^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ +/^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ +/^HAVE_GETDTABLESIZE *=/s/@HAVE_GETDTABLESIZE@/0/ +/^HAVE_GETGROUPS *=/s/@HAVE_GETGROUPS@/0/ +/^HAVE_GETHOSTNAME *=/s/@HAVE_GETHOSTNAME@/1/ +/^HAVE_GETLOGIN *=/s/@HAVE_GETLOGIN@/1/ +/^HAVE_GETOPT_H *=/s/@HAVE_GETOPT_H@/1/ +/^HAVE_GETPAGESIZE *=/s/@HAVE_GETPAGESIZE@/1/ +/^HAVE_GETSUBOPT *=/s/@HAVE_GETSUBOPT@/0/ +/^HAVE_GRANTPT *=/s/@HAVE_GRANTPT@/0/ +/^HAVE_LCHOWN *=/s/@HAVE_LCHOWN@/0/ +/^HAVE_LINK *=/s/@HAVE_LINK@/1/ +/^HAVE_LINKAT *=/s/@HAVE_LINKAT@/0/ +/^HAVE_MAKEINFO *=/s/@HAVE_MAKEINFO@/yes/ +/^HAVE_MKDTEMP *=/s/@HAVE_MKDTEMP@/0/ +/^HAVE_MKOSTEMP *=/s/@HAVE_MKOSTEMP@/0/ +/^HAVE_MKOSTEMPS *=/s/@HAVE_MKOSTEMPS@/0/ +/^HAVE_MKSTEMP *=/s/@HAVE_MKSTEMP@/1/ +/^HAVE_MKSTEMPS *=/s/@HAVE_MKSTEMPS@/0/ +/^HAVE_NANOSLEEP *=/s/@HAVE_NANOSLEEP@/0/ +/^HAVE_OS_H *=/s/@HAVE_OS_H@/0/ +/^HAVE_PIPE *=/s/@HAVE_PIPE@/0/ +/^HAVE_PIPE2 *=/s/@HAVE_PIPE2@/0/ +/^HAVE_PREAD *=/s/@HAVE_PREAD@/0/ +/^HAVE_PTSNAME *=/s/@HAVE_PTSNAME@/0/ +/^HAVE_PWRITE *=/s/@HAVE_PWRITE@/0/ +/^HAVE_RANDOM_H *=/s/@HAVE_RANDOM_H@/1/ +/^HAVE_RANDOM_R *=/s/@HAVE_RANDOM_R@/0/ +/^HAVE_READLINK *=/s/@HAVE_READLINK@/0/ +/^HAVE_READLINKAT *=/s/@HAVE_READLINKAT@/0/ +/^HAVE_REALPATH *=/s/@HAVE_REALPATH@/0/ +/^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ +/^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ +/^HAVE_SLEEP *=/s/@HAVE_SLEEP@/1/ +/^HAVE_STRPTIME *=/s/@HAVE_STRPTIME@/0/ +/^HAVE_STRTOD *=/s/@HAVE_STRTOD@/1/ +/^HAVE_STRTOLL *=/s/@HAVE_STRTOLL@/1/ +/^HAVE_STRTOULL *=/s/@HAVE_STRTOULL@/1/ +/^HAVE_STRUCT_RANDOM_DATA *=/s/@HAVE_STRUCT_RANDOM_DATA@/0/ +/^HAVE_SYMLINK *=/s/@HAVE_SYMLINK@/1/ +/^HAVE_SYMLINKAT *=/s/@HAVE_SYMLINKAT@/0/ +/^HAVE_SYS_LOADAVG_H *=/s/@HAVE_SYS_LOADAVG_H@/0/ +/^HAVE_SYS_PARAM_H *=/s/@HAVE_SYS_PARAM_H@/1/ +/^HAVE_TIMEGM *=/s/@HAVE_TIMEGM@/0/ +/^HAVE_UNISTD_H *=/s/@HAVE_UNISTD_H@/1/ +/^HAVE_UNLINKAT *=/s/@HAVE_UNLINKAT@/0/ +/^HAVE_UNLOCKPT *=/s/@HAVE_UNLOCKPT@/0/ +/^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ +/^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ +/^HAVE_XSERVER *=/s/@HAVE_XSERVER@/0/ +/^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ +/^HAVE__EXIT *=/s/@HAVE__EXIT@/1/ +/^INCLUDE_NEXT *=/s/@INCLUDE_NEXT@/include_next/ +/^INCLUDE_NEXT_AS_FIRST_DIRECTIVE *=/s/@[^@\n]*@/include_next/ +/^LDFLAGS *=/s/@[^@\n]*@// +/^LD_FIRSTFLAG *=/s/@[^@\n]*@// +/^LIBS *=/s/@[^@\n]*@// +/^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ +/^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// +/^NEXT_GETOPT_H *=/s/@[^@\n]*@// +/^NEXT_STDDEF_H *=/s/@[^@\n]*@// +/^NEXT_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_TIME_H *=/s/@[^@\n]*@// +/^NEXT_UNISTD_H *=/s/@[^@\n]*@// +/^OBJEXT *=/s/@[^@\n]*@/o/ +/^PRAGMA_COLUMNS *=/s/@[^@\n]*@// +/^PRAGMA_SYSTEM_HEADER *=/s/@[^@\n]*@/\#pragma GCC system_header/ +/^PTHREAD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ +/^RANLIB *=/s/@[^@\n]*@/ranlib/ +/^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ +/^REPLACE_CANONICALIZE_FILE_NAME *=/s/@REPLACE_CANONICALIZE_FILE_NAME@/0/ +/^REPLACE_CHOWN *=/s/@REPLACE_CHOWN@/0/ +/^REPLACE_CLOSE *=/s/@REPLACE_CLOSE@/0/ +/^REPLACE_DUP *=/s/@REPLACE_DUP@/0/ +/^REPLACE_DUP2 *=/s/@REPLACE_DUP2@/0/ +/^REPLACE_FCHOWNAT *=/s/@REPLACE_FCHOWNAT@/0/ +/^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ +/^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ +/^REPLACE_GETGROUPS *=/s/@REPLACE_GETGROUPS@/0/ +/^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ +/^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ +/^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ +/^REPLACE_LINK *=/s/@REPLACE_LINK@/0/ +/^REPLACE_LINKAT *=/s/@REPLACE_LINKAT@/0/ +/^REPLACE_LOCALTIME_R *=/s/@REPLACE_LOCALTIME_R@/0/ +/^REPLACE_LSEEK *=/s/@REPLACE_LSEEK@/0/ +/^REPLACE_MALLOC *=/s/@REPLACE_MALLOC@/0/ +/^REPLACE_MKSTEMP *=/s/@REPLACE_MKSTEMP@/0/ +/^REPLACE_MKTIME *=/s/@REPLACE_MKTIME@/0/ +/^REPLACE_NANOSLEEP *=/s/@REPLACE_NANOSLEEP@/0/ +/^REPLACE_NULL *=/s/@REPLACE_NULL@/0/ +/^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ +/^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ +/^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ +/^REPLACE_READLINK *=/s/@REPLACE_READLINK@/0/ +/^REPLACE_REALLOC *=/s/@REPLACE_REALLOC@/0/ +/^REPLACE_REALPATH *=/s/@REPLACE_REALPATH@/0/ +/^REPLACE_RMDIR *=/s/@REPLACE_RMDIR@/0/ +/^REPLACE_SETENV *=/s/@REPLACE_SETENV@/0/ +/^REPLACE_SLEEP *=/s/@REPLACE_SLEEP@/0/ +/^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ +/^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ +/^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ +/^REPLACE_TTYNAME_R *=/s/@REPLACE_TTYNAME_R@/0/ +/^REPLACE_UNLINK *=/s/@REPLACE_UNLINK@/0/ +/^REPLACE_UNLINKAT *=/s/@REPLACE_UNLINKAT@/0/ +/^REPLACE_UNSETENV *=/s/@REPLACE_UNSETENV@/0/ +/^REPLACE_USLEEP *=/s/@REPLACE_USLEEP@/0/ +/^REPLACE_WRITE *=/s/@REPLACE_WRITE@/0/ +/^STDBOOL_H *=/s/@[^@\n]*@// +/^STDDEF_H *=/s/@[^@\n]*@// +/^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ +/^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ +/^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ +/^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o/ +/^srcdir *=/s/@[^@\n]*@/./ +/^top_srcdir *=/s/@[^@\n]*@/../ +# +# Delete the recipes we don't want to get in our way. +/^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d +/^\$(srcdir)\/Makefile:/,/^[ ][ ]esac/d +/^\$(top_srcdir)\/configure:/,/^\$(ACLOCAL_M4)/d +# +# Fix the include-dependency lines +s/^@AMDEP_TRUE@// +s/^@AMDEP_FALSE@/\#/ +s/@am__include@/include/ +s/@am__quote@//g +s/^@am__fastdepCC_TRUE@// +s/^@am__fastdepCC_FALSE/\#/ +# +# Fix the *-clean rules, to not use a Unixy `test' command. Empty +# lists are replaced with a dummy file, to avoid an error message from +# "rm -f" with no arguments. +/^CONFIG_CLEAN_FILES *= *$/c\ +CONFIG_CLEAN_FILES = xyzzy +/^CONFIG_CLEAN_VPATH_FILES *= *$/c\ +CONFIG_CLEAN_VPATH_FILES = xyzzy +s/^ -*test -z.*|| rm/ -rm/ +s/@echo /@djecho/ +# +# Fix the recipes for header files +/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ +arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h\ + sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/./arg-nonnull.h > $@ +/^cxxdefs\.h:/,/^[ ][ ]*mv /c\ +cxxdefs.h: $(top_srcdir)/./cxxdefs.h\ + sed -n -e '/_GL_CXXDEFS/,$$p' < $(top_srcdir)/./cxxdefs.h > $@ +s/ \&\& \\ *$// +s/^ [ ]*{ echo \(.*\); \\/ djecho \1 > $@-t/ +s/\.in-h\; *\\$/.in-h >> $@-t/ +/^ [ ]*} /d +/^stdlib\.h:/,/^ [ ]*mv /{ + s/'\; \\ *$/' >> $@-t/ +} +/^unistd\.h:/,/^ [ ]*mv /{ + s/'\; \\ *$/' >> $@-t/ +} From 152be435b98c485f75160e86f67d250122b7e1bd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 18:12:18 +0200 Subject: [PATCH 3/8] Update .bzrignore for files produced by the MS-DOS build. .bzrignore: Ignore cxxdefs.h and lib/*.in-h files. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 701150d0cab..906bb38c340 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-02-19 Eli Zaretskii + * .bzrignore: Ignore cxxdefs.h and lib/*.in-h files. + * config.bat: Configure in `lib'. 2011-02-18 Paul Eggert From 219463da10f01fece14351d6ccecccb43a27885f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 18:53:10 +0200 Subject: [PATCH 4/8] Fix generation of auto-dependency files in lib/. .bzrignore: Add lib/deps/. config.bat: Generate *.Po files in lib/deps. msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Fix editing of *-clean rules. msdos/depfiles.bat: New file. --- ChangeLog | 2 ++ config.bat | 3 +++ msdos/ChangeLog | 5 +++++ msdos/depfiles.bat | 25 +++++++++++++++++++++++++ msdos/sedlibmk.inp | 2 +- 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 msdos/depfiles.bat diff --git a/ChangeLog b/ChangeLog index 906bb38c340..e6675449001 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,10 @@ 2011-02-19 Eli Zaretskii * .bzrignore: Ignore cxxdefs.h and lib/*.in-h files. + Add lib/deps/. * config.bat: Configure in `lib'. + Generate *.Po files in lib/deps. 2011-02-18 Paul Eggert diff --git a/config.bat b/config.bat index 730a33770e9..7ebfc74b801 100644 --- a/config.bat +++ b/config.bat @@ -288,6 +288,9 @@ If Exist unistd.in.h update unistd.in.h unistd.in-h sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile rm -f makefile.tmp +If Not Exist deps\stamp mkdir deps +If Not Exist deps\stamp for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f +If Not Exist deps\stamp echo deps-stamp > deps\stamp cd .. rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 9a98352ff23..7a4d107eebe 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,5 +1,10 @@ 2011-02-19 Eli Zaretskii + * sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Fix editing of *-clean + rules. + + * depfiles.bat: New file. + * sedlibmk.inp: New file. * sedlibcf.inp: New file. diff --git a/msdos/depfiles.bat b/msdos/depfiles.bat new file mode 100644 index 00000000000..22fcfc3dcd6 --- /dev/null +++ b/msdos/depfiles.bat @@ -0,0 +1,25 @@ +@echo off +rem ---------------------------------------------------------------------- +rem Auxiliary script for MSDOS, run by ../config.bat +rem Copyright (C) 2011 Free Software Foundation, Inc. + +rem This file is part of GNU Emacs. + +rem GNU Emacs is free software: you can redistribute it and/or modify +rem it under the terms of the GNU General Public License as published by +rem the Free Software Foundation, either version 3 of the License, or +rem (at your option) any later version. + +rem GNU Emacs is distributed in the hope that it will be useful, +rem but WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +rem GNU General Public License for more details. + +rem You should have received a copy of the GNU General Public License +rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/. + +rem ---------------------------------------------------------------------- + +echo %1 | sed -e "s,^,@echo # dummy > deps\\," -e "s,\.c,.Po," > tdepfile.bat +call tdepfile +del tdepfile.bat diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 2ee342eb29a..becdbfb598a 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -285,7 +285,7 @@ s/^@am__fastdepCC_FALSE/\#/ CONFIG_CLEAN_FILES = xyzzy /^CONFIG_CLEAN_VPATH_FILES *= *$/c\ CONFIG_CLEAN_VPATH_FILES = xyzzy -s/^ -*test -z.*|| rm/ -rm/ +s/^ -*test -z.*|| rm/ -rm/ s/@echo /@djecho/ # # Fix the recipes for header files From 27087453c9965266ed5c7cb667d226c89e184813 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 19:35:11 +0200 Subject: [PATCH 5/8] Fix msdos/sedlibmk.inp. lib/ builds now. sedlibmk.inp (HAVE_GETOPT_H, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS): Fix editing. (DEFS): Edit to -DHAVE_CONFIG_H. (Makefile, &&): Fix removal. --- msdos/ChangeLog | 4 ++++ msdos/sedlibmk.inp | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 7a4d107eebe..e9362054a93 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -2,6 +2,10 @@ * sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Fix editing of *-clean rules. + (HAVE_GETOPT_H, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS): Fix + editing. + (DEFS): Edit to -DHAVE_CONFIG_H. + (Makefile, &&): Fix removal. * depfiles.bat: New file. diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index becdbfb598a..3000a1e3fcd 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -40,6 +40,7 @@ am__cd = cd /^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// /^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// +/^DEFS *=/s/@[^@\n]*@/-DHAVE_CONFIG_H/ /^DEPDIR *=/s/@[^@\n]*@/deps/ /^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/ /^ECHO_N *=/s/@[^@\n]*@/-n/ @@ -148,7 +149,7 @@ am__cd = cd /^HAVE_GETGROUPS *=/s/@HAVE_GETGROUPS@/0/ /^HAVE_GETHOSTNAME *=/s/@HAVE_GETHOSTNAME@/1/ /^HAVE_GETLOGIN *=/s/@HAVE_GETLOGIN@/1/ -/^HAVE_GETOPT_H *=/s/@HAVE_GETOPT_H@/1/ +/^HAVE_GETOPT_H *=/s/@HAVE_GETOPT_H@/0/ /^HAVE_GETPAGESIZE *=/s/@HAVE_GETPAGESIZE@/1/ /^HAVE_GETSUBOPT *=/s/@HAVE_GETSUBOPT@/0/ /^HAVE_GRANTPT *=/s/@HAVE_GRANTPT@/0/ @@ -212,7 +213,7 @@ am__cd = cd /^NEXT_UNISTD_H *=/s/@[^@\n]*@// /^OBJEXT *=/s/@[^@\n]*@/o/ /^PRAGMA_COLUMNS *=/s/@[^@\n]*@// -/^PRAGMA_SYSTEM_HEADER *=/s/@[^@\n]*@/\#pragma GCC system_header/ +/^PRAGMA_SYSTEM_HEADER *=/s/@[^@\n]*@/\\\#pragma GCC system_header/ /^PTHREAD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^RANLIB *=/s/@[^@\n]*@/ranlib/ /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ @@ -264,10 +265,13 @@ am__cd = cd /^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o/ /^srcdir *=/s/@[^@\n]*@/./ /^top_srcdir *=/s/@[^@\n]*@/../ +/^top_builddir *=/s/@[^@\n]*@/../ +s/@PRAGMA_SYSTEM_HEADER@/\#pragma GCC system_header/ +s/@PRAGMA_COLUMNS@// # # Delete the recipes we don't want to get in our way. /^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d -/^\$(srcdir)\/Makefile:/,/^[ ][ ]esac/d +/^Makefile:/,/^[ ][ ]*esac/d /^\$(top_srcdir)\/configure:/,/^\$(ACLOCAL_M4)/d # # Fix the include-dependency lines @@ -295,8 +299,9 @@ arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h\ /^cxxdefs\.h:/,/^[ ][ ]*mv /c\ cxxdefs.h: $(top_srcdir)/./cxxdefs.h\ sed -n -e '/_GL_CXXDEFS/,$$p' < $(top_srcdir)/./cxxdefs.h > $@ -s/ \&\& \\ *$// s/^ [ ]*{ echo \(.*\); \\/ djecho \1 > $@-t/ +s/^ [ ]*{ echo \(.*\) && \\/ djecho \1 > $@-t/ +s/ \&\& \\ *$// s/\.in-h\; *\\$/.in-h >> $@-t/ /^ [ ]*} /d /^stdlib\.h:/,/^ [ ]*mv /{ From 534e4e80e65e84f3f30567ba1b5727c79158f211 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 19:54:18 +0200 Subject: [PATCH 6/8] Fix msdos/sed3v2.inp. lib-src/ now builds. sed3v2.inp (-DVERSION): Edit out. (LOADLIBES): Don't edit to empty. mainmake.v2 (lib, lib-src, src): Specify "all" as an explicit target. --- msdos/ChangeLog | 6 ++++++ msdos/mainmake.v2 | 6 +++--- msdos/sed3v2.inp | 3 +-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index e9362054a93..c6c60013975 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,5 +1,11 @@ 2011-02-19 Eli Zaretskii + * sed3v2.inp (-DVERSION): Edit out. + (LOADLIBES): Don't edit to empty. + + * mainmake.v2 (lib, lib-src, src): Specify "all" as an explicit + target. + * sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Fix editing of *-clean rules. (HAVE_GETOPT_H, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS): Fix diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2 index 0e77a68940a..1aea06d2a4d 100644 --- a/msdos/mainmake.v2 +++ b/msdos/mainmake.v2 @@ -83,12 +83,12 @@ all: lib lib-src src emacs misc lispref lispintro lib: FRC cd lib - $(MAKE) top_srcdir=${top_srcdir} version=${version} + $(MAKE) top_srcdir=${top_srcdir} all cd .. lib-src: lib FRC cd lib-src - $(MAKE) top_srcdir=${top_srcdir} version=${version} + $(MAKE) top_srcdir=${top_srcdir} all cd .. # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which @@ -102,7 +102,7 @@ lib-src: lib FRC # is not wrong, but is overkill in 99.99% of the cases. src: lib lib-src FRC cd src - $(MAKE) top_srcdir=${top_srcdir} BOOTSTRAPEMACS="${boot}" + $(MAKE) top_srcdir=${top_srcdir} BOOTSTRAPEMACS="${boot}" all djecho -s '/-geometry/s,^.*,set environment HOME $(top_srcdir),' \ '/environment *TERM/s/^.*/set environment TERM internal/' \ >gdb.sed diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 3a9d14a35af..346f4e07e77 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -18,7 +18,7 @@ /^# DIST: /d /^SHELL *=/s/^/# / /^CC *=/s/=.*$/=gcc/ -/-DVERSION=/s/@version@/\${version}/ +s/-DVERSION[^ ]* // /^configname *=/s/=.*$/=msdos/ /^archlibdir *=/s!=.*$!=/emacs/bin! /^bindir *=/s!=.*$!=/emacs/bin! @@ -40,7 +40,6 @@ /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// -/^LOADLIBES *=/s!=.*$!=! /^ALLOCA *=/s!@ALLOCA@!! /^EXEEXT *=/s!@EXEEXT@!! /^GETOPT_H *=/s!@GETOPT_H@!getopt.h! From f601db19da67d24241f17ce15913458ea33599da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 21:41:00 +0200 Subject: [PATCH 7/8] Finish fixing the MS-DOS build. Everything builds and works. src/termcap.c (tputs): Don't declare baud_rate. msdos/sedlibmk.inp (gl_LIBOBJS): Add getloadavg.o. msdos/sedleim.inp (RUN_EMACS): Rename from RUN-EMACS. (BUILT_EMACS): Rename from BUILT-EMACS. msdos/sed6.inp (MAKEINFO): Edit to "makeinfo". (ENVADD): Adjust to MAKEINFO_OPTS. (texinputdir): Don't edit. msdos/sed2v2.inp (my_strftime): Edit to nstrftime. msdos/sed1v2.inp (LIBOBJS): Edit to empty. ($(libsrc)/make-docfile): Two new edits, one each for every invocation of make-docfile. (move-if-change): Fix edit. Remove some unused switches from $(ALL_CFLAGS), to make the GCC command line shorter. --- msdos/ChangeLog | 18 ++++++++++++++++++ msdos/sed1v2.inp | 16 ++++++++++++---- msdos/sed2v2.inp | 1 + msdos/sed6.inp | 8 +++----- msdos/sedleim.inp | 4 ++-- msdos/sedlibmk.inp | 2 +- src/ChangeLog | 2 ++ src/termcap.c | 1 - 8 files changed, 39 insertions(+), 13 deletions(-) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index c6c60013975..bf80bff3ebf 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,5 +1,23 @@ 2011-02-19 Eli Zaretskii + * sedlibmk.inp (gl_LIBOBJS): Add getloadavg.o. + + * sedleim.inp (RUN_EMACS): Rename from RUN-EMACS. + (BUILT_EMACS): Rename from BUILT-EMACS. + + * sed6.inp (MAKEINFO): Edit to "makeinfo". + (ENVADD): Adjust to MAKEINFO_OPTS. + (texinputdir): Don't edit. + + * sed2v2.inp (my_strftime): Edit to nstrftime. + + * sed1v2.inp (LIBOBJS): Edit to empty. + ($(libsrc)/make-docfile): Two new edits, one each for every + invocation of make-docfile. + (move-if-change): Fix edit. + Remove some unused switches from $(ALL_CFLAGS), to make the GCC + command line shorter. + * sed3v2.inp (-DVERSION): Edit out. (LOADLIBES): Don't edit to empty. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 49e45b5e0d8..604e94082a8 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -35,7 +35,7 @@ s/\.h\.in/.h-in/ /^LIBES *=/,/^ *$/ { s/@[^@\n]*@//g } -/^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/ +/^LIBOBJS *=/s/@[^@\n]*@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// /^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// @@ -131,7 +131,8 @@ s/\.h\.in/.h-in/ /^M_FILE *=/s!@M_FILE@!$(srcdir)/m/intel386.h! /^S_FILE *=/s!@S_FILE@!$(srcdir)/s/msdos.h! /^@SET_MAKE@$/s/@SET_MAKE@// -/^.\$(libsrc)\/make-docfile.*>/s!make-docfile!make-docfile -o ../etc/DOC! +/^.\$(libsrc)\/make-docfile.*>.*\/DOC/s!make-docfile!make-docfile -o ../etc/DOC! +/^.\$(libsrc)\/make-docfile.*>.*gl-tmp/s!make-docfile!make-docfile -o gl-tmp! /^.\$(libsrc)\/make-doc/s!>.*$!! /^[ ]*$/d /^ if test -f/,/^ fi$/c\ @@ -147,7 +148,7 @@ s/\.h\.in/.h-in/ s/ || exit 1\; \\$// s/ || true\; \\$// s/ @true *$/ @rem/ -s/^ [^ ]*move-if-change /update / +s/^ [^ ]*move-if-change / update / /^ echo[ ][ ]*timestamp/s/echo /djecho / /^ cd \$(lib) && \$(MAKE)/c\ $(MAKE) $(MFLAGS) -C $(lib) libgnu.a @@ -182,4 +183,11 @@ s/echo.*buildobj.lst/dj&/ /^ @\{0,1\}cd ..\/lisp;.*[^\]$/s|$|\; cd ../src| /^ *THEFILE=/s|$|\; cd ../src| /^ echo.* buildobj.h/s|echo |djecho | - +# Make the GCC command line fit one screen line +/^[ ][ ]*\$(C_SWITCH_X_SYSTEM)/d +/^[ ][ ]*\$(GCONF_CFLAGS)/d +/^[ ][ ]*\$(LIBGNUTLS_CFLAGS)/d +s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) // +s/ \$(C_SWITCH_X_SITE)// +s/ \$(DBUS_CFLAGS)// +s| -I\$(srcdir)/../lib|| diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index d885bbc97e2..470c1bf60a6 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -64,6 +64,7 @@ /^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/ /^#undef HAVE__BOOL/s/^.*$/#define HAVE__BOOL 1/ /^#undef inline/s/^.*$/#define inline __inline__/ +/^#undef my_strftime/s/^.*$/#define my_strftime nstrftime/ /^#undef restrict/s/^.*$/#define restrict __restrict/ /^#undef GNU_MALLOC *$/s/^.*$/#define GNU_MALLOC 1/ diff --git a/msdos/sed6.inp b/msdos/sed6.inp index 2c5f0273608..888b680a6ca 100644 --- a/msdos/sed6.inp +++ b/msdos/sed6.inp @@ -18,13 +18,11 @@ # ---------------------------------------------------------------------- /^srcdir *=/s/@[^@\n]*@/./ /^VPATH *=/s/@[^@\n]*@/./ -/^ENVADD/c\ +/^MAKEINFO *=/s/@[^@\n]*@/makeinfo/ +/^ENVADD/,/^$/c\ ENVADD =\ export TEXINPUTS := $(srcdir)";"$(TEXINPUTS)\ -export MAKEINFO := $(MAKEINFO) -I$(srcdir) -/^texinputdir/c\ -texinputdir =\ -export texinputdir := $(srcdir)";"$(TEXINPUTS) +export MAKEINFO := $(MAKEINFO) $(MAKEINFO_OPTS) /^SHELL *=/s/^/# / /^elisp.dvi:/,/^$/ { /^ *if \[ *\a${permuted_index}/,/^ *fi *$/c\ diff --git a/msdos/sedleim.inp b/msdos/sedleim.inp index c2f7d845422..2d70695ebe6 100644 --- a/msdos/sedleim.inp +++ b/msdos/sedleim.inp @@ -31,9 +31,9 @@ INSTALLDIR=. s|\([ ]\)echo|\1djecho|g /^ @true *$/d -/RUN-EMACS *=/,/^$/c\ +/RUN_EMACS *=/,/^$/c\ export EMACSLOADPATH=${buildlisppath}\ -RUN-EMACS = ${BUILT-EMACS} -batch --no-site-file +RUN_EMACS = ${BUILT_EMACS} -batch --no-site-file /^ cd ../c\ ${MAKE} -C ../src ${MFLAGS} emacs diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 3000a1e3fcd..b85b20f1491 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -262,7 +262,7 @@ am__cd = cd /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ -/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o/ +/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o/ /^srcdir *=/s/@[^@\n]*@/./ /^top_srcdir *=/s/@[^@\n]*@/../ /^top_builddir *=/s/@[^@\n]*@/../ diff --git a/src/ChangeLog b/src/ChangeLog index 31e778043f8..2b4d60f9189 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-02-19 Eli Zaretskii + * termcap.c (tputs): Don't declare baud_rate. + * s/msdos.h (strtold): Define to _strtold. 2011-02-18 Stefan Monnier diff --git a/src/termcap.c b/src/termcap.c index 9e64d027640..69ce56d93b3 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -268,7 +268,6 @@ tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) register int padcount = 0; register int speed; - extern EMACS_INT baud_rate; speed = baud_rate; /* For quite high speeds, convert to the smaller units to avoid overflow. */ From 83627c032a6c07c15cc0434b23514f34d9583685 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Feb 2011 21:49:10 +0200 Subject: [PATCH 8/8] Fix MS-DOS build in src/: delete gl-tmp. msdos/sed1v2.inp: Delete gl-tmp after updating globals.h --- msdos/ChangeLog | 2 ++ msdos/sed1v2.inp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index bf80bff3ebf..ed171c68b02 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,5 +1,7 @@ 2011-02-19 Eli Zaretskii + * sed1v2.inp: Delete gl-tmp after updating globals.h + * sedlibmk.inp (gl_LIBOBJS): Add getloadavg.o. * sedleim.inp (RUN_EMACS): Rename from RUN-EMACS. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 604e94082a8..2afce070e30 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -150,6 +150,8 @@ s/ || true\; \\$// s/ @true *$/ @rem/ s/^ [^ ]*move-if-change / update / /^ echo[ ][ ]*timestamp/s/echo /djecho / +/^ .*djecho timestamp/a\ + @rm -f gl-tmp /^ cd \$(lib) && \$(MAKE)/c\ $(MAKE) $(MFLAGS) -C $(lib) libgnu.a /^RUN_TEMACS *=/s|`/bin/pwd`|.|