]> code.delx.au - gnu-emacs/commitdiff
Fix previous commit.
authorEli Zaretskii <eliz@gnu.org>
Fri, 25 Mar 2011 12:52:03 +0000 (14:52 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 25 Mar 2011 12:52:03 +0000 (14:52 +0200)
 config.bat: Use autogen/config.in in one more place.
 msdos/sedlibmk.inp (GNULIB_PRINTF, GNULIB_PRINTF_POSIX): Add missing
 variables.
 (MKDIR_P): Fix replacement command.
 (NEXT_AS_FIRST_DIRECTIVE_STDIO_H, NEXT_STDIO_H): Edit to
 "<stdio.h>", as lib/stdio.h cannot be left unused.

config.bat
msdos/ChangeLog
msdos/sedlibmk.inp

index c90871de6ff47456e1b3321ddd6bd4c8f31ae9a8..e480a4b9bc8ffead7dbaf71a021bd5a9d95cb96c 100644 (file)
@@ -156,7 +156,7 @@ rm -f epaths.tmp
 \r
 rem   Create "config.h"\r
 rm -f config.h2 config.tmp\r
-sed -e '' config.in > config.tmp\r
+sed -e '' ../autogen/config.in > config.tmp\r
 if "%X11%" == "" goto src4\r
 sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp\r
 :src4\r
index ce51a75374165950f4cf0de6a7a6231bf1e26163..f8215584f1e0d6bb9ef1d46c3cff615832f5934d 100644 (file)
@@ -1,6 +1,12 @@
 2011-03-25  Eli Zaretskii  <eliz@gnu.org>
 
        * sedlibmk.inp: Adapt to addition of the gnulib stdio module.
+       Add a description of what needs to be done when a new gnulib
+       module is added.
+       (GNULIB_PRINTF, GNULIB_PRINTF_POSIX): Add missing variables.
+       (MKDIR_P): Fix replacement command.
+       (NEXT_AS_FIRST_DIRECTIVE_STDIO_H, NEXT_STDIO_H): Edit to
+       "<stdio.h>", as lib/stdio.h cannot be left unused.
 
 2011-02-26  Eli Zaretskii  <eliz@gnu.org>
 
index 8a261400189fee3a831956f800f1cd7aff224270..d7af3681ef944dfecacdfb8f63442b5d60f6fc3e 100644 (file)
 #
 #     /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/
 # 
-#  . If it's a header, edit the corresponding variable to either an
-#    empty value or to the name of the header.  Examples:
+#  . If the module is a header or adds headers, edit the corresponding
+#    variable to either an empty value or to the name of the header.
+#    Examples:
 #
 #       /^STDINT_H *=/s/@[^@\n]*@/stdint.h/  -- stdint.h is needed
 #       /^STDDEF_H *=/s/@[^@\n]*@//          -- stddef.h is not needed
 #
 #  . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable
-#    as appropriately: to an empty value if the DJGPP system header
-#    should not be included after the gnulib one, or if the gnulib one
-#    is not needed; and to the corresponding DJGPP header name
-#    otherwise.  Examples:
+#    as appropriately: to an empty value if the gnulib header is not
+#    used, and to the corresponding DJGPP header name otherwise.
+#    Examples:
 #
 #     /^NEXT_STDDEF_H *=/s/@[^@\n]*@//
 #     /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/
 #     /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/
 #     /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@//
 #
+#  . Note that some gnulib headers cannot be left unused: those for
+#    which there's no corresponding foo_H variable in
+#    autogen/Makefile.in (example: stdio.h).  For these the "not
+#    needed" path is not applicable.
+#
 #  . If the header is needed, edit all the variables it uses as
 #    appropriate.  In general, if DJGPP has the corresponding feature,
 #    the value of the corresponding HAVE_foo should be set to what
 #       s/'\; \\ *$/' >> $@-t/
 #     }
 #
+# The following Awk script is useful for editing portions of
+# autogen/Makefile.in into Sed commands that define the corresponding
+# variables to zero (which is what is required in the absolute
+# majority of cases):
+#
+#   { printf "/^%s *=/s/%s/0/\n",$1,$3}
+#
 # ----------------------------------------------------------------------
 # Replace @..@ constants.
 /^\# @configure_input@/s!@configure_input@!lib/Makefile.  Generated from Makefile.in by config.bat!
@@ -195,6 +207,8 @@ am__cd = cd
 /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/
 /^GNULIB_POPEN *=/s/@GNULIB_POPEN@/0/
 /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/
+/^GNULIB_PRINTF *=/s/@GNULIB_PRINTF@/0/
+/^GNULIB_PRINTF_POSIX *=/s/@GNULIB_PRINTF_POSIX@/0/
 /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/
 /^GNULIB_PUTC *=/s/@GNULIB_PUTC@/0/
 /^GNULIB_PUTCHAR *=/s/@GNULIB_PUTCHAR@/0/
@@ -366,14 +380,14 @@ am__cd = cd
 /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/
 /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@//
 /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/
-/^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@//
+/^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/
 /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/
 /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>!
 /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@/<time.h>/
 /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@/<unistd.h>/
 /^NEXT_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/
 /^NEXT_STDDEF_H *=/s/@[^@\n]*@//
-/^NEXT_STDIO_H *=/s/@[^@\n]*@//
+/^NEXT_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/
 /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/
 /^NEXT_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/
 /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>!
@@ -526,4 +540,4 @@ s/\.in-h\;  *\\$/.in-h >> $@-t/
 /^unistd\.h:/,/^       [       ]*mv /{
   s/'\; \\ *$/' >> $@-t/
 }
-s!\$(MKDIR_P)[         ][      ]*sys!command.com /c "if not exist sys\stat.h md sys"!
+s!\$(MKDIR_P)[         ][      ]*sys!command.com /c "if not exist sys\\stat.h md sys"!