* sysdep.c (get_child_status): Abort on internal error (Bug#13086).
[bpt/emacs.git] / lib / makefile.w32-in
CommitLineData
b46a6a83 1# -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
837b365b 2# Copyright (C) 2011-2012 Free Software Foundation, Inc.
f915f0f7
EZ
3
4# This file is part of GNU Emacs.
5
6# GNU Emacs is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10
11# GNU Emacs is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15
16# You should have received a copy of the GNU General Public License
17# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
18
19ALL = gnulib
20
21.PHONY: $(ALL)
22
cf38a720 23LOCAL_FLAGS = -I. -I../nt/inc -I../src
f915f0f7
EZ
24LIBS =
25
07adc2c6
JB
26GNULIBOBJS = $(BLD)/c-ctype.$(O) \
27 $(BLD)/c-strcasecmp.$(O) \
28 $(BLD)/c-strncasecmp.$(O) \
3a7089c1 29 $(BLD)/close-stream.$(O) \
07adc2c6 30 $(BLD)/dtoastr.$(O) \
388cdec0 31 $(BLD)/dtotimespec.$(O) \
391ceac5 32 $(BLD)/execinfo.$(O) \
3a7089c1 33 $(BLD)/fpending.$(O) \
70b0d280
EZ
34 $(BLD)/getopt.$(O) \
35 $(BLD)/getopt1.$(O) \
388cdec0 36 $(BLD)/gettime.$(O) \
70b0d280 37 $(BLD)/strftime.$(O) \
32159fc3 38 $(BLD)/time_r.$(O) \
388cdec0
EZ
39 $(BLD)/timespec-add.$(O) \
40 $(BLD)/timespec-sub.$(O) \
25c51af3 41 $(BLD)/md5.$(O) \
13c3daa4 42 $(BLD)/sha1.$(O) \
3ce9d0d4
LL
43 $(BLD)/sha256.$(O) \
44 $(BLD)/sha512.$(O) \
fddc1855
EZ
45 $(BLD)/stat-time.$(O) \
46 $(BLD)/timespec.$(O) \
47 $(BLD)/u64.$(O) \
973f782d 48 $(BLD)/filemode.$(O)
f915f0f7
EZ
49
50#
51# Build the library
52#
53$(BLD)/libgnu.$(A): $(GNULIBOBJS)
54 - $(DEL) $@
55 $(AR) $(AR_OUT)$@ $(ALL_DEPS)
56
d67a9a85 57gnulib: $(BLD)/libgnu.$(A)
f915f0f7
EZ
58
59#
60# Build everything
61#
d67a9a85 62all: $(ALL)
f915f0f7
EZ
63
64### TAGS ###
65
a6fc3b5c
EZ
66FRC:
67
68TAGS: FRC
f915f0f7
EZ
69 ../lib-src/$(BLD)/etags.exe *.c *.h
70
71### DEPENDENCIES ###
72
73EMACS_ROOT = ..
52331d2c
JB
74GNU_LIB = .
75SRC = $(EMACS_ROOT)/src
76NT_INC = $(EMACS_ROOT)/nt/inc
77
78C_CTYPE_H = $(GNU_LIB)/c-ctype.h \
79 $(NT_INC)/stdbool.h
837b365b 80MS_W32_H = $(NT_INC)/ms-w32.h \
52331d2c 81 $(NT_INC)/sys/stat.h
552a99b4 82CONF_POST_H = $(SRC)/conf_post.h \
52331d2c 83 $(MS_W32_H)
552a99b4
JB
84CONFIG_H = $(SRC)/config.h \
85 $(CONF_POST_H)
52331d2c
JB
86FILEMODE_H = $(GNU_LIB)/filemode.h \
87 $(NT_INC)/sys/stat.h
88FTOASTR_H = $(GNU_LIB)/ftoastr.h \
89 $(GNU_LIB)/intprops.h
90FTOASTR_C = $(GNU_LIB)/ftoastr.c \
91 $(CONFIG_H) \
57239922 92 $(FTOASTR_H)
52331d2c
JB
93GETOPT_INT_H = $(GNU_LIB)/getopt_int.h \
94 $(GNU_LIB)/getopt.h
95MD5_H = $(GNU_LIB)/md5.h \
96 $(NT_INC)/stdint.h
97SHA1_H = $(GNU_LIB)/sha1.h \
98 $(NT_INC)/stdint.h
99SHA256_H = $(GNU_LIB)/sha256.h \
100 $(NT_INC)/stdint.h
101U64_H = $(GNU_LIB)/u64.h \
102 $(NT_INC)/stdint.h
103SHA512_H = $(GNU_LIB)/sha512.h \
fddc1855 104 $(U64_H)
57239922
JB
105STAT_TIME_H = $(GNU_LIB)/stat-time.h \
106 $(NT_INC)/sys/stat.h
f915f0f7 107
07adc2c6 108$(BLD)/c-ctype.$(O) : \
52331d2c
JB
109 $(GNU_LIB)/c-ctype.c \
110 $(CONFIG_H) \
111 $(C_CTYPE_H)
07adc2c6
JB
112
113$(BLD)/c-strcasecmp.$(O) : \
52331d2c
JB
114 $(GNU_LIB)/c-strcasecmp.c \
115 $(GNU_LIB)/c-strcase.h \
116 $(CONFIG_H) \
117 $(C_CTYPE_H)
07adc2c6 118
39661382
JB
119$(BLD)/c-strncasecmp.$(O) : \
120 $(GNU_LIB)/c-strncasecmp.c \
121 $(GNU_LIB)/c-strcase.h \
122 $(CONFIG_H) \
123 $(C_CTYPE_H)
124
3a7089c1
EZ
125$(BLD)/close-stream.$(O) : \
126 $(GNU_LIB)/close-stream.c \
127 $(GNU_LIB)/close-stream.h \
128 $(GNU_LIB)/fpending.h \
129 $(NT_INC)/stdbool.h \
130 $(CONFIG_H)
131
f915f0f7 132$(BLD)/dtoastr.$(O) : \
52331d2c
JB
133 $(GNU_LIB)/dtoastr.c \
134 $(FTOASTR_C)
f915f0f7 135
388cdec0 136$(BLD)/dtotimespec.$(O) : \
52331d2c
JB
137 $(GNU_LIB)/dtotimespec.c \
138 $(GNU_LIB)/intprops.h \
139 $(GNU_LIB)/timespec.h \
140 $(CONFIG_H)
388cdec0 141
391ceac5 142$(BLD)/execinfo.$(O) : \
f0602979
JB
143 $(GNU_LIB)/execinfo.c \
144 $(GNU_LIB)/execinfo.h \
145 $(CONFIG_H)
391ceac5 146
3a7089c1
EZ
147$(BLD)/fpending.$(O) : \
148 $(GNU_LIB)/fpending.c \
149 $(GNU_LIB)/fpending.h \
150 $(CONFIG_H)
151
f915f0f7 152$(BLD)/getopt.$(O) : \
52331d2c
JB
153 $(GNU_LIB)/getopt.c \
154 $(GNU_LIB)/getopt.h \
155 $(GNU_LIB)/gettext.h \
156 $(NT_INC)/unistd.h \
157 $(CONFIG_H) \
158 $(GETOPT_INT_H)
f915f0f7
EZ
159
160$(BLD)/getopt1.$(O) : \
52331d2c
JB
161 $(GNU_LIB)/getopt1.c \
162 $(GNU_LIB)/getopt.h \
163 $(CONFIG_H) \
164 $(GETOPT_INT_H)
f915f0f7 165
388cdec0 166$(BLD)/gettime.$(O) : \
52331d2c
JB
167 $(GNU_LIB)/gettime.c \
168 $(GNU_LIB)/timespec.h \
169 $(NT_INC)/sys/time.h \
170 $(CONFIG_H)
388cdec0 171
70b0d280 172$(BLD)/strftime.$(O) : \
52331d2c
JB
173 $(GNU_LIB)/strftime.c \
174 $(GNU_LIB)/strftime.h \
175 $(NT_INC)/stdbool.h \
176 $(CONFIG_H)
70b0d280
EZ
177
178$(BLD)/time_r.$(O) : \
52331d2c
JB
179 $(GNU_LIB)/time_r.c \
180 $(CONFIG_H)
70b0d280 181
388cdec0 182$(BLD)/timespec-add.$(O) : \
52331d2c
JB
183 $(GNU_LIB)/timespec-add.c \
184 $(GNU_LIB)/intprops.h \
185 $(GNU_LIB)/timespec.h \
186 $(CONFIG_H)
388cdec0
EZ
187
188$(BLD)/timespec-sub.$(O) : \
52331d2c
JB
189 $(GNU_LIB)/timespec-sub.c \
190 $(GNU_LIB)/intprops.h \
191 $(GNU_LIB)/timespec.h \
192 $(CONFIG_H)
388cdec0 193
32159fc3 194$(BLD)/md5.$(O) : \
52331d2c
JB
195 $(GNU_LIB)/md5.c \
196 $(NT_INC)/stdalign.h \
197 $(NT_INC)/stdint.h \
198 $(CONFIG_H) \
199 $(MD5_H)
25c51af3 200
13c3daa4 201$(BLD)/sha1.$(O) : \
52331d2c
JB
202 $(GNU_LIB)/sha1.c \
203 $(NT_INC)/stdalign.h \
204 $(NT_INC)/stdint.h \
205 $(CONFIG_H) \
206 $(SHA1_H)
13c3daa4 207
3ce9d0d4 208$(BLD)/sha256.$(O) : \
52331d2c
JB
209 $(GNU_LIB)/sha256.c \
210 $(NT_INC)/stdalign.h \
211 $(NT_INC)/stdint.h \
212 $(CONFIG_H) \
213 $(SHA256_H)
3ce9d0d4
LL
214
215$(BLD)/sha512.$(O) : \
52331d2c
JB
216 $(GNU_LIB)/sha512.c \
217 $(NT_INC)/stdalign.h \
218 $(NT_INC)/stdint.h \
219 $(CONFIG_H) \
220 $(SHA512_H)
3ce9d0d4 221
fddc1855 222$(BLD)/stat-time.$(O) : \
57239922
JB
223 $(GNU_LIB)/stat-time.c \
224 $(CONFIG_H) \
225 $(STAT_TIME_H)
fddc1855
EZ
226
227$(BLD)/timespec.$(O) : \
57239922 228 $(GNU_LIB)/timespec.c \
fddc1855
EZ
229 $(GNU_LIB)/timespec.h \
230 $(CONFIG_H)
231
232$(BLD)/u64.$(O) : \
57239922
JB
233 $(GNU_LIB)/u64.c \
234 $(CONFIG_H) \
235 $(U64_H)
fddc1855 236
25c51af3 237$(BLD)/filemode.$(O) : \
52331d2c
JB
238 $(GNU_LIB)/filemode.c \
239 $(CONFIG_H) \
240 $(FILEMODE_H)
32159fc3 241
f915f0f7
EZ
242# The following dependencies are for supporting parallel builds, where
243# we must make sure $(BLD) exists before any compilation starts.
244#
cc06e7e7 245$(GNULIBOBJS): stamp_BLD
f915f0f7
EZ
246
247#
248# Headers we would preprocess if we could.
249#
250getopt.h: getopt_.h
251 $(CP) $(ALL_DEPS) $@
252
253#
254# Maintenance
255#
256clean:
257 - $(DEL) $(COMPILER_TEMP_FILES)
258 - $(DEL) getopt.h
259 - $(DEL_TREE) $(OBJDIR)
260 - $(DEL) stamp_BLD
261
262distclean: cleanall
263 - $(DEL) TAGS
264 - $(DEL) Makefile
265
266maintainer-clean: distclean
267 - $(DEL) getopt_.h
268
269cleanall: clean
270 - $(DEL_TREE) obj
271 - $(DEL_TREE) obj-spd
272 - $(DEL_TREE) oo
273 - $(DEL_TREE) oo-spd
274
275# A dummy target to force other targets to be evaluated.
276doit:
277
278getopt_.h: getopt.in.h $(ARG_NONNULL_H)
279 $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE)
280
281getopt_.h-CMD: doit
282 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
283 @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory.
284 @echo You will need GNU Sed to be installed.
285 exit -1
286
287getopt_.h-SH: doit
288 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
289 @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory.
290 @echo You will need GNU Sed to be installed.
291 exit -1
292
293# Generating getopt_.h from getopt.in.h.
294#
295# To avoid requiring all end users to install Sed, we have below
296# a maintainer-only target that produces getopt_.h from getopt.in.h.
297# For easier maintenance, all the strings that replace the @FOO@
298# placeholder are defined as Make macros below.
299
300HAVE_GETOPT_H = HAVE_GETOPT_H
301INCLUDE_NEXT = include_next
f915f0f7
EZ
302PRAGMA_COLUMNS =
303NEXT_GETOPT_H = <getopt.h>
24e0f6b1 304ARG_NONNULL_H = ../build-aux/snippet/arg-nonnull.h
f915f0f7
EZ
305
306getopt_h:
307 - $(DEL) getopt_.h-t getopt_.h
6a3e57bb
PE
308 sed -e "s!@GUARD_PREFIX@!GL!g" \
309 -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \
f915f0f7
EZ
310 -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \
311 -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \
312 -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \
313 -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \
314 -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \
315 -e "/^\# include_next/i # ifndef __GNUC__" \
316 -e "/^\# include_next/i # include <next_getopt.h>" \
317 -e "/^\# include_next/i # else" \
318 -e "/^\# include_next/a # endif" \
319 < getopt.in.h > getopt_.h-t
320 $(CP) getopt_.h-t getopt_.h
321 - $(DEL) getopt_.h-t
391ceac5
EZ
322
323execinfo.h: execinfo.in.h
324 $(CP) execinfo.in.h $@
325