emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Makefile restructuring


From: Jambunathan K
Subject: Re: [O] Makefile restructuring
Date: Mon, 07 Nov 2011 01:55:08 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt)

Achim Gratz <address@hidden> writes:

> Jambunathan K <address@hidden> writes:
>> FYI, if Org is insalled through the package manager there is no
>> org-install.el. Package manager creates autoloads on it's own and names
>> it org-autoloads.el.
>>
>> I believe, for most part, org-install and org-autoloads have the same
>> functionality.
>
> Then maybe they should have the same name, but surely they should be
> produced by the same method.  Can you point me to a documentation (or
> source) that details how the package manager deals with the autoloads?
> It shouldn't be too difficult to use the same method in the Makefile
> once I understand how it's done.

This is what I see in package.el.

--8<---------------cut here---------------start------------->8---
(defun package-unpack (name version)
  (let* ((dirname (concat (symbol-name name) "-" version))
         (pkg-dir (expand-file-name dirname package-user-dir)))
    (make-directory package-user-dir t)
    ;; FIXME: should we delete PKG-DIR if it exists?
    (let* ((default-directory (file-name-as-directory package-user-dir)))
      (package-untar-buffer dirname)
      (package-generate-autoloads (symbol-name name) pkg-dir)
      (let ((load-path (cons pkg-dir load-path)))
        (byte-recompile-directory pkg-dir 0 t)))))

(defun package-generate-autoloads (name pkg-dir)
  (require 'autoload) ;Load before we let-bind generated-autoload-file!
  (let* ((auto-name (concat name "-autoloads.el"))
         (ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
         (version-control 'never))
    (unless (fboundp 'autoload-ensure-default-file)
      (package-autoload-ensure-default-file generated-autoload-file))
    (update-directory-autoloads pkg-dir)))
--8<---------------cut here---------------end--------------->8---

If we reconcile what happens here with what is done in Makefile, may be
we can uncover why certain macros in org-macs.el doesn't propagated to
some set of files.

Note that org-macs.el issue is increasingly reported only with emacs-23
and not with emacs-24. One of the reason could be that emacs-24
*already* has most of the macro definitions in the system path. This is
not the case with emacs-23 installations which have (much?) older
versions of org.

>From what I understand package manager compiles files in alphabetical
order. It means that org-macs.el gets compiled after org-agenda.el.

Also when eval-when-compile is done of org-macs.el - somewhere it should
be done right? - I don't know which of the org-macs.el gets loaded. Is
it system-installed one or the one in the distribution tar.

These are some of the leading questions that will lead to satisfactory
resolution of recently reported issues with package manager.

>
> Regards,
> Achim.

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]