Speed up keyboard auto-repeat cursor motion under bidi redisplay.
[bpt/emacs.git] / lib / makefile.w32-in
1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2011 Free Software Foundation, Inc.
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
19 ALL = gnulib
20
21 .PHONY: $(ALL)
22
23 LOCAL_FLAGS = -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src
24 LIBS =
25
26 GNULIBOBJS = $(BLD)/dtoastr.$(O) \
27 $(BLD)/getopt.$(O) \
28 $(BLD)/getopt1.$(O) \
29 $(BLD)/strftime.$(O) \
30 $(BLD)/time_r.$(O) \
31 $(BLD)/md5.$(O) \
32 $(BLD)/sha1.$(O) \
33 $(BLD)/sha256.$(O) \
34 $(BLD)/sha512.$(O) \
35 $(BLD)/filemode.$(O)
36
37 #
38 # Build the library
39 #
40 $(BLD)/libgnu.$(A): $(GNULIBOBJS)
41 - $(DEL) $@
42 $(AR) $(AR_OUT)$@ $(ALL_DEPS)
43
44 gnulib: stamp_BLD $(BLD)/libgnu.$(A)
45
46 #
47 # Build everything
48 #
49 all: stamp_BLD $(ALL)
50
51 ### TAGS ###
52
53 TAGS:
54 ../lib-src/$(BLD)/etags.exe *.c *.h
55
56 ### DEPENDENCIES ###
57
58 EMACS_ROOT = ..
59 SRC = .
60
61 $(BLD)/dtoastr.$(O) : \
62 $(SRC)/dtoastr.c \
63 $(SRC)/ftoastr.c \
64 $(SRC)/ftoastr.h \
65 $(SRC)/intprops.h \
66 $(EMACS_ROOT)/nt/inc/sys/stat.h \
67 $(EMACS_ROOT)/src/s/ms-w32.h \
68 $(EMACS_ROOT)/src/m/intel386.h \
69 $(EMACS_ROOT)/src/config.h
70
71 $(BLD)/getopt.$(O) : \
72 $(SRC)/getopt.c \
73 $(SRC)/getopt.h \
74 $(SRC)/getopt_int.h \
75 $(SRC)/gettext.h \
76 $(EMACS_ROOT)/nt/inc/unistd.h \
77 $(EMACS_ROOT)/nt/inc/sys/stat.h \
78 $(EMACS_ROOT)/src/s/ms-w32.h \
79 $(EMACS_ROOT)/src/m/intel386.h \
80 $(EMACS_ROOT)/src/config.h
81
82 $(BLD)/getopt1.$(O) : \
83 $(SRC)/getopt1.c \
84 $(SRC)/getopt.h \
85 $(SRC)/getopt_int.h \
86 $(EMACS_ROOT)/nt/inc/sys/stat.h \
87 $(EMACS_ROOT)/src/s/ms-w32.h \
88 $(EMACS_ROOT)/src/m/intel386.h \
89 $(EMACS_ROOT)/src/config.h
90
91 $(BLD)/strftime.$(O) : \
92 $(SRC)/strftime.c \
93 $(SRC)/strftime.h \
94 $(EMACS_ROOT)/nt/inc/stdbool.h \
95 $(EMACS_ROOT)/nt/inc/sys/stat.h \
96 $(EMACS_ROOT)/src/s/ms-w32.h \
97 $(EMACS_ROOT)/src/m/intel386.h \
98 $(EMACS_ROOT)/src/config.h
99
100 $(BLD)/time_r.$(O) : \
101 $(SRC)/time_r.c \
102 $(EMACS_ROOT)/nt/inc/sys/stat.h \
103 $(EMACS_ROOT)/src/s/ms-w32.h \
104 $(EMACS_ROOT)/src/m/intel386.h \
105 $(EMACS_ROOT)/src/config.h
106
107 $(BLD)/md5.$(O) : \
108 $(SRC)/md5.c \
109 $(SRC)/md5.h \
110 $(EMACS_ROOT)/nt/inc/stdint.h \
111 $(EMACS_ROOT)/nt/inc/sys/stat.h \
112 $(EMACS_ROOT)/src/s/ms-w32.h \
113 $(EMACS_ROOT)/src/m/intel386.h \
114 $(EMACS_ROOT)/src/config.h
115
116 $(BLD)/sha1.$(O) : \
117 $(SRC)/sha1.c \
118 $(SRC)/sha1.h \
119 $(EMACS_ROOT)/nt/inc/stdint.h \
120 $(EMACS_ROOT)/nt/inc/sys/stat.h \
121 $(EMACS_ROOT)/src/s/ms-w32.h \
122 $(EMACS_ROOT)/src/m/intel386.h \
123 $(EMACS_ROOT)/src/config.h
124
125 $(BLD)/sha256.$(O) : \
126 $(SRC)/sha256.c \
127 $(SRC)/sha256.h \
128 $(EMACS_ROOT)/nt/inc/stdint.h \
129 $(EMACS_ROOT)/nt/inc/sys/stat.h \
130 $(EMACS_ROOT)/src/s/ms-w32.h \
131 $(EMACS_ROOT)/src/m/intel386.h \
132 $(EMACS_ROOT)/src/config.h
133
134 $(BLD)/sha512.$(O) : \
135 $(SRC)/sha512.c \
136 $(SRC)/sha512.h \
137 $(EMACS_ROOT)/nt/inc/stdint.h \
138 $(EMACS_ROOT)/nt/inc/sys/stat.h \
139 $(EMACS_ROOT)/src/s/ms-w32.h \
140 $(EMACS_ROOT)/src/m/intel386.h \
141 $(EMACS_ROOT)/src/config.h
142
143 $(BLD)/filemode.$(O) : \
144 $(SRC)/filemode.c \
145 $(SRC)/filemode.h \
146 $(EMACS_ROOT)/nt/inc/sys/stat.h \
147 $(EMACS_ROOT)/src/s/ms-w32.h \
148 $(EMACS_ROOT)/src/m/intel386.h \
149 $(EMACS_ROOT)/src/config.h
150
151 # The following dependencies are for supporting parallel builds, where
152 # we must make sure $(BLD) exists before any compilation starts.
153 #
154 $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
155 $(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD
156 $(BLD)/filemode.$(O): stamp_BLD
157
158 #
159 # Headers we would preprocess if we could.
160 #
161 getopt.h: getopt_.h
162 $(CP) $(ALL_DEPS) $@
163
164 #
165 # Maintenance
166 #
167 clean:
168 - $(DEL) $(COMPILER_TEMP_FILES)
169 - $(DEL) getopt.h
170 - $(DEL_TREE) $(OBJDIR)
171 - $(DEL) stamp_BLD
172
173 distclean: cleanall
174 - $(DEL) TAGS
175 - $(DEL) Makefile
176
177 maintainer-clean: distclean
178 - $(DEL) getopt_.h
179
180 cleanall: clean
181 - $(DEL_TREE) obj
182 - $(DEL_TREE) obj-spd
183 - $(DEL_TREE) oo
184 - $(DEL_TREE) oo-spd
185
186 # A dummy target to force other targets to be evaluated.
187 doit:
188
189 getopt_.h: getopt.in.h $(ARG_NONNULL_H)
190 $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE)
191
192 getopt_.h-CMD: doit
193 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
194 @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory.
195 @echo You will need GNU Sed to be installed.
196 exit -1
197
198 getopt_.h-SH: doit
199 @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h.
200 @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory.
201 @echo You will need GNU Sed to be installed.
202 exit -1
203
204 # Generating getopt_.h from getopt.in.h.
205 #
206 # To avoid requiring all end users to install Sed, we have below
207 # a maintainer-only target that produces getopt_.h from getopt.in.h.
208 # For easier maintenance, all the strings that replace the @FOO@
209 # placeholder are defined as Make macros below.
210
211 HAVE_GETOPT_H = HAVE_GETOPT_H
212 INCLUDE_NEXT = include_next
213 PRAGMA_SYSTEM_HEADER = \#pragma GCC system_header
214 PRAGMA_COLUMNS =
215 NEXT_GETOPT_H = <getopt.h>
216 ARG_NONNULL_H = ../arg-nonnull.h
217
218 getopt_h:
219 - $(DEL) getopt_.h-t getopt_.h
220 sed -e "s!@GUARD_PREFIX@!GL!g" \
221 -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \
222 -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \
223 -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \
224 -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \
225 -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \
226 -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \
227 -e "/^\# include_next/i # ifndef __GNUC__" \
228 -e "/^\# include_next/i # include <next_getopt.h>" \
229 -e "/^\# include_next/i # else" \
230 -e "/^\# include_next/a # endif" \
231 < getopt.in.h > getopt_.h-t
232 $(CP) getopt_.h-t getopt_.h
233 - $(DEL) getopt_.h-t