Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup manual and regenerate use-package.texi #968

Merged
merged 13 commits into from
Aug 8, 2022
Merged
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/use-package.info
*~
*.elc
/*-autoloads.el
/*.elc
/*.html
/*.info
/*.pdf
/*.texi
/config.mk
/dir
/doc/content/*
/stats/
/use-package/
25 changes: 0 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ help:
$(info make preview-manuals - preview manuals)
$(info make publish-manuals - publish manuals)
$(info make dist - create tarballs)
$(info make bump-versions - bump versions for release)
$(info make bump-snapshots - bump versions after release)
@printf "\n"

## Build #############################################################
Expand Down Expand Up @@ -175,26 +173,3 @@ use-package-$(VERSION).tar.gz: lisp info
@$(CP) $(DIST_ROOT_FILES) use-package-$(VERSION)
@$(TAR) cz --mtime=./use-package-$(VERSION) -f use-package-$(VERSION).tar.gz use-package-$(VERSION)
@$(RMDIR) use-package-$(VERSION)

define set_manual_version
(let ((version (split-string "$(USE_PACKAGE_VERSION)" "\\.")))
(setq version (concat (car version) "." (cadr version)))
(dolist (file (list "use-package"))
(with-current-buffer (find-file-noselect (format "%s.org" file))
(goto-char (point-min))
(re-search-forward "^#\\+SUBTITLE: for version ")
(delete-region (point) (line-end-position))
(insert version)
(save-buffer))))
endef
export set_manual_version

bump-versions: bump-versions-1 texi
bump-versions-1:
@$(BATCH) --eval "(progn\
$$set_manual_version)"

bump-snapshots:
@$(BATCH) --eval "(progn\
$$set_package_requires)"
git commit -a -m "Reset Package-Requires for Melpa"
8 changes: 3 additions & 5 deletions Makefile.doc
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ clean:
# use "%.texi: %.org". Instead we have to hardcode each file
# using a shared target.

DOC_ARGS = --batch -Q $(DOC_LOAD_PATH)
DOC_ARGS += -l ox-extra -l ol-man -l ox-texinfo+.el
DOC_EVAL = --eval "(ox-extras-activate '(ignore-headlines))"
DOC_EVAL += -f org-texinfo-export-to-texinfo
ORG_ARGS = --batch -Q $(DOC_LOAD_PATH)
ORG_EVAL = --funcall org-texinfo-export-to-texinfo

texi:
@printf "Generating use-package.texi\n"
@$(EMACSBIN) $(DOC_ARGS) use-package.org $(DOC_EVAL)
@$(EMACSBIN) $(ORG_ARGS) use-package.org $(ORG_EVAL)
@echo >> use-package.texi

stats:
Expand Down
5 changes: 1 addition & 4 deletions default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,4 @@ LOAD_PATH = -L $(TOP)

endif # ifndef LOAD_PATH

DOC_LOAD_PATH ?= $(LOAD_PATH) \
-L $(HOME)/emacs/site-lisp \
-L $(HOME)/emacs/site-lisp/ox-texinfo-plus \
-L $(HOME)/emacs/site-lisp/org-mode/contrib/lisp
DOC_LOAD_PATH ?= $(LOAD_PATH) -L $(HOME)/emacs/site-lisp