* emacs.c (fatal_error_signal_hook): Remove.
[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) \
29 $(BLD)/dtoastr.$(O) \
388cdec0 30 $(BLD)/dtotimespec.$(O) \
391ceac5 31 $(BLD)/execinfo.$(O) \
70b0d280
EZ
32 $(BLD)/getopt.$(O) \
33 $(BLD)/getopt1.$(O) \
388cdec0 34 $(BLD)/gettime.$(O) \
70b0d280 35 $(BLD)/strftime.$(O) \
32159fc3 36 $(BLD)/time_r.$(O) \
388cdec0
EZ
37 $(BLD)/timespec-add.$(O) \
38 $(BLD)/timespec-sub.$(O) \
25c51af3 39 $(BLD)/md5.$(O) \
13c3daa4 40 $(BLD)/sha1.$(O) \
3ce9d0d4
LL
41 $(BLD)/sha256.$(O) \
42 $(BLD)/sha512.$(O) \
fddc1855
EZ
43 $(BLD)/stat-time.$(O) \
44 $(BLD)/timespec.$(O) \
45 $(BLD)/u64.$(O) \
973f782d 46 $(BLD)/filemode.$(O)
f915f0f7
EZ
47
48#
49# Build the library
50#
51$(BLD)/libgnu.$(A): $(GNULIBOBJS)
52 - $(DEL) $@
53 $(AR) $(AR_OUT)$@ $(ALL_DEPS)
54
d67a9a85 55gnulib: $(BLD)/libgnu.$(A)
f915f0f7
EZ
56
57#
58# Build everything
59#
d67a9a85 60all: $(ALL)
f915f0f7
EZ
61
62### TAGS ###
63
a6fc3b5c
EZ
64FRC:
65
66TAGS: FRC
f915f0f7
EZ
67 ../lib-src/$(BLD)/etags.exe *.c *.h
68
69### DEPENDENCIES ###
70
71EMACS_ROOT = ..
52331d2c
JB
72GNU_LIB = .
73SRC = $(EMACS_ROOT)/src
74NT_INC = $(EMACS_ROOT)/nt/inc
75
76C_CTYPE_H = $(GNU_LIB)/c-ctype.h \
77 $(NT_INC)/stdbool.h
837b365b 78MS_W32_H = $(NT_INC)/ms-w32.h \
52331d2c 79 $(NT_INC)/sys/stat.h
552a99b4 80CONF_POST_H = $(SRC)/conf_post.h \
52331d2c 81 $(MS_W32_H)
552a99b4
JB
82CONFIG_H = $(SRC)/config.h \
83 $(CONF_POST_H)
52331d2c
JB
84FILEMODE_H = $(GNU_LIB)/filemode.h \
85 $(NT_INC)/sys/stat.h
86FTOASTR_H = $(GNU_LIB)/ftoastr.h \
87 $(GNU_LIB)/intprops.h
88FTOASTR_C = $(GNU_LIB)/ftoastr.c \
89 $(CONFIG_H) \
57239922 90 $(FTOASTR_H)
52331d2c
JB
91GETOPT_INT_H = $(GNU_LIB)/getopt_int.h \
92 $(GNU_LIB)/getopt.h
93MD5_H = $(GNU_LIB)/md5.h \
94 $(NT_INC)/stdint.h
95SHA1_H = $(GNU_LIB)/sha1.h \
96 $(NT_INC)/stdint.h
97SHA256_H = $(GNU_LIB)/sha256.h \
98 $(NT_INC)/stdint.h
99U64_H = $(GNU_LIB)/u64.h \
100 $(NT_INC)/stdint.h
101SHA512_H = $(GNU_LIB)/sha512.h \
fddc1855 102 $(U64_H)
57239922
JB
103STAT_TIME_H = $(GNU_LIB)/stat-time.h \
104 $(NT_INC)/sys/stat.h
f915f0f7 105
07adc2c6 106$(BLD)/c-ctype.$(O) : \
52331d2c
JB
107 $(GNU_LIB)/c-ctype.c \
108 $(CONFIG_H) \
109 $(C_CTYPE_H)
07adc2c6
JB
110
111$(BLD)/c-strcasecmp.$(O) : \
52331d2c
JB
112 $(GNU_LIB)/c-strcasecmp.c \
113 $(GNU_LIB)/c-strcase.h \
114 $(CONFIG_H) \
115 $(C_CTYPE_H)
07adc2c6
JB
116
117$(BLD)/c-strncasecmp.$(O) : \
52331d2c
JB
118 $(GNU_LIB)/c-strncasecmp.c \
119 $(GNU_LIB)/c-strcase.h \
120 $(CONFIG_H) \
121 $(C_CTYPE_H)
07adc2c6 122
f915f0f7 123$(BLD)/dtoastr.$(O) : \
52331d2c
JB
124 $(GNU_LIB)/dtoastr.c \
125 $(FTOASTR_C)
f915f0f7 126
388cdec0 127$(BLD)/dtotimespec.$(O) : \
52331d2c
JB
128 $(GNU_LIB)/dtotimespec.c \
129 $(GNU_LIB)/intprops.h \
130 $(GNU_LIB)/timespec.h \
131 $(CONFIG_H)
388cdec0 132
391ceac5
EZ
133$(BLD)/execinfo.$(O) : \
134 $(GNU_LIB)/execinfo.h
135
f915f0f7 136$(BLD)/getopt.$(O) : \
52331d2c
JB
137 $(GNU_LIB)/getopt.c \
138 $(GNU_LIB)/getopt.h \
139 $(GNU_LIB)/gettext.h \
140 $(NT_INC)/unistd.h \
141 $(CONFIG_H) \
142 $(GETOPT_INT_H)
f915f0f7
EZ
143
144$(BLD)/getopt1.$(O) : \
52331d2c
JB
145 $(GNU_LIB)/getopt1.c \
146 $(GNU_LIB)/getopt.h \
147 $(CONFIG_H) \
148 $(GETOPT_INT_H)
f915f0f7 149
388cdec0 150$(BLD)/gettime.$(O) : \
52331d2c
JB
151 $(GNU_LIB)/gettime.c \
152 $(GNU_LIB)/timespec.h \
153 $(NT_INC)/sys/time.h \
154 $(CONFIG_H)
388cdec0 155
70b0d280 156$(BLD)/strftime.$(O) : \
52331d2c
JB
157 $(GNU_LIB)/strftime.c \
158 $(GNU_LIB)/strftime.h \
159 $(NT_INC)/stdbool.h \
160 $(CONFIG_H)
70b0d280
EZ
161
162$(BLD)/time_r.$(O) : \
52331d2c
JB
163 $(GNU_LIB)/time_r.c \
164 $(CONFIG_H)
70b0d280 165
388cdec0 166$(BLD)/timespec-add.$(O) : \
52331d2c
JB
167 $(GNU_LIB)/timespec-add.c \
168 $(GNU_LIB)/intprops.h \
169 $(GNU_LIB)/timespec.h \
170 $(CONFIG_H)
388cdec0
EZ
171
172$(BLD)/timespec-sub.$(O) : \
52331d2c
JB
173 $(GNU_LIB)/timespec-sub.c \
174 $(GNU_LIB)/intprops.h \
175 $(GNU_LIB)/timespec.h \
176 $(CONFIG_H)
388cdec0 177
32159fc3 178$(BLD)/md5.$(O) : \
52331d2c
JB
179 $(GNU_LIB)/md5.c \
180 $(NT_INC)/stdalign.h \
181 $(NT_INC)/stdint.h \
182 $(CONFIG_H) \
183 $(MD5_H)
25c51af3 184
13c3daa4 185$(BLD)/sha1.$(O) : \
52331d2c
JB
186 $(GNU_LIB)/sha1.c \
187 $(NT_INC)/stdalign.h \
188 $(NT_INC)/stdint.h \
189 $(CONFIG_H) \
190 $(SHA1_H)
13c3daa4 191
3ce9d0d4 192$(BLD)/sha256.$(O) : \
52331d2c
JB
193 $(GNU_LIB)/sha256.c \
194 $(NT_INC)/stdalign.h \
195 $(NT_INC)/stdint.h \
196 $(CONFIG_H) \
197 $(SHA256_H)
3ce9d0d4
LL
198
199$(BLD)/sha512.$(O) : \
52331d2c
JB
200 $(GNU_LIB)/sha512.c \
201 $(NT_INC)/stdalign.h \
202 $(NT_INC)/stdint.h \
203 $(CONFIG_H) \
204 $(SHA512_H)
3ce9d0d4 205
fddc1855 206$(BLD)/stat-time.$(O) : \
57239922
JB
207 $(GNU_LIB)/stat-time.c \
208 $(CONFIG_H) \
209 $(STAT_TIME_H)
fddc1855
EZ
210
211$(BLD)/timespec.$(O) : \
57239922 212 $(GNU_LIB)/timespec.c \
fddc1855
EZ
213 $(GNU_LIB)/timespec.h \
214 $(CONFIG_H)
215
216$(BLD)/u64.$(O) : \
57239922
JB
217 $(GNU_LIB)/u64.c \
218 $(CONFIG_H) \
219 $(U64_H)
fddc1855 220
25c51af3 221$(BLD)/filemode.$(O) : \
52331d2c
JB
222 $(GNU_LIB)/filemode.c \
223 $(CONFIG_H) \
224 $(FILEMODE_H)
32159fc3 225
f915f0f7
EZ
226# The following dependencies are for supporting parallel builds, where
227# we must make sure $(BLD) exists before any compilation starts.
228#
cc06e7e7 229$(GNULIBOBJS): stamp_BLD
f915f0f7
EZ
230
231#
232# Headers we would preprocess if we could.
233#
234getopt.h: getopt_.h
235 $(CP) $(ALL_DEPS) $@
236
237#
238# Maintenance
239#
240clean:
241 - $(DEL) $(COMPILER_TEMP_FILES)
242 - $(DEL) getopt.h
243 - $(DEL_TREE) $(OBJDIR)
244 - $(DEL) stamp_BLD
245
246distclean: cleanall
247 - $(DEL) TAGS
248 - $(DEL) Makefile
249
250maintainer-clean: distclean
251 - $(DEL) getopt_.h
252
253cleanall: clean
254 - $(DEL_TREE) obj
255 - $(DEL_TREE) obj-spd
256 - $(DEL_TREE) oo
257 - $(DEL_TREE) oo-spd
258
259# A dummy target to force other targets to be evaluated.
260doit:
261
262getopt_.h: getopt.in.h $(ARG_NONNULL_H)
263 $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE)
264
265getopt_.h-CMD: doit
266 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
267 @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory.
268 @echo You will need GNU Sed to be installed.
269 exit -1
270
271getopt_.h-SH: doit
272 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
273 @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory.
274 @echo You will need GNU Sed to be installed.
275 exit -1
276
277# Generating getopt_.h from getopt.in.h.
278#
279# To avoid requiring all end users to install Sed, we have below
280# a maintainer-only target that produces getopt_.h from getopt.in.h.
281# For easier maintenance, all the strings that replace the @FOO@
282# placeholder are defined as Make macros below.
283
284HAVE_GETOPT_H = HAVE_GETOPT_H
285INCLUDE_NEXT = include_next
f915f0f7
EZ
286PRAGMA_COLUMNS =
287NEXT_GETOPT_H = <getopt.h>
24e0f6b1 288ARG_NONNULL_H = ../build-aux/snippet/arg-nonnull.h
f915f0f7
EZ
289
290getopt_h:
291 - $(DEL) getopt_.h-t getopt_.h
6a3e57bb
PE
292 sed -e "s!@GUARD_PREFIX@!GL!g" \
293 -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \
f915f0f7
EZ
294 -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \
295 -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \
296 -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \
297 -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \
298 -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \
299 -e "/^\# include_next/i # ifndef __GNUC__" \
300 -e "/^\# include_next/i # include <next_getopt.h>" \
301 -e "/^\# include_next/i # else" \
302 -e "/^\# include_next/a # endif" \
303 < getopt.in.h > getopt_.h-t
304 $(CP) getopt_.h-t getopt_.h
305 - $(DEL) getopt_.h-t
391ceac5
EZ
306
307execinfo.h: execinfo.in.h
308 $(CP) execinfo.in.h $@
309