[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 995404d 401/439: * elpa-admin.el: Allow generating a
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 995404d 401/439: * elpa-admin.el: Allow generating autoloads for "unlisted" packages |
Date: |
Sun, 17 Oct 2021 15:48:45 -0400 (EDT) |
branch: elpa-admin
commit 995404d8076ce74e4b39e27a952c57f8fa5ffb6c
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* elpa-admin.el: Allow generating autoloads for "unlisted" packages
(elpaa--get-package-spec): New arg `noerror`.
(elpaa-batch-generate-autoloads): Use it.
* GNUmakefile (descs <var>): Rename from `pkg_descs`.
(install-in-place, descs, autoloads): New targets.
---
GNUmakefile | 13 +++++++------
elpa-admin.el | 9 ++++++---
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 3059222..2ffcec2 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -69,6 +69,7 @@ endef
# Compute the set of autolods files and their dependencies.
autoloads := $(foreach pkg, $(pkgs), $(pkg)/$(notdir $(pkg))-autoloads.el)
+descs := $(foreach pkg, $(pkgs), $(pkg)/$(notdir $(pkg))-pkg.el)
# FIXME: In 99% of the cases, autoloads can be generated in any order.
# But the `names' package is an exception because it sets up an advice that
@@ -83,6 +84,7 @@ autoloads := $(foreach pkg, $(pkgs), $(pkg)/$(notdir
$(pkg))-autoloads.el)
# packages/aggressive-indent/aggressive-indent-autoloads.el: \
# packages/names/names-autoloads.el
+# .PRECIOUS: packages/%-autoloads.el
packages/%-autoloads.el: elpa-packages
@#echo 'Generating autoloads for $@'
$(EMACS) -l admin/elpa-admin.el \
@@ -138,18 +140,17 @@ $(PKG_DESCS_MK): elpa-packages packages
$(EMACS) -Q -l admin/elpa-admin.el \
-f elpaa-batch-pkg-spec-make-dependencies $@
-# # Put into single_pkgs the set of -pkg.el files we need to keep up-to-date.
-# # I.e. all the -pkg.el files for the single-file packages.
-pkg_descs:=$(foreach pkg, $(pkgs), $(pkg)/$(notdir $(pkg))-pkg.el)
-#$(foreach al, $(single_pkgs), $(eval $(call RULE-srcdeps, $(al))))
packages/%-pkg.el:
@echo 'Generating description file $@'
@$(EMACS) -l admin/elpa-admin.el \
-f elpaa-batch-generate-description-file "$@"
-.PHONY: all-in-place
+.PHONY: all-in-place autoloads descs install-in-place
# Use order-only prerequisites, so that autoloads are done first.
-all-in-place: | $(autoloads) $(pkg_descs) $(pkgs) #$(extra_elcs)
+all-in-place: | install-in-place $(pkgs) #$(extra_elcs)
+autoloads: $(autoloads)
+descs: $(descs)
+install-in-place: autoloads descs
define FILE-els
$(filter %.el, $(1))
diff --git a/elpa-admin.el b/elpa-admin.el
index 77e57a1..2a48ecc 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -447,12 +447,15 @@ Return non-nil if a new tarball was created."
(replace-regexp-in-string "[^.0-9]+" ""
verdate))))
-(defun elpaa--get-package-spec (pkgname)
+(defun elpaa--get-package-spec (pkgname &optional noerror)
"Retrieve the property list for PKGNAME from `elpaa--specs-file'."
(let* ((specs (elpaa--get-specs))
(spec (assoc pkgname specs)))
(if (null spec)
- (error "Unknown package %S" pkgname)
+ (if (not noerror)
+ (error "Unknown package %S" pkgname)
+ (message "Unknown package %S" pkgname)
+ (list pkgname))
spec)))
(defun elpaa-batch-make-all-packages (&rest _)
@@ -1695,7 +1698,7 @@ More at " (elpaa--default-url pkgname))
(let* ((alf (pop command-line-args-left))
(dir (file-name-directory alf))
(pkgname (file-name-nondirectory (directory-file-name dir)))
- (pkg-spec (elpaa--get-package-spec pkgname))
+ (pkg-spec (elpaa--get-package-spec pkgname 'noerror))
(lisp-dir (elpaa--spec-get pkg-spec :lisp-dir)))
(require 'package)
(if (null lisp-dir)
- [nongnu] elpa-admin 1b69bf6 340/439: * admin/archive-contents.el: Don't use "git log" when not needed, (continued)
- [nongnu] elpa-admin 1b69bf6 340/439: * admin/archive-contents.el: Don't use "git log" when not needed, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 14d46c2 375/439: * elpa-admin.el (elpaa--pull): Fix up oversight in last change, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 47280ce 402/439: * elpa-admin.el: Don't mention skipping :core if there are no :core, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 059dde5 344/439: * GNUmakefile (RULE-singlepkg): Add rules to install&compile each package, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e22c225 395/439: * elpa-admin.el (elpaa--fetch): Only show upstream commits, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 2658af9 345/439: * admin/archive-contents.el: Add preliminary code to fetch upstream updates, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0b84023 372/439: * elpa-admin.el: Fix confusing uses of word "external", Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 3926bbc 381/439: * elpa-admin.el (elpaa--release-email): Improve the Cc address, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 913bb04 376/439: * GNUmakefile: Rewrite the all-in-place code, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ceb7580 390/439: * elpa-admin.el (elpaa--sandboxed-ro-binds): Add `/bin`, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 995404d 401/439: * elpa-admin.el: Allow generating autoloads for "unlisted" packages,
Philip Kaludercic <=
- [nongnu] elpa-admin 7d65683 356/439: * admin/archive-contents.el: Fix wrong cgit links and support :core somewhat, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 4ade74d 346/439: * README.org: Add license and an introduction., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 922d625 389/439: * GNUmakefile (EMACS): Split out EMACSBIN for convenience, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin bcacdba 361/439: * elpa-admin.el: Add `:readme` and `:news` properties to specifications, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 311d819 357/439: * GNUmakefile: Fix `-l` args to `emacs` which require an actual file name, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 802b866 394/439: * GNUmakefile (sync-some): New target, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b3e663b 353/439: Rename ELisp files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 4b508ad 364/439: * elpa-admin.el: Allow site-local config, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 48e4ccf 388/439: * elpa-admin.el: Don't pass non-existing dirs to `bwrap`, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 12cd68f 386/439: * README.org: Update according to comments from RMS., Philip Kaludercic, 2021/10/17