From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: ignoring autoloads in preloaded files on Windows [was Re: Changes in lisp/Makefile.in to skip preloaded files] Date: Fri, 09 Oct 2009 20:50:25 -0400 Message-ID: <0my40kr72.fsf@fencepost.gnu.org> References: <837hv9neza.fsf@gnu.org> <8363asoov2.fsf@gnu.org> <83tyycmkjv.fsf@gnu.org> <83eipfmuaz.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255135849 19889 80.91.229.12 (10 Oct 2009 00:50:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Oct 2009 00:50:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 10 02:50:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MwQAP-0001qL-Vh for ged-emacs-devel@m.gmane.org; Sat, 10 Oct 2009 02:50:38 +0200 Original-Received: from localhost ([127.0.0.1]:45300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwQAP-0001Jh-B4 for ged-emacs-devel@m.gmane.org; Fri, 09 Oct 2009 20:50:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MwQAK-0001H7-13 for emacs-devel@gnu.org; Fri, 09 Oct 2009 20:50:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MwQAE-0001Cy-Aw for emacs-devel@gnu.org; Fri, 09 Oct 2009 20:50:30 -0400 Original-Received: from [199.232.76.173] (port=59030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwQAE-0001Cv-6C for emacs-devel@gnu.org; Fri, 09 Oct 2009 20:50:26 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:55879) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MwQAD-0002US-Qx for emacs-devel@gnu.org; Fri, 09 Oct 2009 20:50:25 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MwQAD-0006Df-BM; Fri, 09 Oct 2009 20:50:25 -0400 X-Spook: Consul Rand Corporation Firefly Reno emc hackers colonel X-Ran: xeQZ3V4cPi=! List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116042 Archived-At: >> What I had in mind for working around possible limitations of >> command-line length was to run "make -C ../src echolisp > FILE" and >> then read that FILE inside batch-update-autoloads. Here is an attempt at this. Please could someone test this on Windows. *** lib-src/makefile.w32-in 27 Sep 2009 08:27:28 -0000 2.101 --- lib-src/makefile.w32-in 9 Oct 2009 22:55:20 -0000 *************** *** 289,294 **** --- 289,299 ---- $(lispsource)window.elc \ $(lispsource)version.el + # Used by batch-update-autoloads. + echolisp: + @echo $(lisp1) + @echo $(lisp2) + # This is needed the first time we build the tree, since temacs.exe # does not exist yet, and the DOC rule needs it to rebuild DOC whenever # Emacs is rebuilt. *************** *** 348,353 **** --- 353,359 ---- - $(DEL) getopt.h - $(DEL_TREE) $(OBJDIR) - $(DEL) stamp_BLD + - $(DEL) echolisp.tmp distclean: cleanall - $(DEL) TAGS *** lisp/emacs-lisp/autoload.el 7 Oct 2009 16:10:37 -0000 1.149 --- lisp/emacs-lisp/autoload.el 9 Oct 2009 22:59:46 -0000 *************** *** 686,694 **** ;; For use during the Emacs build process only. (unless autoload-excludes (let* ((ldir (file-name-directory generated-autoload-file)) ! (mfile (expand-file-name "../src/Makefile" ldir)) lim) (when (file-readable-p mfile) (with-temp-buffer (insert-file-contents mfile) (when (re-search-forward "^lisp= " nil t) --- 686,717 ---- ;; For use during the Emacs build process only. (unless autoload-excludes (let* ((ldir (file-name-directory generated-autoload-file)) ! (mdir (expand-file-name (if (eq system-type 'windows-nt) ! "../lib-src" ! "../src") ldir)) ! (mfile (expand-file-name "Makefile" mdir)) ! (tmpfile (expand-file-name "echolisp.tmp" mdir)) lim) (when (file-readable-p mfile) + (if (eq system-type 'windows-nt) + (when (ignore-errors + (delete-file tmpfile) + (shell-command (format "make -C %s echolisp > %s" + mdir tmpfile)) + (file-readable-p tmpfile)) + (with-temp-buffer + (insert-file-contents tmpfile) + (while (not (eobp)) + (setq lim (line-end-position)) + (while (re-search-forward "\\([^ ]+\\.el\\)c?\\>" lim t) + (push (expand-file-name (match-string 1) mdir) + autoload-excludes)) + (forward-line 1)))) + ;; Non-Windows platforms do not use the echolisp approach + ;; because the maximum safe command-line length for all + ;; supported platforms is unknown. Also it would seem a + ;; shame to split $lisp into $lisp1 etc just for the sake of + ;; this command (Windows requires it for other reasons). (with-temp-buffer (insert-file-contents mfile) (when (re-search-forward "^lisp= " nil t) *************** *** 696,702 **** (while (re-search-forward "\\${lispsource}\\([^ ]+\\.el\\)c?\\>" lim t) (push (expand-file-name (match-string 1) ldir) ! autoload-excludes))))))) (let ((args command-line-args-left)) (setq command-line-args-left nil) (apply 'update-directory-autoloads args))) --- 719,725 ---- (while (re-search-forward "\\${lispsource}\\([^ ]+\\.el\\)c?\\>" lim t) (push (expand-file-name (match-string 1) ldir) ! autoload-excludes)))))))) (let ((args command-line-args-left)) (setq command-line-args-left nil) (apply 'update-directory-autoloads args)))