(isearch-lazy-highlight-remove-overlays): Doc fix.
[emacs.git] / lisp / makefile.w32-in
blob0c996515a292df039434cf733f9be0406b35f4b2
1 #  Hacked up Nmake makefile for GNU Emacs
2 #   Geoff Voelker (voelker@cs.washington.edu)
3 #  Copyright (c) 1994 Free Software Foundation, Inc.
5 #  This file is part of GNU Emacs.
6 #  
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
9 #  the Free Software Foundation; either version 2, or (at your option)
10 #  any later version.
11 #  
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.
16 #  
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
19 #  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 #  Boston, MA 02111-1307, USA.
23 ALL =
25 all: $(ALL)
27 SQUOTE='
28 # '
30 lisp = $(CURDIR)
32 # You can specify a different executable on the make command line,
33 # e.g. "make EMACS=../src/emacs ...".
35 EMACS = "../bin/emacs.exe"
37 # Command line flags for Emacs.  This must include --multibyte,
38 # otherwise some files will not compile.
40 EMACSOPT = -batch --no-init-file --no-site-file --multibyte
42 lisptagsfiles1 = $(lisp)/*.el
43 lisptagsfiles2 = $(lisp)/*/*.el
44 ETAGS = "../lib-src/$(BLD)/etags"
46 # Files which should not be compiled.
47 # - emacs-lisp/cl-specs.el:  only contains `def-edebug-spec's so there's
48 #   no point compiling it, although it doesn't hurt.
50 DONTCOMPILE = \
51         $(lisp)/bindings.el \
52         $(lisp)/cus-load.el \
53         $(lisp)/cus-start.el \
54         $(lisp)/emacs-lisp/cl-specs.el \
55         $(lisp)/eshell/esh-maint.el \
56         $(lisp)/eshell/esh-groups.el \
57         $(lisp)/finder-inf.el \
58         $(lisp)/forms-d2.el \
59         $(lisp)/forms-pass.el \
60         $(lisp)/generic-x.el \
61         $(lisp)/international/latin-1.el \
62         $(lisp)/international/latin-2.el \
63         $(lisp)/international/latin-3.el \
64         $(lisp)/international/latin-4.el \
65         $(lisp)/international/latin-5.el \
66         $(lisp)/international/latin-8.el \
67         $(lisp)/international/latin-9.el \
68         $(lisp)/international/mule-conf.el \
69         $(lisp)/loaddefs.el \
70         $(lisp)/loadup.el \
71         $(lisp)/mail/blessmail.el \
72         $(lisp)/mail/sc.el \
73         $(lisp)/patcomp.el \
74         $(lisp)/paths.el \
75         $(lisp)/play/bruce.el \
76         $(lisp)/subdirs.el \
77         $(lisp)/term/internal.el \
78         $(lisp)/version.el
80 # Files to compile before others during a bootstrap.  This is done
81 # to speed up the bootstrap process.
83 COMPILE_FIRST = \
84         $(lisp)/emacs-lisp/byte-opt.el \
85         $(lisp)/emacs-lisp/bytecomp.el \
86         $(lisp)/subr.el
88 # The actual Emacs command run in the targets below.
90 emacs = $(EMACS) $(EMACSOPT)
92 # Common command to find subdirectories
94 setwins=subdirs=`find $$wd -type d -print`; \
95         for file in $$subdirs; do \
96            case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
97                 *) wins="$$wins $$file" ;; \
98            esac; \
99         done
101 # Have to define the list of subdirs manually when not using sh.
102 WINS=\
103         calendar \
104         emacs-lisp \
105         emulation \
106         eshell \
107         gnus \
108         international \
109         language \
110         mail \
111         net \
112         play \
113         progmodes \
114         term \
115         textmodes
117 doit:
119 cus-load.el:
120         touch $@
121 custom-deps: cus-load.el doit
122         @echo Directories: $(WINS)
123         $(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
125 finder-inf.el:
126         echo (provide $(SQUOTE)finder-inf)>> $@
128 finder-data: finder-inf.el doit
129         @echo Directories: $(WINS)
130         $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
132 loaddefs.el:
133         echo ;;; loaddefs.el --- automatically extracted autoloads> $@
134         echo ;;; Code:>> $@
135         echo \f>> $@
136         echo ;;; Local Variables:>> $@
137         echo ;;; version-control: never>> $@
138         echo ;;; no-byte-compile: t>> $@
139         echo ;;; no-update-autoloads: t>> $@
140         echo ;;; End:>> $@
141         echo ;;; loaddefs.el ends here>> $@
143 autoloads: loaddefs.el doit
144         @echo Directories: $(WINS)
145         set EMACSLOADPATH=$(lisp)
146         $(SETLOADPATH) $(emacs) -l autoload --eval $(ARGQUOTE)(setq find-file-hooks nil generated-autoload-file $(DQUOTE)$(lisp)/loaddefs.el$(DQUOTE))$(ARGQUOTE) -f batch-update-autoloads $(lisp) $(WINS)
148 subdirs.el:
149         $(MAKE) $(MFLAGS) update-subdirs
151 # Need separate version for sh and native cmd.exe
152 update-subdirs: update-subdirs-$(SHELLTYPE)
154 update-subdirs-CMD: doit
155         @set QWINS=
156         @for %d in ($(WINS)) do if not (%d)==(term) set QWINS=%QWINS% "%d"
157         echo ;; In load-path, after this directory should come> subdirs.el
158         echo ;; certain of its subdirectories.  Here we specify them.>> subdirs.el
159         echo (normal-top-level-add-to-load-path $(SQUOTE)(%QWINS%))>> subdirs.el
161 update-subdirs-SH: doit
162         wd=$(lisp); $(setwins); \
163         for file in $$wins; do \
164            $(srcdir)/update-subdirs $$file; \
165         done;
167 updates: update-subdirs autoloads finder-data custom-deps
169 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
170         $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
172 TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
173         $(ETAGS) -o TAGS-LISP $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
175 .SUFFIXES: .elc .el
177 .el.elc:
178         set EMACSLOADPATH=$(lisp)
179         -$(SETLOADPATH) $(emacs) -f batch-byte-compile $<
181 $(DONTCOMPILE:.el=.elc):
182         -$(DEL) $@
184 # Compile all Lisp files, except those from DONTCOMPILE.  This
185 # compiles files unconditionally.  All .elc files are made writable
186 # before compilation in case we checked out read-only (CVS option -r).
187 # Files MUST be compiled one by one.  If we compile several files in a
188 # row we can't make sure that the compilation environment is clean.
189 # We also set the load-path of the Emacs used for compilation to the
190 # current directory and its subdirectories, to make sure require's and
191 # load's in the files being compiled find the right files.
193 # Need separate version for sh and native cmd.exe
194 compile-files: subdirs.el compile-files-$(SHELLTYPE) doit
196 compile-files-CMD:
197         set EMACSLOADPATH=$(lisp)
198 #       -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
199         for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
200         for %f in ($(lisp) $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g
202 compile-files-SH:
203 #       for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
204         for el in $(COMPILE_FIRST); do \
205           echo Compiling $$el; \
206           EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
207         done
208         for dir in $(lisp) $(WINS); do \
209           for el in $$dir/*.el; do \
210             echo Compiling $$el; \
211             EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
212           done; \
213         done
215 # Backup compiled Lisp files in elc.tar.gz.  If that file already
216 # exists, make a backup of it.
218 backup-compiled-files:
219         -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
220         -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
222 # Compile Lisp files, but save old compiled files first.
224 compile: backup-compiled-files compile-files
226 # Recompile all Lisp files which are newer than their .elc files.
227 # Note that this doesn't create .elc files.  It only recompiles if an
228 # .elc is present.
230 recompile: doit
231         set EMACSLOADPATH=$(lisp)
232         $(SETLOADPATH) $(emacs) -f batch-byte-recompile-directory .
234 # Prepare a bootstrap in the lisp subdirectory.  Build loaddefs.el,
235 # because it's not sure it's up-to-date, and if it's not, that might
236 # lead to errors during the bootstrap because something fails to
237 # autoload as expected.  Remove compiled Lisp files so that
238 # bootstrap-emacs will be built from sources only.
240 # Need separate version for sh and native cmd.exe
241 bootstrap-clean: bootstrap-clean-$(SHELLTYPE)
243 bootstrap-clean-CMD:
244         if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
245         -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
247 bootstrap-clean-SH:
248         if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
249         -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
251 # Generate/update files for the bootstrap process.
253 bootstrap: autoloads compile-files custom-deps
256 # Assuming INSTALL_DIR is defined, copy the elisp files to it
257 # Windows 95 makes this harder than it should be.
259 install:
260                 - mkdir "$(INSTALL_DIR)/lisp"
261                 - $(DEL) ../same-dir.tst
262                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
263                 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
264 #ifdef COPY_LISP_SOURCE
265                 $(IFNOTSAMEDIR) $(CP_DIR) . "$(INSTALL_DIR)/lisp" $(ENDIF)
266 #else
267 #               $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
268 #               $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
269 #               $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
270 #               $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
271 #               $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
272 #               $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
273 #               $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
274 #               $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
275 #               $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
276 #               $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
277 #               $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
278 #endif
279                 - $(DEL) ../same-dir.tst
280                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
283 # Maintenance
285 clean:
286                 - $(DEL) *~