New file.
[bpt/emacs.git] / lisp / makefile.w32-in
CommitLineData
bd6766d3 1# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
92b47a4a 2# Copyright (C) 2000, 2001, 2002, 2003, 2004,
409cc4a3 3# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7bbaaedd
AI
4#
5# This file is part of GNU Emacs.
c45dbde8 6#
7bbaaedd
AI
7# GNU Emacs is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
b4aa6026 9# the Free Software Foundation; either version 3, or (at your option)
7bbaaedd 10# any later version.
c45dbde8 11#
7bbaaedd
AI
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
c45dbde8 16#
7bbaaedd
AI
17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs; see the file COPYING. If not, write to the
086add15
LK
19# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20# Boston, MA 02110-1301, USA.
7bbaaedd
AI
21#
22
23ALL =
24
25all: $(ALL)
26
27SQUOTE='
28# '
29
6610f4b2 30lisp = $(CURDIR)
9b006cb2 31srcdir = $(CURDIR)/..
7bbaaedd
AI
32
33# You can specify a different executable on the make command line,
34# e.g. "make EMACS=../src/emacs ...".
35
3196bfd2 36EMACS = $(THISDIR)/../bin/emacs.exe
7bbaaedd
AI
37
38# Command line flags for Emacs. This must include --multibyte,
39# otherwise some files will not compile.
40
41EMACSOPT = -batch --no-init-file --no-site-file --multibyte
42
8b9a5623
EZ
43# Extra flags to pass to the byte compiler
44BYTE_COMPILE_EXTRA_FLAGS =
45# For example to not display the undefined function warnings you can use this:
46# BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
47# The example above is just for developers, it should not be used by default.
48
cc7aa053
AI
49# Set EMACSLOADPATH correctly (already defined in environment).
50EMACSLOADPATH=$(lisp)
51
dd6ab82f
MB
52# Use C locale
53LC_ALL = C
54
7bbaaedd
AI
55lisptagsfiles1 = $(lisp)/*.el
56lisptagsfiles2 = $(lisp)/*/*.el
57ETAGS = "../lib-src/$(BLD)/etags"
58
c79a07d7
EZ
59# Automatically generated autoload files, apart from lisp/loaddefs.el.
60LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
3dc94c30
JR
61 $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
62 $(lisp)/mh-e/mh-loaddefs.el
63
64AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
65 $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el
c79a07d7 66
170a9e70
GM
67# Files to compile before others during a bootstrap. This is done to
68# speed up the bootstrap process. The CC files are compiled first
69# because CC mode tweaks the compilation process, and requiring
70# cc-mode when it is not compiled doesn't work during the
71# bootstrapping.
7bbaaedd
AI
72
73COMPILE_FIRST = \
74 $(lisp)/emacs-lisp/byte-opt.el \
75 $(lisp)/emacs-lisp/bytecomp.el \
170a9e70
GM
76 $(lisp)/subr.el \
77 $(lisp)/progmodes/cc-mode.el \
78 $(lisp)/progmodes/cc-vars.el
7bbaaedd
AI
79
80# The actual Emacs command run in the targets below.
3196bfd2
EZ
81# The quotes around $(EMACS) are here because the user could type
82# it with forward slashes and without quotes, which will fail if
83# the shell is cmd.exe.
7bbaaedd 84
3196bfd2 85emacs = "$(EMACS)" $(EMACSOPT)
7bbaaedd 86
7bbaaedd 87# Have to define the list of subdirs manually when not using sh.
3aeca4ac 88WINS_ALMOST=\
1142be39 89 calc \
7bbaaedd
AI
90 calendar \
91 emacs-lisp \
92 emulation \
3e66f07c 93 erc \
7bbaaedd
AI
94 eshell \
95 gnus \
96 international \
97 language \
98 mail \
942da20c 99 mh-e \
7bbaaedd 100 net \
14521da1 101 nxml \
41d7a854 102 org \
7bbaaedd
AI
103 play \
104 progmodes \
b036f5d8 105 textmodes \
05cecc58 106 url
7bbaaedd 107
3aeca4ac 108WINS= $(WINS_ALMOST) \
cba3dac5 109 term \
3aeca4ac
JB
110 obsolete
111
7bbaaedd
AI
112doit:
113
bad197f0 114$(lisp)/cus-load.el:
7bbaaedd 115 touch $@
c3d49b7a
EZ
116# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
117# this can break with GNU Make 3.81 and later if sh.exe is used.
f2133d9e 118custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
cba3dac5
JR
119 @echo Directories: $(WINS_ALMOST)
120 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS_ALMOST)
7bbaaedd 121
f2133d9e 122finder-data: $(lisp)/loaddefs.el doit
cba3dac5
JR
123 @echo Directories: $(WINS_ALMOST)
124 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_ALMOST)
7bbaaedd 125
bad197f0 126$(lisp)/loaddefs.el:
e22b24eb
AI
127 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
128 cp loaddefs.el-$(SHELLTYPE) $@
129 rm loaddefs.el-$(SHELLTYPE)
130
131loaddefs.el-SH:
132 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
133 echo ";;" >> $@; echo ";;; Code:" >> $@
134 echo "(autoload 'define-minor-mode \"easy-mmode\")" >>$@
135 echo "(autoload 'define-ccl-program \"ccl\")" >>$@
136 echo "(autoload 'regexp-opt \"regexp-opt\")" >>$@
137 echo "(autoload 'string-to-list \"mule-util\")" >>$@
138 echo "(autoload 'define-derived-mode \"derived\")" >>$@
139 echo "(autoload 'encoded-kbd-mode \"encoded-kb\")" >>$@
140 echo "(defvar cvs-global-menu nil)" >>$@
141 echo "\f" >> $@
142 echo ";;; Local Variables:" >> $@
143 echo ";;; version-control: never" >> $@
144 echo ";;; no-byte-compile: t" >> $@
145 echo ";;; no-update-autoloads: t" >> $@
146 echo ";;; End:" >> $@
147 echo ";;; loaddefs.el ends here" >> $@
148
149loaddefs.el-CMD:
7bbaaedd
AI
150 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
151 echo ;;; Code:>> $@
e22b24eb
AI
152 echo (autoload 'define-minor-mode "easy-mmode")>> $@
153 echo (autoload 'define-ccl-program "ccl")>> $@
154 echo (autoload 'regexp-opt "regexp-opt")>> $@
155 echo (autoload 'string-to-list "mule-util")>> $@
156 echo (autoload 'define-derived-mode "derived")>> $@
157 echo (autoload 'encoded-kbd-mode "encoded-kb")>> $@
158 echo (defvar cvs-global-menu nil)>> $@
bad197f0 159 echo.\f>> $@
7bbaaedd
AI
160 echo ;;; Local Variables:>> $@
161 echo ;;; version-control: never>> $@
162 echo ;;; no-byte-compile: t>> $@
163 echo ;;; no-update-autoloads: t>> $@
164 echo ;;; End:>> $@
165 echo ;;; loaddefs.el ends here>> $@
166
81293113
EZ
167# Use . instead of $(lisp) because $(lisp) is an absolute file name,
168# including a drive letter and any leading directories, so the generated
169# loaddefs.el will mention file names that on other machine reference
170# possibly non-existent directories.
c3d49b7a
EZ
171#
172# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
173# this can break with GNU Make 3.81 and later if sh.exe is used.
c79a07d7 174autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
3aeca4ac 175 @echo Directories: . $(WINS_ALMOST)
c5bdb93d 176 $(emacs) -l autoload \
7c417300 177 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
3aeca4ac 178 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" . $(WINS_ALMOST)
7bbaaedd 179
bad197f0 180$(lisp)/subdirs.el:
7bbaaedd
AI
181 $(MAKE) $(MFLAGS) update-subdirs
182
183# Need separate version for sh and native cmd.exe
184update-subdirs: update-subdirs-$(SHELLTYPE)
185
186update-subdirs-CMD: doit
bad197f0
JR
187 echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
188 echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
189 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
190 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
191 @for %%d in ($(WINS)) do if not (%%d)==(term) echo "%%d">> $(lisp)/subdirs.el
192 echo ))>> $(lisp)/subdirs.el
7bbaaedd
AI
193
194update-subdirs-SH: doit
0cfc4b54 195 $(srcdir)/update-subdirs $(lisp); \
e22b24eb 196 for file in $(WINS); do \
7bbaaedd
AI
197 $(srcdir)/update-subdirs $$file; \
198 done;
199
ba2b2673 200updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
7bbaaedd 201
a9d25c79
EZ
202# This is useful after "cvs up".
203cvs-update: recompile autoloads finder-data custom-deps
204
9b006cb2
AI
205# Update the AUTHORS file.
206
207update-authors:
ed5e0894 208 $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
9b006cb2 209
7bbaaedd
AI
210TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
211 $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
212
9b006cb2
AI
213TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
214 $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
7bbaaedd 215
49060c51
AI
216.SUFFIXES: .elc .el
217
7bbaaedd 218.el.elc:
8b9a5623 219 -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
7bbaaedd 220
8f801552
LK
221# Compile all Lisp files, but don't recompile those that are up to
222# date. Some files don't actually get compiled because they set the
223# local variable no-byte-compile.
7bbaaedd 224
8f801552
LK
225# All .elc files are made writable before compilation in case we
226# checked out read-only (CVS option -r). Files MUST be compiled one by
227# one. If we compile several files in a row we can't make sure that
228# the compilation environment is clean. We also set the load-path of
229# the Emacs used for compilation to the current directory and its
230# subdirectories, to make sure require's and load's in the files being
231# compiled find the right files.
7bbaaedd
AI
232
233# Need separate version for sh and native cmd.exe
bad197f0 234compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit
7bbaaedd 235
d198b6f5 236compile-CMD:
80bb1e21
JR
237# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
238 for %%f in ($(COMPILE_FIRST)) do \
8b9a5623 239 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f
80bb1e21 240 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
8b9a5623 241 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
0702b995 242
d198b6f5 243compile-SH:
9b006cb2
AI
244# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
245 for el in $(COMPILE_FIRST); do \
246 echo Compiling $$el; \
8b9a5623 247 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
9b006cb2
AI
248 done
249 for dir in $(lisp) $(WINS); do \
250 for el in $$dir/*.el; do \
251 if test -f $$el; \
252 then \
253 echo Compiling $$el; \
8b9a5623 254 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
9b006cb2
AI
255 fi \
256 done; \
257 done
258
8f801552
LK
259# Compile all Lisp files. This is like `compile' but compiles files
260# unconditionally. Some files don't actually get compiled because they
261# set the local variable no-byte-compile.
262
bad197f0 263compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
9b006cb2
AI
264
265compile-always-CMD:
80bb1e21 266# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
8b9a5623
EZ
267 for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
268 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g
7bbaaedd 269
9b006cb2 270compile-always-SH:
7bbaaedd
AI
271# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
272 for el in $(COMPILE_FIRST); do \
273 echo Compiling $$el; \
8b9a5623 274 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
7bbaaedd
AI
275 done
276 for dir in $(lisp) $(WINS); do \
277 for el in $$dir/*.el; do \
278 echo Compiling $$el; \
8b9a5623 279 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
7bbaaedd
AI
280 done; \
281 done
282
9b006cb2
AI
283compile-calc: compile-calc-$(SHELLTYPE)
284
285compile-calc-CMD:
8b9a5623 286 for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
9b006cb2 287
c45dbde8 288compile-calc-SH:
9b006cb2
AI
289 for el in $(lisp)/calc/*.el; do \
290 echo Compiling $$el; \
8b9a5623 291 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
9b006cb2
AI
292 done
293
7bbaaedd
AI
294# Backup compiled Lisp files in elc.tar.gz. If that file already
295# exists, make a backup of it.
296
297backup-compiled-files:
298 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
299 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
300
301# Compile Lisp files, but save old compiled files first.
302
d198b6f5 303compile-after-backup: backup-compiled-files compile-always
7bbaaedd
AI
304
305# Recompile all Lisp files which are newer than their .elc files.
306# Note that this doesn't create .elc files. It only recompiles if an
307# .elc is present.
53fad1e4
EZ
308# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
309# this can break with GNU Make 3.81 and later if sh.exe is used.
310recompile: mh-autoloads doit $(lisp)/progmodes/cc-mode.elc
311 $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
7bbaaedd 312
8b9a5623
EZ
313# CC Mode uses a compile time macro system which causes a compile time
314# dependency in cc-mode.elc on the macros in cc-langs.el and the
315# version string in cc-defs.el.
316$(lisp)/progmodes/cc-mode.elc: \
317 $(lisp)/progmodes/cc-mode.el \
318 $(lisp)/progmodes/cc-langs.el \
319 $(lisp)/progmodes/cc-defs.el
320 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
321
c79a07d7
EZ
322$(lisp)/calendar/cal-loaddefs.el:
323 "$(EMACS)" $(EMACSOPT) -l autoload \
324 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
325 --eval "(setq find-file-suppress-same-file-warnings t)" \
326 --eval "(setq make-backup-files nil)" \
327 -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
328 ./calendar
329
330$(lisp)/calendar/diary-loaddefs.el:
331 "$(EMACS)" $(EMACSOPT) -l autoload \
332 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
333 --eval "(setq find-file-suppress-same-file-warnings t)" \
334 --eval "(setq make-backup-files nil)" \
335 -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
336 ./calendar
337
338$(lisp)/calendar/hol-loaddefs.el:
339 "$(EMACS)" $(EMACSOPT) -l autoload \
340 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
341 --eval "(setq find-file-suppress-same-file-warnings t)" \
342 --eval "(setq make-backup-files nil)" \
343 -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
344 ./calendar
345
ba2b2673
BW
346# Update MH-E internal autoloads. These are not to be confused with
347# the autoloads for the MH-E entry points, which are already in
348# loaddefs.el.
e9b28650 349MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
3e66f07c
JB
350 $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
351 $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
352 $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
353 $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
354 $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
355 $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
356 $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
357 $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
358 $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
359 $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
360 $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
361 $(lisp)/mh-e/mh-xface.el
ba2b2673 362
43618a57
EZ
363# See the commentary for autoloads above for why we use ./mh-e below
364# instead of $(lisp)/mh-e.
ba2b2673 365mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
e9b28650 366$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
3152b1eb 367 "$(EMACS)" $(EMACSOPT) \
e3188d80 368 -l autoload \
3dc94c30
JR
369 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
370 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
371 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
7c417300 372 -f w32-batch-update-autoloads \
3dc94c30 373 $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) ./mh-e
e3188d80 374
54ab09c4
MB
375# Prepare a bootstrap in the lisp subdirectory.
376#
e8dbbf6f
EZ
377# Build loaddefs.el to make sure it's up-to-date. If it's not, that
378# might lead to errors during the bootstrap because something fails to
379# autoload as expected. If there is no emacs binary, then we can't
380# build autoloads yet. In that case we have to use ldefs-boot.el;
381# bootstrap should always work with ldefs-boot.el. (Because
382# loaddefs.el is an automatically generated file, we don't want to
383# store it in the source repository).
54ab09c4
MB
384#
385# Remove compiled Lisp files so that bootstrap-emacs will be built from
386# sources only.
7bbaaedd
AI
387
388# Need separate version for sh and native cmd.exe
512dd711
EZ
389# Note that bootstrap-clean-$(SHELLTYPE) copies ldefs-boot.el to loaddefs.el,
390# and thus the almost-empty loaddefs.el crafted by the $(lisp)/loaddefs.el
391# target can NOT be built _after_ bootstrap-clean-$(SHELLTYPE) does its
392# thing, or else an empty loaddefs.el will overwrite the full one.
393bootstrap-clean: $(lisp)/loaddefs.el
394 $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
7bbaaedd
AI
395
396bootstrap-clean-CMD:
3152b1eb 397# if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
e8dbbf6f 398 cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el
80bb1e21 399 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
7bbaaedd
AI
400
401bootstrap-clean-SH:
3152b1eb 402# if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
a3599c30 403# -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
e8dbbf6f 404 cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el
a3599c30 405 -for dir in . $(WINS); do rm -f $$dir/*.elc; done
7bbaaedd
AI
406
407# Generate/update files for the bootstrap process.
014b37b6
EZ
408# When done, remove bootstrap-emacs from ../bin, so that
409# it will not be mistaken for an installed binary.
7bbaaedd 410
ba2b2673 411bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps
3152b1eb 412 - $(DEL) "$(EMACS)"
7bbaaedd
AI
413
414#
415# Assuming INSTALL_DIR is defined, copy the elisp files to it
416# Windows 95 makes this harder than it should be.
417#
418install:
419 - mkdir "$(INSTALL_DIR)/lisp"
420 - $(DEL) ../same-dir.tst
421 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
422 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
423#ifdef COPY_LISP_SOURCE
564a3032 424 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
7bbaaedd
AI
425#else
426# $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
427# $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
428# $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
429# $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
430# $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
431# $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
432# $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
433# $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
434# $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
435# $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
436# $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
437#endif
438 - $(DEL) ../same-dir.tst
439 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
440
564a3032
EZ
441# Need to copy *.el files first, to avoid "source file is newer" annoyance
442# since cp does not preserve time stamps
443install-lisp-SH:
444 cp -f *.el "$(INSTALL_DIR)/lisp"
ec9bbc6c
EZ
445 for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
446 for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
564a3032
EZ
447 for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
448
449install-lisp-CMD:
450 cp -f *.el "$(INSTALL_DIR)/lisp"
ec9bbc6c 451 for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
564a3032
EZ
452 for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
453 for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
454
8b9a5623
EZ
455# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
456# this can break with GNU Make 3.81 and later if sh.exe is used.
457check-declare:
458 $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
459
7bbaaedd
AI
460#
461# Maintenance
c45dbde8 462#
a055c272
EZ
463# We used to delete *~ here, but that might inadvertently remove
464# precious files if it happens to match their short 8+3 aliases.
7bbaaedd 465clean:
3dc94c30
JR
466 - $(DEL) *.el~
467
468distclean:
469 - $(DEL) $(lisp)/Makefile
470
471maintainer-clean: bootstrap-clean distclean
472 - $(DEL) $(AUTOGENEL)