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