Merge from trunk.
[bpt/emacs.git] / lisp / Makefile.in
index 6b96a53..138ad5a 100644 (file)
@@ -1,5 +1,5 @@
 # Maintenance productions for the Lisp directory
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2013 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -24,6 +24,10 @@ abs_top_builddir = @abs_top_builddir@
 lisp = $(srcdir)
 VPATH = $(srcdir)
 
+# Empty for all systems except MinGW, where xargs needs an explicit
+# limitation.
+XARGS_LIMIT = @XARGS_LIMIT@
+
 # You can specify a different executable on the make command line,
 # e.g. "make EMACS=../src/emacs ...".
 
@@ -139,6 +143,8 @@ all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
 
 doit:
 
+.PHONY: all doit custom-deps finder-data autoloads update-subdirs
+
 # custom-deps and finder-data both used to scan _all_ the *.el files.
 # This could lead to problems in parallel builds if automatically
 # generated *.el files (eg loaddefs etc) were being changed at the same time.
@@ -158,21 +164,21 @@ $(lisp)/cus-load.el:
 custom-deps: doit
        cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
-       $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
+       $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file (reveal-filename "$(lisp)/cus-load.el"))' -f custom-make-dependencies $$wins
 
 $(lisp)/finder-inf.el:
        $(MAKE) $(MFLAGS) finder-data
 finder-data: doit
        cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
-       $(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
+       $(emacs) -l finder --eval '(setq generated-finder-keywords-file (reveal-filename "$(lisp)/finder-inf.el"))' -f finder-compile-keywords-make-dist $$wins
 
 # The chmod +w is to handle env var CVSREAD=1.
 autoloads: $(LOADDEFS) doit
        cd $(lisp) && chmod +w $(AUTOGEN_VCS)
        cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
-       $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
+       $(emacs) -l autoload --eval '(setq generated-autoload-file (reveal-filename "$(lisp)/loaddefs.el"))' -f batch-update-autoloads $$wins
 
 # This is required by the bootstrap-emacs target in ../src/Makefile, so
 # we know that if we have an emacs executable, we also have a subdirs.el.
@@ -184,6 +190,8 @@ update-subdirs: doit
           $(top_srcdir)/build-aux/update-subdirs $$file; \
        done;
 
+.PHONY: updates bzr-update update-authors
+
 # Some modes of make-dist use this.
 updates: update-subdirs autoloads finder-data custom-deps
 
@@ -215,6 +223,7 @@ TAGS TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptags
 # src/Makefile.in to rebuild a particular Lisp file, no questions asked.
 # Use byte-compile-refresh-preloaded to try and work around some of
 # the most common problems of not bootstrapping from a clean state.
+.PHONY: compile-onefile
 compile-onefile:
        @echo Compiling $(THEFILE)
        @# Use byte-compile-refresh-preloaded to try and work around some of
@@ -269,7 +278,7 @@ compile-main: compile-clean
          test -f $$el || continue; \
          test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
          echo "$${el}c"; \
-       done | xargs echo) | \
+       done | xargs $(XARGS_LIMIT) echo) | \
        while read chunk; do \
          $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
        done
@@ -302,6 +311,8 @@ compile-always: doit
        cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
        $(MAKE) $(MFLAGS) compile EMACS=$(EMACS)
 
+.PHONY: compile-calc backup-compiled-files compile-after-backup
+
 compile-calc:
        for el in $(lisp)/calc/*.el; do \
          echo Compiling $$el; \
@@ -326,7 +337,7 @@ compile-after-backup: backup-compiled-files compile-always
 # starting Emacs many times (it was 33% faster on a test with a
 # random 10% of the .el files needing recompilation).
 # Unlike compile, this is not parallelizable; so if you have more than
-# one core, compile will be (much) faster.
+# one core and use make -j#, compile will be (much) faster.
 # This rule also produces less accurate compilation warnings.
 # The environment of later files is affected by definitions in
 # earlier ones, so it does not produce some warnings that it should.
@@ -334,6 +345,7 @@ compile-after-backup: backup-compiled-files compile-always
 # files that use byte-compile-dynamic are updated.
 # There is no reason to use this rule unless you only have a single
 # core and CPU time is an issue.
+.PHONY: compile-one-process
 compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc
        $(emacs) $(BYTE_COMPILE_FLAGS) \
            --eval "(batch-byte-recompile-directory 0)" $(lisp)
@@ -356,11 +368,12 @@ MH_E_SRC = $(MH_E_DIR)/mh-acros.el $(MH_E_DIR)/mh-alias.el    \
        $(MH_E_DIR)/mh-tool-bar.el $(MH_E_DIR)/mh-utils.el    \
        $(MH_E_DIR)/mh-xface.el
 
+.PHONY: mh-autoloads
 mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el
 $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
-          --eval "(setq generated-autoload-file \"$@\")" \
+          --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(MH_E_DIR)
 
@@ -368,17 +381,17 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
 # an own subdirectory. OTOH, it does not hurt to keep them in
 # lisp/net.
 TRAMP_DIR = $(lisp)/net
-TRAMP_SRC = $(TRAMP_DIR)/tramp.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_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)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
-          --eval "(setq generated-autoload-file \"$@\")" \
+          --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(TRAMP_DIR)
 
@@ -400,29 +413,31 @@ CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el  \
 $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
-          --eval "(setq generated-autoload-file \"$@\")" \
+          --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
 $(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
-          --eval "(setq generated-autoload-file \"$@\")" \
+          --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
 $(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
-          --eval "(setq generated-autoload-file \"$@\")" \
+          --eval "(setq generated-autoload-file (reveal-filename \"$@\"))" \
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
+.PHONY: bootstrap-clean distclean maintainer-clean
+
 bootstrap-clean:
        cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL)
 
 distclean:
-       -rm -f ./Makefile
+       -rm -f ./Makefile $(lisp)/loaddefs.el~
 
 maintainer-clean: distclean bootstrap-clean