From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii Subject: bug#10125: 24.0.91; package.el (org): Macros in tar packages & order of byte compilation Date: Thu, 24 Nov 2011 08:05:21 -0500 Message-ID: References: <81pqgh90sp.fsf@gmail.com> Reply-To: Eli Zaretskii Return-path: Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-Message-ID: In-reply-to: <81pqgh90sp.fsf@gmail.com> (message from Jambunathan K on Thu, 24 Nov 2011 17:42:38 +0530) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org To: Jambunathan K Cc: 10125@debbugs.gnu.org, emacs-orgmode@gnu.org, stelian.iancu@gmail.com List-Id: emacs-orgmode.gnu.org > From: Jambunathan K > Date: Thu, 24 Nov 2011 17:42:38 +0530 > Cc: emacs-orgmode@gnu.org, Stelian Iancu > > 1. While building via Makefile, there is an implicit dependency that is > *enforced* via make rules and files with macro definitions are compiled > ahead of their consumers. That's not true: there are no dependencies defined in lisp/Makefile.in in the Emacs source tree for Lisp files, with a very few exceptions. Org Mode files certainly have no dependency rules in lisp/Makefile.in. So the question why the problem does not happen while compiling Org in Emacs remains. > 2. While building from ELPA, the compilation order seems to be > alphabetical. So the files get compiled bass ackwards. For example, > org-macs.el gets compiled after org-agenda.el. > > In summary, there needs to be a way to specify the order in which files > are compiled in a multifile tar. This was discussed several time, in the context of recompiling multiple Lisp files while building Emacs, and the decision till now was to ignore the issue. While at least in principle one could write a Lisp program that would analyze the various `require' and `load' calls (possibly as side effect of byte compilation, like GCC does), and generate Makefile rules with correct prerequisites, this is a non-trivial project. One simple band-aid is to remove all the *.elc files before byte-compiling after resync. This prolongs the compilation, but the results are predictably correct. > A supplementary question to (2): > > During the package compilation, when encountering (require > 'some-org-library-with-macros) does the library get loaded from *within* > the tarball or from the *emacs core*. Whichever is found first along load-path, I think. See `openp'.