aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-14 18:05:42 +0300
committerEli Zaretskii2013-04-14 18:05:42 +0300
commit5e00cfa51043b42d59061525fecd461d0b2d44f9 (patch)
tree778b18c0d34638ae5747a96ee9a56fd3e891fefd
parentc31abc6232a88ea088fc930577332a33ada87dde (diff)
downloademacs-5e00cfa51043b42d59061525fecd461d0b2d44f9.tar.gz
emacs-5e00cfa51043b42d59061525fecd461d0b2d44f9.zip
Fixed autoloads and byte compilation due to MSYS filename-butchering and xargs limitations.
-rw-r--r--configure.ac3
-rw-r--r--lisp/Makefile.in22
-rw-r--r--lisp/cus-dep.el12
-rw-r--r--lisp/emacs-lisp/autoload.el12
-rw-r--r--lisp/finder.el12
5 files changed, 52 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 67cb02c068e..295e4198e24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1573,6 +1573,7 @@ LIBS_ECLIENT=
1573LIB_WSOCK32= 1573LIB_WSOCK32=
1574NTLIB= 1574NTLIB=
1575CM_OBJ="cm.o" 1575CM_OBJ="cm.o"
1576XARGS_LIMIT=
1576if test "${HAVE_W32}" = "yes"; then 1577if test "${HAVE_W32}" = "yes"; then
1577 AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) 1578 AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
1578 AC_CHECK_TOOL(WINDRES, [windres], 1579 AC_CHECK_TOOL(WINDRES, [windres],
@@ -1603,6 +1604,7 @@ if test "${HAVE_W32}" = "yes"; then
1603 LIBS_ECLIENT="-lcomctl32" 1604 LIBS_ECLIENT="-lcomctl32"
1604 LIB_WSOCK32="-lwsock32" 1605 LIB_WSOCK32="-lwsock32"
1605 NTLIB="ntlib.$ac_objext" 1606 NTLIB="ntlib.$ac_objext"
1607 XARGS_LIMIT="-s 10000"
1606 fi 1608 fi
1607fi 1609fi
1608AC_SUBST(W32_OBJ) 1610AC_SUBST(W32_OBJ)
@@ -1618,6 +1620,7 @@ AC_SUBST(CM_OBJ)
1618AC_SUBST(LIBS_ECLIENT) 1620AC_SUBST(LIBS_ECLIENT)
1619AC_SUBST(LIB_WSOCK32) 1621AC_SUBST(LIB_WSOCK32)
1620AC_SUBST(NTLIB) 1622AC_SUBST(NTLIB)
1623AC_SUBST(XARGS_LIMIT)
1621 1624
1622if test "${HAVE_W32}" = "yes"; then 1625if test "${HAVE_W32}" = "yes"; then
1623 window_system=w32 1626 window_system=w32
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 1e701df348f..1a411e67ff4 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -24,6 +24,10 @@ abs_top_builddir = @abs_top_builddir@
24lisp = $(srcdir) 24lisp = $(srcdir)
25VPATH = $(srcdir) 25VPATH = $(srcdir)
26 26
27# Empty for all systems except MinGW, where xargs needs an explicit
28# limitation.
29XARGS_LIMIT = @XARGS_LIMIT@
30
27# You can specify a different executable on the make command line, 31# You can specify a different executable on the make command line,
28# e.g. "make EMACS=../src/emacs ...". 32# e.g. "make EMACS=../src/emacs ...".
29 33
@@ -160,21 +164,21 @@ $(lisp)/cus-load.el:
160custom-deps: doit 164custom-deps: doit
161 cd $(lisp); $(setwins_almost); \ 165 cd $(lisp); $(setwins_almost); \
162 echo Directories: $$wins; \ 166 echo Directories: $$wins; \
163 $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins 167 $(emacs) -l cus-dep --eval '(set-generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
164 168
165$(lisp)/finder-inf.el: 169$(lisp)/finder-inf.el:
166 $(MAKE) $(MFLAGS) finder-data 170 $(MAKE) $(MFLAGS) finder-data
167finder-data: doit 171finder-data: doit
168 cd $(lisp); $(setwins_almost); \ 172 cd $(lisp); $(setwins_almost); \
169 echo Directories: $$wins; \ 173 echo Directories: $$wins; \
170 $(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins 174 $(emacs) -l finder --eval '(set-generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
171 175
172# The chmod +w is to handle env var CVSREAD=1. 176# The chmod +w is to handle env var CVSREAD=1.
173autoloads: $(LOADDEFS) doit 177autoloads: $(LOADDEFS) doit
174 cd $(lisp) && chmod +w $(AUTOGEN_VCS) 178 cd $(lisp) && chmod +w $(AUTOGEN_VCS)
175 cd $(lisp); $(setwins_almost); \ 179 cd $(lisp); $(setwins_almost); \
176 echo Directories: $$wins; \ 180 echo Directories: $$wins; \
177 $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins 181 $(emacs) -l autoload --eval '(set-generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
178 182
179# This is required by the bootstrap-emacs target in ../src/Makefile, so 183# This is required by the bootstrap-emacs target in ../src/Makefile, so
180# we know that if we have an emacs executable, we also have a subdirs.el. 184# we know that if we have an emacs executable, we also have a subdirs.el.
@@ -274,7 +278,7 @@ compile-main: compile-clean
274 test -f $$el || continue; \ 278 test -f $$el || continue; \
275 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \ 279 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
276 echo "$${el}c"; \ 280 echo "$${el}c"; \
277 done | xargs echo) | \ 281 done | xargs $(XARGS_LIMIT) echo) | \
278 while read chunk; do \ 282 while read chunk; do \
279 $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ 283 $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
280 done 284 done
@@ -369,7 +373,7 @@ mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el
369$(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) 373$(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
370 $(emacs) -l autoload \ 374 $(emacs) -l autoload \
371 --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ 375 --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
372 --eval "(setq generated-autoload-file \"$@\")" \ 376 --eval "(set-generated-autoload-file \"$@\")" \
373 --eval "(setq make-backup-files nil)" \ 377 --eval "(setq make-backup-files nil)" \
374 -f batch-update-autoloads $(MH_E_DIR) 378 -f batch-update-autoloads $(MH_E_DIR)
375 379
@@ -387,7 +391,7 @@ TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \
387$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) 391$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
388 $(emacs) -l autoload \ 392 $(emacs) -l autoload \
389 --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \ 393 --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
390 --eval "(setq generated-autoload-file \"$@\")" \ 394 --eval "(set-generated-autoload-file \"$@\")" \
391 --eval "(setq make-backup-files nil)" \ 395 --eval "(setq make-backup-files nil)" \
392 -f batch-update-autoloads $(TRAMP_DIR) 396 -f batch-update-autoloads $(TRAMP_DIR)
393 397
@@ -409,21 +413,21 @@ CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el \
409$(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) 413$(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC)
410 $(emacs) -l autoload \ 414 $(emacs) -l autoload \
411 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \ 415 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
412 --eval "(setq generated-autoload-file \"$@\")" \ 416 --eval "(set-generated-autoload-file \"$@\")" \
413 --eval "(setq make-backup-files nil)" \ 417 --eval "(setq make-backup-files nil)" \
414 -f batch-update-autoloads $(CAL_DIR) 418 -f batch-update-autoloads $(CAL_DIR)
415 419
416$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) 420$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC)
417 $(emacs) -l autoload \ 421 $(emacs) -l autoload \
418 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \ 422 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
419 --eval "(setq generated-autoload-file \"$@\")" \ 423 --eval "(set-generated-autoload-file \"$@\")" \
420 --eval "(setq make-backup-files nil)" \ 424 --eval "(setq make-backup-files nil)" \
421 -f batch-update-autoloads $(CAL_DIR) 425 -f batch-update-autoloads $(CAL_DIR)
422 426
423$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) 427$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC)
424 $(emacs) -l autoload \ 428 $(emacs) -l autoload \
425 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \ 429 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
426 --eval "(setq generated-autoload-file \"$@\")" \ 430 --eval "(set-generated-autoload-file \"$@\")" \
427 --eval "(setq make-backup-files nil)" \ 431 --eval "(setq make-backup-files nil)" \
428 -f batch-update-autoloads $(CAL_DIR) 432 -f batch-update-autoloads $(CAL_DIR)
429 433
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index 60b427344ea..fd679ee3088 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -38,6 +38,18 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
38 38
39(autoload 'autoload-rubric "autoload") 39(autoload 'autoload-rubric "autoload")
40 40
41(defun set-generated-custom-dependencies-file (file)
42 "Set value of `generated-custom-dependencies-file' from FILE.
43
44On systems other than MS-Windows, just sets the value
45of `generated-custom-dependencies-file'. On MS-Windows, converts
46/d/foo/bar form passed by MSYS Make into d:/foo/bar that Emacs can
47grok. This function is called from lisp/Makefile."
48 (when (and (eq system-type 'windows-nt)
49 (string-match "\\`/[a-zA-Z]/" file))
50 (setq file (concat (substring file 1 2) ":" (substring file 2))))
51 (setq generated-custom-dependencies-file file))
52
41(defun custom-make-dependencies () 53(defun custom-make-dependencies ()
42 "Batch function to extract custom dependencies from .el files. 54 "Batch function to extract custom dependencies from .el files.
43Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" 55Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index edaecd7ff19..f9e691c153c 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -86,6 +86,18 @@ that text will be copied verbatim to `generated-autoload-file'.")
86 86
87(defvar autoload-modified-buffers) ;Dynamically scoped var. 87(defvar autoload-modified-buffers) ;Dynamically scoped var.
88 88
89(defun set-generated-autoload-file (file)
90 "Set value of `generated-autoload-file' from FILE.
91
92On systems other than MS-Windows, just sets the value
93of `generated-autoload-file'. On MS-Windows, converts /d/foo/bar
94form passed by MSYS Make into d:/foo/bar that Emacs can grok.
95This function is called from lisp/Makefile."
96 (when (and (eq system-type 'windows-nt)
97 (string-match "\\`/[a-zA-Z]/" file))
98 (setq file (concat (substring file 1 2) ":" (substring file 2))))
99 (setq generated-autoload-file file))
100
89(defun make-autoload (form file &optional expansion) 101(defun make-autoload (form file &optional expansion)
90 "Turn FORM into an autoload or defvar for source file FILE. 102 "Turn FORM into an autoload or defvar for source file FILE.
91Returns nil if FORM is not a special autoload form (i.e. a function definition 103Returns nil if FORM is not a special autoload form (i.e. a function definition
diff --git a/lisp/finder.el b/lisp/finder.el
index 3d988b41bde..8da589655d7 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -138,6 +138,18 @@ cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
138 138
139(autoload 'autoload-rubric "autoload") 139(autoload 'autoload-rubric "autoload")
140 140
141(defun set-generated-finder-keywords-file (file)
142 "Set value of `generated-finder-keywords-file' from FILE.
143
144On systems other than MS-Windows, just sets the value
145of `generated-finder-keywords-file'. On MS-Windows, converts
146/d/foo/bar form passed by MSYS Make into d:/foo/bar that Emacs
147can grok. This function is called from lisp/Makefile."
148 (when (and (eq system-type 'windows-nt)
149 (string-match "\\`/[a-zA-Z]/" file))
150 (setq file (concat (substring file 1 2) ":" (substring file 2))))
151 (setq generated-finder-keywords-file file))
152
141(defvar finder--builtins-alist 153(defvar finder--builtins-alist
142 '(("calc" . calc) 154 '(("calc" . calc)
143 ("ede" . ede) 155 ("ede" . ede)