X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/9a0115abd18f219f234d6dd460cf7f5ed3c0332f..060ca4088d928e0808d13a551ea11b2fc00769d4:/lisp/makefile.w32-in diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 33c87778df..f4bbaf3804 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -1,5 +1,5 @@ -# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. -# Copyright (C) 2000-2012 Free Software Foundation, Inc. +# -*- Makefile -*- for GNU Emacs on the Microsoft Windows API. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -70,25 +70,20 @@ AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \ # During bootstrapping the byte-compiler is run interpreted when compiling # itself, and uses more stack than usual. # -BIG_STACK_DEPTH = 1200 +BIG_STACK_DEPTH = 2200 BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))" BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS) # Files to compile before others during a bootstrap. This is done to -# speed up the bootstrap process. The CC files are compiled first -# because CC mode tweaks the compilation process, and requiring -# cc-mode when it is not compiled doesn't work during the -# bootstrapping. +# speed up the bootstrap process. COMPILE_FIRST = \ - $(lisp)/emacs-lisp/byte-opt.el \ - $(lisp)/emacs-lisp/bytecomp.el \ $(lisp)/emacs-lisp/macroexp.el \ $(lisp)/emacs-lisp/cconv.el \ - $(lisp)/subr.el \ - $(lisp)/progmodes/cc-mode.el \ - $(lisp)/progmodes/cc-vars.el + $(lisp)/emacs-lisp/byte-opt.el \ + $(lisp)/emacs-lisp/bytecomp.el \ + $(lisp)/emacs-lisp/autoload.el # The actual Emacs command run in the targets below. # The quotes around $(EMACS) are here because the user could type @@ -109,27 +104,39 @@ WINS_CEDET=\ cedet/semantic/symref \ cedet/semantic/wisent -WINS_BASIC=\ +# The list of subdirectories is subdivided into 4 more or less equal +# parts so that we could have 4-way parallelism while compiling Lisp +# files, which helps to slash bootstrap times. See the 'compile' +# target below. +WINS_BASIC1=\ calc \ calendar \ emacs-lisp \ - emulation \ erc \ - eshell \ + net \ + url + +WINS_BASIC2=\ gnus \ international \ language \ - mail \ + mail + +WINS_BASIC3=\ + emulation \ mh-e \ - net \ nxml \ org \ play \ - progmodes \ textmodes \ - url \ vc +WINS_BASIC4=\ + eshell \ + progmodes + +WINS_BASIC= $(WINS_BASIC1) $(WINS_BASIC2) $(WINS_BASIC3) $(WINS_BASIC4) + # Directories with lisp files to compile, and to extract data from # (customs, autoloads, etc.) WINS_UPDATES=$(WINS_BASIC) \ @@ -173,12 +180,12 @@ $(lisp)/cus-load.el: # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as # this can break with GNU Make 3.81 and later if sh.exe is used. -custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit +custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el $(lisp)/subdirs.el doit @echo Directories: $(WINS_UPDATES) -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \ -f custom-make-dependencies $(lisp) $(WINS_UPDATES) -finder-data: $(lisp)/loaddefs.el doit +finder-data: $(lisp)/loaddefs.el $(lisp)/subdirs.el doit @echo Directories: $(WINS_UPDATES) $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES) @@ -243,12 +250,12 @@ update-subdirs-CMD: doit echo ;; End:>> $(lisp)/subdirs.el update-subdirs-SH: doit - $(srcdir)/update-subdirs $(lisp); \ + $(srcdir)/build-aux/update-subdirs $(lisp); \ for file in $(WINS_SUBDIR); do \ - $(srcdir)/update-subdirs $$file; \ + $(srcdir)/build-aux/update-subdirs $$file; \ done; -updates: update-subdirs autoloads mh-autoloads finder-data custom-deps +updates: $(lisp)/subdirs.el autoloads mh-autoloads finder-data custom-deps # This is useful after "bzr up". bzr-update: recompile autoloads finder-data custom-deps @@ -316,22 +323,71 @@ TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsf # compiled find the right files. # Need separate version for sh and native cmd.exe -compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit +compile: $(lisp)/subdirs.el compile0-$(SHELLTYPE) compile1-$(SHELLTYPE) compile2-$(SHELLTYPE) compile3-$(SHELLTYPE) compile4-$(SHELLTYPE) doit -compile-CMD: +compile0-CMD: autoloads # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g for %%f in ($(COMPILE_FIRST)) do \ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f - for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \ + +compile1-CMD: autoloads compile0-CMD + for %%f in (. $(WINS_BASIC1)) do for %%g in (%%f/*.el) do \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g + +compile2-CMD: autoloads compile0-CMD + for %%f in ($(WINS_BASIC2)) do for %%g in (%%f/*.el) do \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g + +compile3-CMD: autoloads compile0-CMD + for %%f in ($(WINS_BASIC3)) do for %%g in (%%f/*.el) do \ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g -compile-SH: +compile4-CMD: autoloads compile0-CMD + for %%f in ($(WINS_BASIC4) $(WINS_CEDET) term obsolete) do for %%g in (%%f/*.el) do \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g + +compile0-SH: autoloads # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done for el in $(COMPILE_FIRST); do \ echo Compiling $$el; \ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ done - for dir in $(lisp) $(WINS); do \ + +compile1-SH: autoloads compile0-SH + for dir in $(lisp) $(WINS_BASIC1); do \ + for el in $$dir/*.el; do \ + if test -f $$el; \ + then \ + echo Compiling $$el; \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ + fi \ + done; \ + done + +compile2-SH: autoloads compile0-SH + for dir in $(WINS_BASIC2); do \ + for el in $$dir/*.el; do \ + if test -f $$el; \ + then \ + echo Compiling $$el; \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ + fi \ + done; \ + done + +compile3-SH: autoloads compile0-SH + for dir in $(WINS_BASIC3); do \ + for el in $$dir/*.el; do \ + if test -f $$el; \ + then \ + echo Compiling $$el; \ + $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ + fi \ + done; \ + done + +compile4-SH: autoloads compile0-SH + for dir in $(WINS_BASIC4) $(WINS_CEDET) term obsolete; do \ for el in $$dir/*.el; do \ if test -f $$el; \ then \ @@ -388,7 +444,7 @@ backup-compiled-files: compile-after-backup: backup-compiled-files compile-always compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \ - $(lisp)/emacs-lisp/autoload.elc + $(lisp)/emacs-lisp/autoload.elc $(lisp)/subdirs.el # Recompile all Lisp files which are newer than their .elc files. # Note that this doesn't create .elc files. It only recompiles if an @@ -398,7 +454,7 @@ compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp) -$(lisp)/calendar/cal-loaddefs.el: +$(lisp)/calendar/cal-loaddefs.el: $(lisp)/subdirs.el "$(EMACS)" $(EMACSOPT) -l autoload \ --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ --eval "(setq find-file-suppress-same-file-warnings t)" \ @@ -406,7 +462,7 @@ $(lisp)/calendar/cal-loaddefs.el: -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \ $(MAKE) ./calendar -$(lisp)/calendar/diary-loaddefs.el: +$(lisp)/calendar/diary-loaddefs.el: $(lisp)/subdirs.el "$(EMACS)" $(EMACSOPT) -l autoload \ --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ --eval "(setq find-file-suppress-same-file-warnings t)" \ @@ -414,7 +470,7 @@ $(lisp)/calendar/diary-loaddefs.el: -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \ $(MAKE) ./calendar -$(lisp)/calendar/hol-loaddefs.el: +$(lisp)/calendar/hol-loaddefs.el: $(lisp)/subdirs.el "$(EMACS)" $(EMACSOPT) -l autoload \ --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ --eval "(setq find-file-suppress-same-file-warnings t)" \ @@ -442,7 +498,7 @@ MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \ # See the commentary for autoloads above for why we use ./mh-e below # instead of $(lisp)/mh-e. mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el -$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) +$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) $(lisp)/subdirs.el "$(EMACS)" $(EMACSOPT) \ -l autoload \ --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \ @@ -452,23 +508,24 @@ $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e # Update TRAMP internal autoloads. Maybe we could move tramp*.el into -# its own subdirectory. OTOH, it does not hurt to keep them in +# an own subdirectory. OTOH, it does not hurt to keep them in # lisp/net. -TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \ - $(lisp)/net/tramp-cmds.el $(lisp)/net/tramp-compat.el \ - $(lisp)/net/tramp-ftp.el $(lisp)/net/tramp-gvfs.el \ - $(lisp)/net/tramp-gw.el $(lisp)/net/tramp-sh.el \ - $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \ - $(lisp)/net/trampver.el - -$(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC) +TRAMP_DIR = $(lisp)/net +TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \ + $(TRAMP_DIR)/tramp-cache.el $(TRAMP_DIR)/tramp-cmds.el \ + $(TRAMP_DIR)/tramp-compat.el $(TRAMP_DIR)/tramp-ftp.el \ + $(TRAMP_DIR)/tramp-gvfs.el $(TRAMP_DIR)/tramp-gw.el \ + $(TRAMP_DIR)/tramp-sh.el $(TRAMP_DIR)/tramp-smb.el \ + $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el + +$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) $(lisp)/subdirs.el "$(EMACS)" $(EMACSOPT) \ -l autoload \ --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \ --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \ --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \ -f w32-batch-update-autoloads \ - $(ARGQUOTE)$(lisp)/net/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net + $(ARGQUOTE)$(TRAMP_DIR)/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net # Prepare a bootstrap in the lisp subdirectory. # @@ -486,6 +543,7 @@ $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC) # Need separate version for sh and native cmd.exe bootstrap-clean: - $(DEL) $(lisp)/loaddefs.el + - $(DEL) $(lisp)/subdirs.el $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE) bootstrap-clean-CMD: @@ -501,7 +559,7 @@ bootstrap-clean-SH: # When done, remove bootstrap-emacs from ../bin, so that # it will not be mistaken for an installed binary. -bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps +bootstrap: $(lisp)/subdirs.el compile finder-data custom-deps - $(DEL) "$(EMACS)" # @@ -510,9 +568,9 @@ bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps # install: - mkdir "$(INSTALL_DIR)/lisp" - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" - echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" + echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" #ifdef COPY_LISP_SOURCE $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF) #else @@ -528,8 +586,8 @@ install: # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) #endif - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" # Need to copy *.el files first, to avoid "source file is newer" annoyance # since cp does not preserve time stamps @@ -605,7 +663,8 @@ $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \ $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \ $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \ $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \ - $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc + $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc \ + $(lisp)/subdirs.el $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \ $(lisp)/progmodes/cc-align.elc