makefile.w32-in 24 KB

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