Commit | Line | Data |
---|---|---|
9d9ce659 EZ |
1 | # -sedlibmk.inp----------------------------------------------------------- |
2 | # Configuration script for lib/Makefile under DJGPP v2.x | |
3 | # ---------------------------------------------------------------------- | |
4 | # | |
ba318903 | 5 | # Copyright (C) 2011-2014 Free Software Foundation, Inc. |
9d9ce659 EZ |
6 | # |
7 | # This file is part of GNU Emacs. | |
8 | # | |
9 | # This file is free software; as a special exception, the author gives | |
10 | # unlimited permission to copy and/or distribute it, with or without | |
11 | # modifications, as long as this notice is preserved. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # ---------------------------------------------------------------------- | |
18 | # | |
07da4b3c EZ |
19 | # Checklist to add a new gnulib module: |
20 | # | |
bf6b4923 EZ |
21 | # . If the module includes source files that need to be compiled, and |
22 | # does not appear in the am_libgnu_a_OBJECTS list, add the | |
23 | # corresponding .o file names to the list that gets assigned to the | |
24 | # gl_LIBOBJS variable. | |
25 | # | |
26 | # . If a module appears in am_libgnu_a_OBJECTS that is not required | |
27 | # for the MSDOS build, edit it out by adding an appropriate command | |
28 | # to the set that edits the am_libgnu_a_OBJECTS block. | |
07da4b3c EZ |
29 | # |
30 | # . If the module defines functions that need to replace DJGPP | |
bf6b4923 EZ |
31 | # functions, edit the appropriate REPLACE_foo variables to 1: |
32 | # | |
33 | # /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/1/ | |
07da4b3c | 34 | # |
bf6b4923 EZ |
35 | # Note that this file already has a command to edit all the |
36 | # REPLACE_foo variables to zero, so if some gnulib replacement | |
37 | # function is ever needed, the corresponding editing command such | |
38 | # as above should be placed before that catchall rule (search for | |
39 | # "REPLACE_" below). | |
ec041b55 | 40 | # |
f4d87671 EZ |
41 | # . If the module is a header or adds headers, edit the corresponding |
42 | # variable to either an empty value or to the name of the header. | |
43 | # Examples: | |
07da4b3c EZ |
44 | # |
45 | # /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed | |
46 | # /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed | |
47 | # | |
7c106b1e | 48 | # . Some of the headers are generated conditionally, and the |
1b2de274 | 49 | # corresponding recipes are guarded by @GL_GENERATE_xxxx_H_TRUE@ |
7c106b1e EZ |
50 | # and @GL_GENERATE_xxxx_H_FALSE@. Depending on whether DJGPP uses |
51 | # the corresponding header, these should be edited either to | |
52 | # nothing (thus exposing the recipe) or to #, which comments the | |
53 | # recipe away. Example: | |
54 | # | |
55 | # s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ | |
56 | # s/^@GL_GENERATE_STDBOOL_H_FALSE@// | |
57 | # | |
bf6b4923 EZ |
58 | # . Also edit the NEXT_foo_H and NEXT_AS_FIRST_DIRECTIVE_foo_H |
59 | # variables as appropriately: to an empty value if the gnulib | |
60 | # header is not used, and to the corresponding DJGPP header name | |
61 | # otherwise. Examples: | |
07da4b3c EZ |
62 | # |
63 | # /^NEXT_STDDEF_H *=/s/@[^@\n]*@// | |
64 | # /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ | |
65 | # /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ | |
66 | # /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// | |
67 | # | |
f4d87671 EZ |
68 | # . Note that some gnulib headers cannot be left unused: those for |
69 | # which there's no corresponding foo_H variable in | |
bf6b4923 | 70 | # msdos/autogen/Makefile.in (example: stdio.h). For these the "not |
f4d87671 EZ |
71 | # needed" path is not applicable. |
72 | # | |
07da4b3c EZ |
73 | # . If the header is needed, edit all the variables it uses as |
74 | # appropriate. In general, if DJGPP has the corresponding feature, | |
75 | # the value of the corresponding HAVE_foo should be set to what | |
76 | # DJGPP has, and the corresponding GNULIB_foo variable should be | |
77 | # edited to zero. If the feature is not available, the HAVE_foo | |
78 | # variable should be edited to zero and the corresponding | |
79 | # GNULIB_foo variable should be edited to 1 if the gnulib | |
80 | # replacement can work for DJGPP (a rare phenomenon), zero | |
bf6b4923 EZ |
81 | # otherwise. Note that by default all HAVE_foo and GNULIB_foo |
82 | # variables that don't have a specific editing rule will be edited | |
83 | # to zero. | |
07da4b3c EZ |
84 | # |
85 | # . Some gnulib header files have more complex recipes in | |
bf6b4923 EZ |
86 | # msdos/autogen/Makefile.in than others. The tell-tale sign of |
87 | # such a recipe is that the input redirection from the .in.h file | |
88 | # is not present at the end of the command, like this: | |
07da4b3c EZ |
89 | # |
90 | # -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | |
91 | # } > $@-t && \ | |
92 | # mv $@-t $@ | |
93 | # | |
94 | # as opposed to this: | |
95 | # | |
96 | # -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ | |
97 | # < $(srcdir)/sys_stat.in.h; \ | |
98 | # } > $@-t && \ | |
99 | # mv $@-t $@ | |
100 | # | |
101 | # For those recipes that do _not_ have redirection at the end of | |
102 | # the command, add a block of Sed commands like this: | |
103 | # | |
104 | # /^stdio\.h:/,/^ [ ]*mv /{ | |
105 | # s/'\; \\ *$/' >> $@-t/ | |
106 | # } | |
107 | # | |
bf6b4923 EZ |
108 | # There's also a 3rd variety of script, which ends like this: |
109 | # | |
110 | # -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | |
111 | # < $(srcdir)/string.in.h; \ | |
112 | # } > $@-t && \ | |
113 | # mv $@-t $@ | |
114 | # | |
115 | # For these, you will need Sed commands like those used for | |
116 | # string.h, see below. | |
117 | # | |
42a53d84 EZ |
118 | # . If the recipe for generating a header file uses 'cat', replace it with |
119 | # | |
120 | # sed -e '' | |
121 | # | |
122 | # (if needed; there's already an edit command that should take care of | |
123 | # this). | |
124 | # | |
f4d87671 | 125 | # The following Awk script is useful for editing portions of |
bf6b4923 EZ |
126 | # msdos/autogen/Makefile.in into Sed commands that define the |
127 | # corresponding variables to zero (which is what is required in the | |
128 | # absolute majority of cases): | |
f4d87671 EZ |
129 | # |
130 | # { printf "/^%s *=/s/%s/0/\n",$1,$3} | |
131 | # | |
07da4b3c | 132 | # ---------------------------------------------------------------------- |
9d9ce659 EZ |
133 | # Replace @..@ constants. |
134 | /^\# @configure_input@/s!@configure_input@!lib/Makefile. Generated from Makefile.in by config.bat! | |
135 | /^@SET_MAKE@$/s/@SET_MAKE@// | |
136 | /^VPATH *=/s/@[^@\n]*@/./ | |
137 | s/@PACKAGE@/emacs/ | |
138 | /^am__cd *=/c\ | |
139 | am__cd = cd | |
bf6b4923 EZ |
140 | /^@BUILDING_FOR_WINDOWSNT_TRUE@/s/@[^@\n]*@/#/ |
141 | /^@BUILDING_FOR_WINDOWSNT_FALSE@/s/@[^@\n]*@// | |
9d9ce659 EZ |
142 | /^ALLOCA *=/s/@[^@\n]*@// |
143 | /^ALSA_CFLAGS *=/s/@[^@\n]*@// | |
144 | /^ALSA_LIBS *=/s/@[^@\n]*@// | |
31bed486 EZ |
145 | /^AR *=/s/@[^@\n]*@/ar/ |
146 | /^ARFLAGS *=/s/@[^@\n]*@/cru/ | |
9d9ce659 EZ |
147 | /^AWK *=/s/@[^@\n]*@/gawk/ |
148 | /^CANNOT_DUMP *=/s/@[^@\n]*@/no/ | |
149 | /^CC *=/s/@[^@\n]*@/gcc/ | |
150 | /^CPP *=/s/@[^@\n]*@/gcc -e/ | |
151 | /^CPPFLAGS *=/s/@[^@\n]*@// | |
152 | /^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/ | |
153 | /^CFLAGS *=/s/@[^@\n]*@/-g -O2/ | |
154 | /^CYGPATH_W *=/s/@[^@\n]*@// | |
155 | /^CYGWIN_OBJ *=/s/@[^@\n]*@// | |
156 | /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// | |
157 | /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// | |
2f097256 | 158 | /^GNUSTEP_CFLAGS *=/s/@GNUSTEP_CFLAGS@// |
9d9ce659 | 159 | /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// |
bf6b4923 | 160 | /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// |
ec041b55 PE |
161 | /^GNULIB_WARN_CFLAGS *=/s/@GNULIB_WARN_CFLAGS@// |
162 | /^WARN_CFLAGS *=/s/@WARN_CFLAGS@// | |
163 | /^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// | |
cf38a720 | 164 | /^DEFS *=/s/@[^@\n]*@// |
9d9ce659 EZ |
165 | /^DEPDIR *=/s/@[^@\n]*@/deps/ |
166 | /^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/ | |
167 | /^ECHO_N *=/s/@[^@\n]*@/-n/ | |
168 | /^EXEEXT *=/s/@[^@\n]*@/.exe/ | |
b3cf17f6 | 169 | /^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ |
9d9ce659 | 170 | /^GETOPT_H *=/s/@[^@\n]*@/getopt.h/ |
003fa8b6 EZ |
171 | # |
172 | # Gnulib stuff | |
173 | /^BITSIZEOF_PTRDIFF_T *=/s/@BITSIZEOF_PTRDIFF_T@/32/ | |
174 | /^BITSIZEOF_SIG_ATOMIC_T *=/s/@BITSIZEOF_SIG_ATOMIC_T@/32/ | |
175 | /^BITSIZEOF_SIZE_T *=/s/@BITSIZEOF_SIZE_T@/32/ | |
176 | /^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/ | |
177 | /^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/ | |
ea2bc7b0 | 178 | /^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/ |
9d9ce659 | 179 | # |
bf6b4923 | 180 | # Most GNULIB_* are replaced with zero even though DJGPP does not have |
9d9ce659 EZ |
181 | # these features. That's because the gnulib replacements cannot |
182 | # possibly work for DJGPP, so we prefer to fail the link than have a | |
bf6b4923 EZ |
183 | # subtly botched executable. Those replacements that _are_ needed |
184 | # should be before the last catch-all rule. | |
9d9ce659 | 185 | /^GNULIB_ATOLL *=/s/@GNULIB_ATOLL@/1/ |
9d9ce659 | 186 | /^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ |
b3cf17f6 | 187 | /^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/1/ |
bf6b4923 | 188 | /^GNULIB_FDATASYNC *=/s/@GNULIB_FDATASYNC@/1/ |
9d9ce659 | 189 | /^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ |
42a53d84 | 190 | /^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ |
bf6b4923 EZ |
191 | /^GNULIB_MEMRCHR *=/s/@GNULIB_MEMRCHR@/1/ |
192 | /^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/1/ | |
9d9ce659 | 193 | /^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ |
9d9ce659 | 194 | /^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ |
bf6b4923 | 195 | /^GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ |
31bed486 EZ |
196 | /^GSETTINGS_CFLAGS *=/s/@[^@\n]*@// |
197 | /^GSETTINGS_LIBS *=/s/@[^@\n]*@// | |
bf6b4923 EZ |
198 | # |
199 | # Edit the HAVE_foo variables | |
9d9ce659 | 200 | /^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ |
9d9ce659 | 201 | /^HAVE_CHOWN *=/s/@HAVE_CHOWN@/1/ |
bf6b4923 | 202 | /^HAVE_CLOSEDIR *=/s/@HAVE_CLOSEDIR@/1/ |
9d9ce659 | 203 | /^HAVE_DECL_GETPAGESIZE *=/s/@HAVE_DECL_GETPAGESIZE@/1/ |
9d9ce659 | 204 | /^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ |
bf6b4923 EZ |
205 | /^HAVE_DECL_STRDUP *=/s/@HAVE_DECL_STRDUP@/1/ |
206 | # The following two rely on msdos/inttypes.h redirections | |
207 | /^HAVE_DECL_STRTOIMAX *=/s/@HAVE_DECL_STRTOIMAX@/1/ | |
208 | /^HAVE_DECL_STRTOUMAX *=/s/@HAVE_DECL_STRTOUMAX@/1/ | |
209 | /^HAVE_DIRENT_H *=/s/@HAVE_DIRENT_H@/1/ | |
9d9ce659 | 210 | /^HAVE_DUP2 *=/s/@HAVE_DUP2@/1/ |
9d9ce659 EZ |
211 | /^HAVE_FSYNC *=/s/@HAVE_FSYNC@/1/ |
212 | /^HAVE_FTRUNCATE *=/s/@HAVE_FTRUNCATE@/1/ | |
9d9ce659 EZ |
213 | /^HAVE_GETHOSTNAME *=/s/@HAVE_GETHOSTNAME@/1/ |
214 | /^HAVE_GETLOGIN *=/s/@HAVE_GETLOGIN@/1/ | |
9d9ce659 | 215 | /^HAVE_GETPAGESIZE *=/s/@HAVE_GETPAGESIZE@/1/ |
003fa8b6 | 216 | /^HAVE_INTTYPES_H *=/s/@HAVE_INTTYPES_H@/HAVE_INTTYPES_H/ |
9d9ce659 | 217 | /^HAVE_LINK *=/s/@HAVE_LINK@/1/ |
003fa8b6 EZ |
218 | /^HAVE_LONG_LONG_INT *=/s/@HAVE_LONG_LONG_INT@/1/ |
219 | /^HAVE_LSTAT *=/s/@HAVE_LSTAT@/HAVE_LSTAT/ | |
9d9ce659 | 220 | /^HAVE_MAKEINFO *=/s/@HAVE_MAKEINFO@/yes/ |
bf6b4923 | 221 | /^HAVE_MEMCHR *=/s/@HAVE_MEMCHR@/1/ |
003fa8b6 | 222 | /^HAVE_MKFIFO *=/s/@HAVE_MKFIFO@/1/ |
003fa8b6 | 223 | /^HAVE_MKNOD *=/s/@HAVE_MKNOD@/1/ |
9d9ce659 | 224 | /^HAVE_MKSTEMP *=/s/@HAVE_MKSTEMP@/1/ |
bf6b4923 | 225 | /^HAVE_OPENDIR *=/s/@HAVE_OPENDIR@/1/ |
31bed486 | 226 | /^HAVE_PCLOSE *=/s/@HAVE_PCLOSE@/1/ |
31bed486 EZ |
227 | /^HAVE_POPEN *=/s/@HAVE_POPEN@/1/ |
228 | /^HAVE_POSIX_SIGNALBLOCKING *=/s/@HAVE_POSIX_SIGNALBLOCKING@/1/ | |
9d9ce659 | 229 | /^HAVE_RANDOM_H *=/s/@HAVE_RANDOM_H@/1/ |
31bed486 | 230 | /^HAVE_RAISE *=/s/@HAVE_RAISE@/1/ |
42a53d84 | 231 | /^HAVE_RANDOM *=/s/@HAVE_RANDOM@/1/ |
bf6b4923 EZ |
232 | /^HAVE_READDIR *=/s/@HAVE_READDIR@/1/ |
233 | /^HAVE_REWINDDIR *=/s/@HAVE_REWINDDIR@/1/ | |
9d9ce659 | 234 | /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ |
31bed486 | 235 | /^HAVE_SIGACTION *=/s/@HAVE_SIGACTION@/1/ |
003fa8b6 | 236 | /^HAVE_SIGNED_SIG_ATOMIC_T *=/s/@HAVE_SIGNED_SIG_ATOMIC_T@/1/ |
003fa8b6 | 237 | /^HAVE_SIGNED_WINT_T *=/s/@HAVE_SIGNED_WINT_T@/1/ |
31bed486 | 238 | /^HAVE_SIGSET_T *=/s/@HAVE_SIGSET_T@/1/ |
9d9ce659 | 239 | /^HAVE_SLEEP *=/s/@HAVE_SLEEP@/1/ |
003fa8b6 | 240 | /^HAVE_STDINT_H *=/s/@HAVE_STDINT_H@/HAVE_STDINT_H/ |
bf6b4923 EZ |
241 | /^HAVE_STRPBRK *=/s/@HAVE_STRPBRK@/1/ |
242 | /^HAVE_STRSEP *=/s/@HAVE_STRSEP@/1/ | |
9d9ce659 EZ |
243 | /^HAVE_STRTOD *=/s/@HAVE_STRTOD@/1/ |
244 | /^HAVE_STRTOLL *=/s/@HAVE_STRTOLL@/1/ | |
245 | /^HAVE_STRTOULL *=/s/@HAVE_STRTOULL@/1/ | |
0d23c240 | 246 | /^HAVE_STRUCT_TIMEVAL *=/s/@HAVE_STRUCT_TIMEVAL@/1/ |
9d9ce659 | 247 | /^HAVE_SYMLINK *=/s/@HAVE_SYMLINK@/1/ |
9d9ce659 | 248 | /^HAVE_SYS_PARAM_H *=/s/@HAVE_SYS_PARAM_H@/1/ |
0d23c240 | 249 | /^HAVE_SYS_TIME_H *=/s/@HAVE_SYS_TIME_H@/1/ |
003fa8b6 | 250 | /^HAVE_SYS_TYPES_H *=/s/@HAVE_SYS_TYPES_H@/1/ |
31bed486 | 251 | /^HAVE_TYPE_VOLATILE_SIG_ATOMIC_T *=/s/@HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@/1/ |
9d9ce659 | 252 | /^HAVE_UNISTD_H *=/s/@HAVE_UNISTD_H@/1/ |
003fa8b6 | 253 | /^HAVE_UNSIGNED_LONG_LONG_INT *=/s/@HAVE_UNSIGNED_LONG_LONG_INT@/1/ |
9d9ce659 | 254 | /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ |
003fa8b6 | 255 | /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ |
9d9ce659 | 256 | /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ |
9d9ce659 EZ |
257 | /^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ |
258 | /^HAVE__EXIT *=/s/@HAVE__EXIT@/1/ | |
bf6b4923 | 259 | /^HAVE_[^ =]* *= *@/s/@[^@\n]*@/0/ |
9d9ce659 EZ |
260 | /^INCLUDE_NEXT *=/s/@INCLUDE_NEXT@/include_next/ |
261 | /^INCLUDE_NEXT_AS_FIRST_DIRECTIVE *=/s/@[^@\n]*@/include_next/ | |
262 | /^LDFLAGS *=/s/@[^@\n]*@// | |
263 | /^LD_FIRSTFLAG *=/s/@[^@\n]*@// | |
31bed486 EZ |
264 | /^LIB_PTHREAD *=/s/@[^@\n]*@// |
265 | /^LIB_PTHREAD_SIGMASK *=/s/@[^@\n]*@// | |
9d9ce659 EZ |
266 | /^LIBS *=/s/@[^@\n]*@// |
267 | /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ | |
003fa8b6 EZ |
268 | # MKDIR_P lines are edited further below |
269 | /^MKDIR_P *=/s/@MKDIR_P@// | |
bf6b4923 EZ |
270 | /^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/ |
271 | /^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@// | |
272 | /^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/ | |
9d9ce659 | 273 | /^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ |
31bed486 | 274 | /^NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H *=/s/@[^@\n]*@/<signal.h>/ |
75c0d28a | 275 | /^NEXT_AS_FIRST_DIRECTIVE_STDARG_H *=/s/@[^@\n]*@// |
9d9ce659 | 276 | /^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H *=/s/@[^@\n]*@// |
003fa8b6 | 277 | /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ |
f4d87671 | 278 | /^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/ |
9d9ce659 | 279 | /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ |
bf6b4923 | 280 | /^NEXT_AS_FIRST_DIRECTIVE_STRING_H *=/s/@[^@\n]*@/<string.h>/ |
0d23c240 | 281 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H *=/s/@[^@\n]*@// |
003fa8b6 | 282 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! |
0d23c240 | 283 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H *=/s/@[^@\n]*@// |
42a53d84 | 284 | /^NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H *=/s!@[^@\n]*@!<sys/types.h>! |
9d9ce659 EZ |
285 | /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@/<time.h>/ |
286 | /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@/<unistd.h>/ | |
bf6b4923 EZ |
287 | /^NEXT_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/ |
288 | /^NEXT_ERRNO_H *=/s/@[^@\n]*@// | |
289 | /^NEXT_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/ | |
9d9ce659 | 290 | /^NEXT_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/ |
75c0d28a | 291 | /^NEXT_STDARG_H *=/s/@[^@\n]*@// |
31bed486 | 292 | /^NEXT_SIGNAL_H *=/s/@[^@\n]*@/<signal.h>/ |
9d9ce659 | 293 | /^NEXT_STDDEF_H *=/s/@[^@\n]*@// |
f4d87671 | 294 | /^NEXT_STDIO_H *=/s/@[^@\n]*@/<stdio.h>/ |
003fa8b6 | 295 | /^NEXT_STDINT_H *=/s/@[^@\n]*@/<stdint.h>/ |
9d9ce659 | 296 | /^NEXT_STDLIB_H *=/s/@[^@\n]*@/<stdlib.h>/ |
bf6b4923 | 297 | /^NEXT_STRING_H *=/s/@[^@\n]*@/<string.h>/ |
0d23c240 | 298 | /^NEXT_SYS_SELECT_H *=/s/@[^@\n]*@// |
003fa8b6 | 299 | /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!<sys/stat.h>! |
0d23c240 | 300 | /^NEXT_SYS_TIME_H *=/s/@[^@\n]*@// |
42a53d84 | 301 | /^NEXT_SYS_TYPES_H *=/s!@[^@\n]*@!<sys/types.h>! |
9d9ce659 EZ |
302 | /^NEXT_TIME_H *=/s/@[^@\n]*@/<time.h>/ |
303 | /^NEXT_UNISTD_H *=/s/@[^@\n]*@/<unistd.h>/ | |
304 | /^OBJEXT *=/s/@[^@\n]*@/o/ | |
305 | /^PRAGMA_COLUMNS *=/s/@[^@\n]*@// | |
27087453 | 306 | /^PRAGMA_SYSTEM_HEADER *=/s/@[^@\n]*@/\\\#pragma GCC system_header/ |
9d9ce659 | 307 | /^PTHREAD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ |
2c631e0e | 308 | /^PTRDIFF_T_SUFFIX *=/s/@[^@\n]*@// |
9d9ce659 | 309 | /^RANLIB *=/s/@[^@\n]*@/ranlib/ |
bf6b4923 EZ |
310 | # We never want any gnulib replacement functions |
311 | /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ | |
003fa8b6 EZ |
312 | /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// |
313 | /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ | |
31bed486 | 314 | /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ |
bf6b4923 EZ |
315 | /^BYTESWAP_H *=/s/@[^@\n]*@/byteswap.h/ |
316 | /^DIRENT_H *=/s/@[^@\n]*@// | |
317 | /^ERRNO_H *=/s/@[^@\n]*@// | |
9d9ce659 | 318 | /^STDBOOL_H *=/s/@[^@\n]*@// |
42a53d84 | 319 | /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ |
75c0d28a | 320 | /^STDARG_H *=/s/@[^@\n]*@// |
9d9ce659 | 321 | /^STDDEF_H *=/s/@[^@\n]*@// |
003fa8b6 | 322 | /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ |
9d9ce659 EZ |
323 | /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ |
324 | /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ | |
325 | /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ | |
326 | /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ | |
bf6b4923 | 327 | /^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/ |
003fa8b6 EZ |
328 | /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ |
329 | /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// | |
42a53d84 EZ |
330 | /^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/ |
331 | /^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/ | |
bf6b4923 EZ |
332 | # Tailor lists of files to what we need |
333 | /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ | |
75c0d28a | 334 | /am__append_2 *=.*verify\.h/s/@[^@\n]*@// |
bf6b4923 EZ |
335 | /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// |
336 | /^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o/ | |
337 | /^am__append_[1-9][0-9]* *=/,/^[^ ]/{ | |
338 | s/ *inttypes\.h// | |
0d23c240 EZ |
339 | s| *sys/select\.h|| |
340 | s| *sys/time\.h|| | |
341 | } | |
97147da9 EZ |
342 | /^am_libgnu_a_OBJECTS *=/,/^[^ ]/{ |
343 | s/allocator\.\$(OBJEXT) // | |
bf6b4923 | 344 | s/binary-io\.\$(OBJEXT) // |
5a1131d9 | 345 | s/careadlinkat\.\$(OBJEXT) // |
bf6b4923 EZ |
346 | s/pipe2\.\$(OBJEXT) // |
347 | s/acl-errno-valid\.\$(OBJEXT) // | |
348 | s/file-has-acl\.\$(OBJEXT) // | |
349 | s/qcopy-acl\.\$(OBJEXT) // | |
350 | s/qset-acl\.\$(OBJEXT) // | |
351 | s/openat-die\.\$(OBJEXT) // | |
352 | s/save-cwd\.\$(OBJEXT) // | |
5a1131d9 | 353 | } |
9d9ce659 EZ |
354 | /^srcdir *=/s/@[^@\n]*@/./ |
355 | /^top_srcdir *=/s/@[^@\n]*@/../ | |
27087453 EZ |
356 | /^top_builddir *=/s/@[^@\n]*@/../ |
357 | s/@PRAGMA_SYSTEM_HEADER@/\#pragma GCC system_header/ | |
358 | s/@PRAGMA_COLUMNS@// | |
9d9ce659 EZ |
359 | # |
360 | # Delete the recipes we don't want to get in our way. | |
361 | /^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d | |
27087453 | 362 | /^Makefile:/,/^[ ][ ]*esac/d |
bf6b4923 | 363 | /^\$(top_srcdir)\/configure:/,/^\$(am__aclocal_m4_deps):/d |
7c106b1e EZ |
364 | /^\$(top_builddir)\/config.status:/,/^$/d |
365 | # | |
366 | # Remove the dependencies on $(top_builddir)/config.status | |
367 | s/ $(top_builddir)\/config.status// | |
9d9ce659 EZ |
368 | # |
369 | # Fix the include-dependency lines | |
370 | s/^@AMDEP_TRUE@// | |
371 | s/^@AMDEP_FALSE@/\#/ | |
372 | s/@am__include@/include/ | |
373 | s/@am__quote@//g | |
374 | s/^@am__fastdepCC_TRUE@// | |
7c106b1e | 375 | s/^@am__fastdepCC_FALSE@/\#/ |
9d9ce659 EZ |
376 | # |
377 | # Fix the *-clean rules, to not use a Unixy `test' command. Empty | |
378 | # lists are replaced with a dummy file, to avoid an error message from | |
379 | # "rm -f" with no arguments. | |
bf6b4923 EZ |
380 | /^CLEANFILES *= *$/c\ |
381 | CLEANFILES = xyzzy | |
9d9ce659 EZ |
382 | /^CONFIG_CLEAN_FILES *= *$/c\ |
383 | CONFIG_CLEAN_FILES = xyzzy | |
384 | /^CONFIG_CLEAN_VPATH_FILES *= *$/c\ | |
385 | CONFIG_CLEAN_VPATH_FILES = xyzzy | |
219463da | 386 | s/^ -*test -z.*|| rm/ -rm/ |
bf6b4923 | 387 | s/@echo /@djecho / |
9d9ce659 EZ |
388 | # |
389 | # Fix the recipes for header files | |
31bed486 EZ |
390 | s/^@GL_GENERATE_ALLOCA_H_TRUE@// |
391 | s/^@GL_GENERATE_ALLOCA_H_FALSE@/\#/ | |
bf6b4923 EZ |
392 | s/^@GL_GENERATE_BYTESWAP_H_TRUE@// |
393 | s/^@GL_GENERATE_BYTESWAP_H_FALSE@/\#/ | |
394 | s/^@GL_GENERATE_ERRNO_H_TRUE@/\#/ | |
395 | s/^@GL_GENERATE_ERRNO_H_FALSE@// | |
b3cf17f6 EZ |
396 | s/^@GL_GENERATE_EXECINFO_H_TRUE@// |
397 | s/^@GL_GENERATE_EXECINFO_H_FALSE@/\#/ | |
7c106b1e EZ |
398 | s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/ |
399 | s/^@GL_GENERATE_STDBOOL_H_FALSE@// | |
e32a5799 PE |
400 | s/^@GL_GENERATE_STDALIGN_H_TRUE@// |
401 | s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ | |
75c0d28a EZ |
402 | s/^@GL_GENERATE_STDARG_H_TRUE@/\#/ |
403 | s/^@GL_GENERATE_STDARG_H_FALSE@/\#/ | |
7c106b1e | 404 | s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/ |
75c0d28a | 405 | s/^@GL_GENERATE_STDDEF_H_FALSE@/\#/ |
7c106b1e EZ |
406 | s/^@GL_GENERATE_STDINT_H_TRUE@// |
407 | s/^@GL_GENERATE_STDINT_H_FALSE@/\#/ | |
42a53d84 EZ |
408 | s/^@GL_GENERATE_STDALIGN_H_TRUE@// |
409 | s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ | |
9d9ce659 | 410 | /^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ |
24e0f6b1 PE |
411 | arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\ |
412 | sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@ | |
9d9ce659 | 413 | /^cxxdefs\.h:/,/^[ ][ ]*mv /c\ |
24e0f6b1 PE |
414 | cxxdefs.h: $(top_srcdir)/build-aux/snippet/cxxdefs.h\ |
415 | sed -n -e '/_GL_CXXDEFS/,$$p' < $(top_srcdir)/build-aux/snippet/cxxdefs.h > $@ | |
31bed486 EZ |
416 | /^warn-on-use\.h:/,/^[ ][ ]*mv /c\ |
417 | warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h\ | |
418 | sed -n -e '/^.ifndef/,$$p' < $(top_srcdir)/build-aux/snippet/warn-on-use.h > $@ | |
9d9ce659 | 419 | s/^ [ ]*{ echo \(.*\); \\/ djecho \1 > $@-t/ |
27087453 | 420 | s/^ [ ]*{ echo \(.*\) && \\/ djecho \1 > $@-t/ |
42a53d84 | 421 | s/^ [ ]*cat \(.*\); \\/ sed -e '' \1 >> $@-t/ |
27087453 | 422 | s/ \&\& \\ *$// |
9d9ce659 EZ |
423 | s/\.in-h\; *\\$/.in-h >> $@-t/ |
424 | /^ [ ]*} /d | |
07da4b3c EZ |
425 | /^stdio\.h:/,/^ [ ]*mv /{ |
426 | s/'\; \\ *$/' >> $@-t/ | |
427 | } | |
9d9ce659 EZ |
428 | /^stdlib\.h:/,/^ [ ]*mv /{ |
429 | s/'\; \\ *$/' >> $@-t/ | |
430 | } | |
431 | /^unistd\.h:/,/^ [ ]*mv /{ | |
432 | s/'\; \\ *$/' >> $@-t/ | |
433 | } | |
bf6b4923 EZ |
434 | /^string\.h:/,/^ [ ]*mv /{ |
435 | s/'\; \\ *$/' >> $@-t/ | |
436 | /< \$(srcdir)\/string\.in-h >>/d | |
437 | } | |
f4d87671 | 438 | s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\\stat.h md sys"! |
0d23c240 EZ |
439 | /^ @for dir in/,/^[^ ]/c\ |
440 | -rm -rf $(MOSTLYCLEANDIRS) | |
441 | /^ *-test . /d | |
bf6b4923 EZ |
442 | # |
443 | # Fix the Automake verbosity stuff | |
444 | /^ *\$(AM_V_at)/s/\$(AM_V_at)// | |
445 | /^ *\$(AM_V_AR)/s/\$(AM_V_AR)// | |
446 | /^ *\$(AM_V_CC)/s/\$(AM_V_CC)// |