makefile.w32-in 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
  2. # Copyright (C) 2000-2012 Free Software Foundation, Inc.
  3. # This file is part of GNU Emacs.
  4. # GNU Emacs is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. # GNU Emacs is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  14. ALL =
  15. all: $(ALL)
  16. SQUOTE='
  17. # '
  18. lisp = $(CURDIR)
  19. srcdir = $(CURDIR)/..
  20. # You can specify a different executable on the make command line,
  21. # e.g. "make EMACS=../bin/emacs ...".
  22. EMACS = ../src/$(BLD)/emacs.exe
  23. # Command line flags for Emacs.
  24. EMACSOPT = -batch --no-site-file --no-site-lisp
  25. # Extra flags to pass to the byte compiler
  26. BYTE_COMPILE_EXTRA_FLAGS =
  27. # For example to not display the undefined function warnings you can use this:
  28. # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
  29. # The example above is just for developers, it should not be used by default.
  30. # Set EMACSLOADPATH correctly (already defined in environment).
  31. EMACSLOADPATH=$(lisp)
  32. # Use C locale
  33. LC_ALL = C
  34. lisptagsfiles1 = $(lisp)/*.el
  35. lisptagsfiles2 = $(lisp)/*/*.el
  36. lisptagsfiles3 = $(lisp)/*/*/*.el
  37. lisptagsfiles4 = $(lisp)/*/*/*/*.el
  38. ETAGS = "../lib-src/$(BLD)/etags.exe"
  39. ## $(DEST) is overridden by ../src/makefile.w32-in.
  40. DEST=$(lisp)
  41. # Automatically generated autoload files, apart from lisp/loaddefs.el.
  42. LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
  43. $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
  44. $(lisp)/mh-e/mh-loaddefs.el $(lisp)/net/tramp-loaddefs.el
  45. AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
  46. $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el \
  47. $(lisp)/calc/calc-loaddefs.el $(lisp)/nxml/subdirs.el \
  48. $(lisp)/cedet/semantic/loaddefs.el $(lisp)/cedet/ede/loaddefs.el \
  49. $(lisp)/cedet/srecode/loaddefs.el
  50. # Value of max-lisp-eval-depth when compiling initially.
  51. # During bootstrapping the byte-compiler is run interpreted when compiling
  52. # itself, and uses more stack than usual.
  53. #
  54. BIG_STACK_DEPTH = 2200
  55. BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))"
  56. BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS)
  57. # Files to compile before others during a bootstrap. This is done to
  58. # speed up the bootstrap process. The CC files are compiled first
  59. # because CC mode tweaks the compilation process, and requiring
  60. # cc-mode when it is not compiled doesn't work during the
  61. # bootstrapping.
  62. COMPILE_FIRST = \
  63. $(lisp)/emacs-lisp/byte-opt.el \
  64. $(lisp)/emacs-lisp/bytecomp.el \
  65. $(lisp)/emacs-lisp/macroexp.el \
  66. $(lisp)/emacs-lisp/cconv.el \
  67. $(lisp)/progmodes/cc-mode.el \
  68. $(lisp)/progmodes/cc-vars.el
  69. # The actual Emacs command run in the targets below.
  70. # The quotes around $(EMACS) are here because the user could type
  71. # it with forward slashes and without quotes, which will fail if
  72. # the shell is cmd.exe.
  73. emacs = "$(EMACS)" $(EMACSOPT)
  74. # Have to define the list of subdirs manually when not using sh.
  75. WINS_CEDET=\
  76. cedet \
  77. cedet/ede \
  78. cedet/semantic \
  79. cedet/srecode \
  80. cedet/semantic/analyze \
  81. cedet/semantic/bovine \
  82. cedet/semantic/decorate \
  83. cedet/semantic/symref \
  84. cedet/semantic/wisent
  85. WINS_BASIC=\
  86. calc \
  87. calendar \
  88. emacs-lisp \
  89. emulation \
  90. erc \
  91. eshell \
  92. gnus \
  93. international \
  94. language \
  95. mail \
  96. mh-e \
  97. net \
  98. nxml \
  99. org \
  100. play \
  101. progmodes \
  102. textmodes \
  103. url \
  104. vc
  105. # Directories with lisp files to compile, and to extract data from
  106. # (customs, autoloads, etc.)
  107. WINS_UPDATES=$(WINS_BASIC) \
  108. $(WINS_CEDET)
  109. # Directories to add to subdirs.el
  110. WINS_SUBDIR=$(WINS_BASIC) \
  111. obsolete
  112. # All directories
  113. WINS= $(WINS_UPDATES) \
  114. term \
  115. obsolete
  116. doit:
  117. cus-load.el-SH:
  118. echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
  119. echo ";;" >> $@; echo ";;; Code:" >> $@
  120. echo " " >> $@
  121. echo ";; Local Variables:" >> $@
  122. echo ";; version-control: never" >> $@
  123. echo ";; no-byte-compile: t" >> $@
  124. echo ";; no-update-autoloads: t" >> $@
  125. echo ";; End:" >> $@
  126. cus-load.el-CMD:
  127. echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
  128. echo ;;>> $@
  129. echo ;;; Code:>> $@
  130. echo. >> $@
  131. echo ;; Local Variables:>> $@
  132. echo ;; version-control: never>> $@
  133. echo ;; no-byte-compile: t>> $@
  134. echo ;; no-update-autoloads: t>> $@
  135. echo ;; End:>> $@
  136. $(lisp)/cus-load.el:
  137. $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
  138. mv cus-load.el-$(SHELLTYPE) $@
  139. # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
  140. # this can break with GNU Make 3.81 and later if sh.exe is used.
  141. custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
  142. @echo Directories: $(WINS_UPDATES)
  143. -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
  144. -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
  145. finder-data: $(lisp)/loaddefs.el doit
  146. @echo Directories: $(WINS_UPDATES)
  147. $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
  148. $(lisp)/loaddefs.el:
  149. $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
  150. cp loaddefs.el-$(SHELLTYPE) $@
  151. rm loaddefs.el-$(SHELLTYPE)
  152. loaddefs.el-SH:
  153. echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
  154. echo ";;" >> $@; echo ";;; Code:" >> $@
  155. echo " " >> $@
  156. echo ";; Local Variables:" >> $@
  157. echo ";; version-control: never" >> $@
  158. echo ";; no-byte-compile: t" >> $@
  159. echo ";; no-update-autoloads: t" >> $@
  160. echo ";; coding: utf-8" >> $@
  161. echo ";; End:" >> $@
  162. echo ";;; loaddefs.el ends here" >> $@
  163. loaddefs.el-CMD:
  164. echo ;;; loaddefs.el --- automatically extracted autoloads> $@
  165. echo ;;>> $@
  166. echo ;;; Code:>> $@
  167. echo. >> $@
  168. echo ;; Local Variables:>> $@
  169. echo ;; version-control: never>> $@
  170. echo ;; no-byte-compile: t>> $@
  171. echo ;; no-update-autoloads: t>> $@
  172. echo ;; coding: utf-8>> $@
  173. echo ;; End:>> $@
  174. echo ;;; loaddefs.el ends here>> $@
  175. # Use . instead of $(lisp) because $(lisp) is an absolute file name,
  176. # including a drive letter and any leading directories, so the generated
  177. # loaddefs.el will mention file names that on other machine reference
  178. # possibly non-existent directories.
  179. #
  180. # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
  181. # this can break with GNU Make 3.81 and later if sh.exe is used.
  182. autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
  183. @echo Directories: . $(WINS_UPDATES)
  184. $(emacs) -l autoload \
  185. --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
  186. -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
  187. $(lisp)/subdirs.el:
  188. $(MAKE) $(MFLAGS) update-subdirs
  189. # Need separate version for sh and native cmd.exe
  190. update-subdirs: update-subdirs-$(SHELLTYPE)
  191. update-subdirs-CMD: doit
  192. echo ;; In load-path, after this directory should come> $(lisp)/subdirs.el
  193. echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
  194. echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
  195. @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
  196. echo ))>> $(lisp)/subdirs.el
  197. echo ;; Local Variables:>> $(lisp)/subdirs.el
  198. echo ;; version-control: never>> $(lisp)/subdirs.el
  199. echo ;; no-byte-compile: t>> $(lisp)/subdirs.el
  200. echo ;; End:>> $(lisp)/subdirs.el
  201. update-subdirs-SH: doit
  202. $(srcdir)/build-aux/update-subdirs $(lisp); \
  203. for file in $(WINS_SUBDIR); do \
  204. $(srcdir)/build-aux/update-subdirs $$file; \
  205. done;
  206. updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
  207. # This is useful after "bzr up".
  208. bzr-update: recompile autoloads finder-data custom-deps
  209. # For backwards compatibility:
  210. cvs-update: bzr-update
  211. # Update the AUTHORS file.
  212. update-authors:
  213. $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
  214. TAGS: TAGS-$(MAKETYPE)
  215. TAGS-LISP: TAGS-LISP-$(MAKETYPE)
  216. TAGS-nmake:
  217. echo This target is not supported with NMake
  218. exit -1
  219. TAGS-LISP-nmake:
  220. echo This target is not supported with NMake
  221. exit -1
  222. TAGS-gmake: TAGS-$(SHELLTYPE)
  223. TAGS-LISP-gmake: TAGS-LISP-$(SHELLTYPE)
  224. TAGS-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
  225. - $(DEL) TAGS
  226. for dir in . $(WINS_UPDATES); do \
  227. $(ETAGS) -a $(lisp)/$$dir/*.el; \
  228. done
  229. TAGS-LISP-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
  230. - $(DEL) $(DEST)/TAGS-LISP
  231. for dir in . $(WINS_UPDATES); do \
  232. $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/$$dir/*.el; \
  233. done
  234. TAGS-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
  235. - $(DEL) TAGS
  236. for %%d in (. $(WINS_UPDATES)) do $(ETAGS) -a $(lisp)/%%d/*.el
  237. TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
  238. - $(DEL) $(DEST)/TAGS-LISP
  239. for %%d in (. $(WINS_UPDATES)) do \
  240. $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/%%d/*.el
  241. .SUFFIXES: .elc .el
  242. .el.elc:
  243. -$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
  244. # Compile all Lisp files, but don't recompile those that are up to
  245. # date. Some files don't actually get compiled because they set the
  246. # local variable no-byte-compile.
  247. # All .elc files are made writable before compilation in case we
  248. # checked out read-only (CVS option -r). Files MUST be compiled one by
  249. # one. If we compile several files in a row we can't make sure that
  250. # the compilation environment is clean. We also set the load-path of
  251. # the Emacs used for compilation to the current directory and its
  252. # subdirectories, to make sure require's and load's in the files being
  253. # compiled find the right files.
  254. # Need separate version for sh and native cmd.exe
  255. compile: $(lisp)/subdirs.el compile-$(SHELLTYPE) doit
  256. compile-CMD: autoloads
  257. # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
  258. for %%f in ($(COMPILE_FIRST)) do \
  259. $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f
  260. for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
  261. $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
  262. compile-SH: autoloads
  263. # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
  264. for el in $(COMPILE_FIRST); do \
  265. echo Compiling $$el; \
  266. $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
  267. done
  268. for dir in $(lisp) $(WINS); do \
  269. for el in $$dir/*.el; do \
  270. if test -f $$el; \
  271. then \
  272. echo Compiling $$el; \
  273. $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
  274. fi \
  275. done; \
  276. done
  277. # Compile all Lisp files. This is like `compile' but compiles files
  278. # unconditionally. Some files don't actually get compiled because they
  279. # set the local variable no-byte-compile.
  280. compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
  281. compile-always-CMD:
  282. # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
  283. for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
  284. for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f/%%g
  285. compile-always-SH:
  286. # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
  287. for el in $(COMPILE_FIRST); do \
  288. echo Compiling $$el; \
  289. $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
  290. done
  291. for dir in $(lisp) $(WINS); do \
  292. for el in $$dir/*.el; do \
  293. echo Compiling $$el; \
  294. $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
  295. done; \
  296. done
  297. compile-calc: compile-calc-$(SHELLTYPE)
  298. compile-calc-CMD:
  299. for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
  300. compile-calc-SH:
  301. for el in $(lisp)/calc/*.el; do \
  302. echo Compiling $$el; \
  303. $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
  304. done
  305. # Backup compiled Lisp files in elc.tar.gz. If that file already
  306. # exists, make a backup of it.
  307. backup-compiled-files:
  308. -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
  309. -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
  310. # Compile Lisp files, but save old compiled files first.
  311. compile-after-backup: backup-compiled-files compile-always
  312. compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
  313. $(lisp)/emacs-lisp/autoload.elc
  314. # Recompile all Lisp files which are newer than their .elc files.
  315. # Note that this doesn't create .elc files. It only recompiles if an
  316. # .elc is present.
  317. # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
  318. # this can break with GNU Make 3.81 and later if sh.exe is used.
  319. recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
  320. $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
  321. $(lisp)/calendar/cal-loaddefs.el:
  322. "$(EMACS)" $(EMACSOPT) -l autoload \
  323. --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
  324. --eval "(setq find-file-suppress-same-file-warnings t)" \
  325. --eval "(setq make-backup-files nil)" \
  326. -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
  327. $(MAKE) ./calendar
  328. $(lisp)/calendar/diary-loaddefs.el:
  329. "$(EMACS)" $(EMACSOPT) -l autoload \
  330. --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
  331. --eval "(setq find-file-suppress-same-file-warnings t)" \
  332. --eval "(setq make-backup-files nil)" \
  333. -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
  334. $(MAKE) ./calendar
  335. $(lisp)/calendar/hol-loaddefs.el:
  336. "$(EMACS)" $(EMACSOPT) -l autoload \
  337. --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
  338. --eval "(setq find-file-suppress-same-file-warnings t)" \
  339. --eval "(setq make-backup-files nil)" \
  340. -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
  341. $(MAKE) ./calendar
  342. # Update MH-E internal autoloads. These are not to be confused with
  343. # the autoloads for the MH-E entry points, which are already in
  344. # loaddefs.el.
  345. MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
  346. $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
  347. $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
  348. $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
  349. $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
  350. $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
  351. $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
  352. $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
  353. $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
  354. $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
  355. $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
  356. $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
  357. $(lisp)/mh-e/mh-xface.el
  358. # See the commentary for autoloads above for why we use ./mh-e below
  359. # instead of $(lisp)/mh-e.
  360. mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
  361. $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
  362. "$(EMACS)" $(EMACSOPT) \
  363. -l autoload \
  364. --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
  365. --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
  366. --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
  367. -f w32-batch-update-autoloads \
  368. $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
  369. # Update TRAMP internal autoloads. Maybe we could move tramp*.el into
  370. # its own subdirectory. OTOH, it does not hurt to keep them in
  371. # lisp/net.
  372. TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \
  373. $(lisp)/net/tramp-cmds.el $(lisp)/net/tramp-compat.el \
  374. $(lisp)/net/tramp-ftp.el $(lisp)/net/tramp-gvfs.el \
  375. $(lisp)/net/tramp-gw.el $(lisp)/net/tramp-sh.el \
  376. $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \
  377. $(lisp)/net/trampver.el
  378. $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC)
  379. "$(EMACS)" $(EMACSOPT) \
  380. -l autoload \
  381. --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \
  382. --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
  383. --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
  384. -f w32-batch-update-autoloads \
  385. $(ARGQUOTE)$(lisp)/net/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
  386. # Prepare a bootstrap in the lisp subdirectory.
  387. #
  388. # Build loaddefs.el to make sure it's up-to-date. If it's not, that
  389. # might lead to errors during the bootstrap because something fails to
  390. # autoload as expected. If there is no emacs binary, then we can't
  391. # build autoloads yet. In that case we have to use ldefs-boot.el;
  392. # bootstrap should always work with ldefs-boot.el. (Because
  393. # loaddefs.el is an automatically generated file, we don't want to
  394. # store it in the source repository).
  395. #
  396. # Remove compiled Lisp files so that bootstrap-emacs will be built from
  397. # sources only.
  398. # Need separate version for sh and native cmd.exe
  399. bootstrap-clean:
  400. - $(DEL) $(lisp)/loaddefs.el
  401. $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
  402. bootstrap-clean-CMD:
  403. # if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
  404. -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
  405. bootstrap-clean-SH:
  406. # if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
  407. # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
  408. -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
  409. # Generate/update files for the bootstrap process.
  410. # When done, remove bootstrap-emacs from ../bin, so that
  411. # it will not be mistaken for an installed binary.
  412. bootstrap: update-subdirs compile finder-data custom-deps
  413. - $(DEL) "$(EMACS)"
  414. #
  415. # Assuming INSTALL_DIR is defined, copy the elisp files to it
  416. # Windows 95 makes this harder than it should be.
  417. #
  418. install:
  419. - mkdir "$(INSTALL_DIR)/lisp"
  420. - $(DEL) ../$(DIRNAME)_same-dir.tst
  421. - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
  422. echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
  423. #ifdef COPY_LISP_SOURCE
  424. $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
  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) ../$(DIRNAME)_same-dir.tst
  439. - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
  440. # Need to copy *.el files first, to avoid "source file is newer" annoyance
  441. # since cp does not preserve time stamps
  442. install-lisp-SH:
  443. cp -f *.el "$(INSTALL_DIR)/lisp"
  444. for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
  445. for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
  446. for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
  447. install-lisp-CMD:
  448. cp -f *.el "$(INSTALL_DIR)/lisp"
  449. for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
  450. for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
  451. for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
  452. # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
  453. # this can break with GNU Make 3.81 and later if sh.exe is used.
  454. check-declare:
  455. $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
  456. #
  457. # Maintenance
  458. #
  459. # We used to delete *~ here, but that might inadvertently remove
  460. # precious files if it happens to match their short 8+3 aliases.
  461. clean:
  462. - $(DEL) *.el~
  463. - $(DEL) calc/calc-loaddefs.el~
  464. - $(DEL) eshell/esh-groups.el~
  465. distclean: clean
  466. - $(DEL) $(lisp)/Makefile
  467. maintainer-clean: bootstrap-clean distclean
  468. - $(DEL) $(AUTOGENEL)
  469. # Dependencies
  470. # CC Mode uses a compile time macro system which causes a compile time
  471. # dependency in cc-*.elc files on the macros in other cc-*.el and the
  472. # version string in cc-defs.el.
  473. $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
  474. $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
  475. $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
  476. $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
  477. $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
  478. $(lisp)/progmodes/cc-vars.elc: \
  479. $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
  480. $(lisp)/progmodes/cc-align.elc: \
  481. $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
  482. $(lisp)/progmodes/cc-cmds.elc: \
  483. $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
  484. $(lisp)/progmodes/cc-compat.elc: \
  485. $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
  486. $(lisp)/progmodes/cc-engine.elc
  487. $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
  488. $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
  489. $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
  490. $(lisp)/progmodes/cc-vars.elc
  491. $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
  492. $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
  493. $(lisp)/font-lock.elc
  494. $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
  495. $(lisp)/emacs-lisp/cl.elc
  496. $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
  497. $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
  498. $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
  499. $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
  500. $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
  501. $(lisp)/progmodes/cc-align.elc
  502. $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
  503. # MH-E dependencies, mainly to prevent failures with parallel
  504. # compilation, due to race conditions between writing a given FOO.elc
  505. # file and another file being compiled that says "(require FOO)",
  506. # which causes Emacs to try to read FOO.elc.
  507. MH_E_DIR = ./mh-e
  508. $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
  509. $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
  510. $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
  511. $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
  512. $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
  513. $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
  514. $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
  515. $(MH_E_DIR)/mh-e.elc
  516. $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
  517. $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
  518. $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
  519. $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
  520. $(lisp)/emacs-lisp/cl.elc
  521. $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
  522. $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
  523. $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
  524. $(MH_E_DIR)/mh-scan.elc
  525. $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
  526. $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
  527. $(lisp)/gnus/gnus-util.elc
  528. $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
  529. $(lisp)/progmodes/which-func.elc
  530. $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
  531. $(MH_E_DIR)/mh-utils.elc:\
  532. $(lisp)/font-lock.elc
  533. $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
  534. $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
  535. $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
  536. $(lisp)/cus-face.elc
  537. $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
  538. $(lisp)/gnus/mm-view.elc $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
  539. $(MH_E_DIR)/mh-print.elc: $(lisp)/ps-print.elc
  540. $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
  541. $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
  542. $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
  543. $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc