[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/with-editor a94faea 2/6: Add lisp/ and docs/ directories
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/with-editor a94faea 2/6: Add lisp/ and docs/ directories |
Date: |
Thu, 16 Dec 2021 13:58:12 -0500 (EST) |
branch: elpa/with-editor
commit a94faeae2ff95235b31c1c1f9447bc95fc527240
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Add lisp/ and docs/ directories
---
.gitignore | 18 +--
Makefile | 198 +++++-------------------------
default.mk | 28 +++++
AUTHORS.md => docs/AUTHORS.md | 0
Makefile => docs/Makefile | 89 +-------------
htmlxref.cnf => docs/htmlxref.cnf | 0
with-editor.org => docs/with-editor.org | 0
with-editor.texi => docs/with-editor.texi | 0
lisp/Makefile | 44 +++++++
with-editor.el => lisp/with-editor.el | 0
10 files changed, 115 insertions(+), 262 deletions(-)
diff --git a/.gitignore b/.gitignore
index 5f471f4..d42446b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,9 @@
-/*.elc
-/*-autoloads.el
-/.config.mk
-/dir
-/with-editor/
-/with-editor.html
-/with-editor.info
-/with-editor.pdf
-/with-editor-autoloads.el
+/config.mk
+/docs/*.html
+/docs/*.pdf
+/docs/dir
+/docs/stats/
+/lisp/*-autoloads.el
+/lisp/*.elc
+
+/docs/with-editor/
diff --git a/Makefile b/Makefile
index 960f183..23dc9e0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,193 +1,51 @@
-include config.mk
+include default.mk
-PKG = with-editor
+.PHONY: lisp docs clean
-ELS = $(PKG).el
-ELCS = $(ELS:.el=.elc)
-
-DEPS = dash
-
-VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut
-c2-)
-
-EMACS ?= emacs
-EMACS_ARGS ?=
-EMACS_ARGS += --eval '(setq with-editor-emacsclient-executable nil)'
-
-LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
-LOAD_PATH += -L .
-
-ifndef ORG_LOAD_PATH
-ORG_LOAD_PATH = -L ../org/lisp
-ORG_LOAD_PATH += -L ../ox-texinfo+
-endif
-
-INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
-MAKEINFO ?= makeinfo
-MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
-
-all: lisp info
-doc: info html html-dir pdf
+all: lisp docs
help:
$(info make all - generate lisp and manual)
- $(info make doc - generate most manual formats)
$(info make lisp - generate byte-code and autoloads)
+ $(info make docs - generate most manual formats)
$(info make texi - generate texi manual (see comments))
$(info make info - generate info manual)
$(info make html - generate html manual file)
$(info make html-dir - generate html manual directory)
$(info make pdf - generate pdf manual)
- $(info make stats - generate statistics)
$(info make authors - generate AUTHORS.md)
+ $(info make stats - generate statistics)
$(info make publish - publish snapshot manuals)
$(info make release - publish release manuals)
$(info make clean - remove most generated files)
+ @printf "\n"
-lisp: $(ELCS) loaddefs
-
-loaddefs: $(PKG)-autoloads.el
-
-%.elc: %.el
- @printf "Compiling $<\n"
- @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
-
-info: $(PKG).info dir
-html: $(PKG).html
-pdf: $(PKG).pdf
+lisp:
+ @$(MAKE) -C lisp lisp
-ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) -l ox-texinfo+
-ORG_EVAL = --eval "(setq org-texinfo+-dissolve-noexport-headlines t)"
-ORG_EVAL += --eval "(setq indent-tabs-mode nil)"
-ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)"
-ORG_EVAL += --funcall org-texinfo-export-to-texinfo
-
-# This target first bumps version strings in the Org source. The
-# necessary tools might be missing so other targets do not depend
-# on this target and it has to be run explicitly when appropriate.
-#
-# AMEND=t make texi Update manual to be amended to HEAD.
-# VERSION=N make texi Update manual for release.
-#
-.PHONY: texi
+docs:
+ @$(MAKE) -C docs docs
texi:
- @$(EMACS) $(ORG_ARGS) $(PKG).org $(ORG_EVAL)
- @printf "\n" >> $(PKG).texi
- @rm -f $(PKG).texi~
-
-%.info: %.texi
- @printf "Generating $@\n"
- @$(MAKEINFO) --no-split $< -o $@
-
-dir: $(PKG).info
- @printf "Generating $@\n"
- @printf "%s" $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
-
-HTML_FIXUP_CSS = '/<link rel="stylesheet" type="text\/css"
href="\/assets\/page.css">/a\
-<link rel="icon" href="/assets/magit_alt1.ico">\
-\n<link class="s-css-s--style" rel="stylesheet" title="Default"
href="/assets/themes/default.css">\
-\n<link class="s-css-s--style" rel="stylesheet alternate" title="Default high
contrast" href="/assets/themes/default-high-contrast.css">\
-\n<link class="s-css-s--style" rel="stylesheet alternate" title="Solarized
dark xterm" href="/assets/themes/solarized-dark-xterm.css">\
-\n<link class="s-css-s--style" rel="stylesheet alternate" title="Black on
white" href="/assets/themes/black-on-white.css">\
-\n<script src="/assets/js/simple-css-switch.js"></script>'
-HTML_FIXUP_ONLOAD = 's/<body lang="en">/<body lang="en"
onload="simpleCssSwitch()">/'
-HTML_FIXUP_MENU = '/<\/body>/i<div id="s-css-s--menu"><\/div>'
-
-%.html: %.texi
- @printf "Generating $@\n"
- @$(MAKEINFO) --html --no-split $(MANUAL_HTML_ARGS) $<
- @sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e
$(HTML_FIXUP_MENU) $@
-
-html-dir: $(PKG).texi
- @printf "Generating $(PKG)/*.html\n"
- @$(MAKEINFO) --html $(MANUAL_HTML_ARGS) $<
- @for f in $$(find $(PKG) -name '*.html') ; do \
- sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e
$(HTML_FIXUP_MENU) $$f ; \
- done
-
-%.pdf: %.texi
- @printf "Generating $@\n"
- @texi2pdf --clean $< > /dev/null
-
-.PHONY: stats
+ @$(MAKE) -C docs texi
+info:
+ @$(MAKE) -C docs info
+html:
+ @$(MAKE) -C docs html
+html-dir:
+ @$(MAKE) -C docs html-dir
+pdf:
+ @$(MAKE) -C docs pdf
+authors:
+ @$(MAKE) -C docs authors
stats:
- @printf "Generating statistics\n"
- @gitstats -c style=https://magit.vc/assets/stats.css -c max_authors=999
. stats
-
-DOMAIN ?= magit.vc
-PUBLISH_PATH ?= /manual/
-RELEASE_PATH ?= /manual/$(VERSION)/
-
-S3_BUCKET ?= s3://$(DOMAIN)
-PUBLISH_TARGET = $(S3_BUCKET)$(PUBLISH_PATH)
-RELEASE_TARGET = $(S3_BUCKET)$(RELEASE_PATH)
-
-CFRONT_DIST ?= E2LUHBKU1FBV02
-CFRONT_PATHS = $(PKG).html $(PKG).pdf $(PKG)/*
+ @$(MAKE) -C docs stats
-comma := ,
-empty :=
-space := $(empty) $(empty)
-
-publish: html html-dir pdf
- @aws s3 cp $(PKG).html $(PUBLISH_TARGET)
- @aws s3 cp $(PKG).pdf $(PUBLISH_TARGET)
- @aws s3 sync --delete $(PKG) $(PUBLISH_TARGET)$(PKG)/
- @printf "Generating CDN invalidation\n"
- @aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST)
--paths \
- "$(subst $(space),$(comma),$(addprefix
$(PUBLISH_PATH),$(CFRONT_PATHS)))" > /dev/null
-
-release: html html-dir pdf
- @aws s3 cp $(PKG).html $(RELEASE_TARGET)
- @aws s3 cp $(PKG).pdf $(RELEASE_TARGET)
- @aws s3 sync --delete $(PKG) $(RELEASE_TARGET)$(PKG)/
- @aws s3 cp $(PUBLISH_TARGET)dir.html $(RELEASE_TARGET)dir.html
- @aws s3 cp $(PUBLISH_TARGET)dir/index.html
$(RELEASE_TARGET)dir/index.html
- @printf "Generating CDN invalidation\n"
- @aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST)
--paths \
- "$(subst $(space),$(comma),$(addprefix
$(RELEASE_PATH),$(CFRONT_PATHS)))" > /dev/null
-
-CLEAN = $(ELCS) $(PKG)-autoloads.el $(PKG).info dir
-CLEAN += $(PKG) $(PKG).html $(PKG).pdf
+publish:
+ @$(MAKE) -C docs publish
+release:
+ @$(MAKE) VERSION=$(VERSION) -C docs release
clean:
- @printf "Cleaning...\n"
- @rm -rf $(CLEAN)
-
-.PHONY: authors AUTHORS.md
-authors: AUTHORS.md
-
-AUTHORS.md:
- @ printf "Authors\n=======\n\n" > $@
- @ ( printf "%s\n" "- Barak A. Pearlmutter <barak+git@pearlmutter.net>"
&& \
- printf "%s\n" "- Lele Gaifax <lele@metapensiero.it>" && \
- printf "%s\n" "- Rémi Vanicat <vanicat@debian.org>" && \
- git log --pretty=format:'- %aN <%aE>' \
- ) | sort -u >> $@
-
-define LOADDEFS_TMPL
-;;; $(PKG)-autoloads.el --- automatically extracted autoloads
-;;
-;;; Code:
-(add-to-list 'load-path (directory-file-name \
-(or (file-name-directory #$$) (car load-path))))
-
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; no-update-autoloads: t
-;; End:
-;;; $(PKG)-autoloads.el ends here
-endef
-export LOADDEFS_TMPL
-#'
-
-$(PKG)-autoloads.el: $(ELS)
- @printf "Generating $@\n"
- @printf "%s" "$$LOADDEFS_TMPL" > $@
- @$(EMACS) -Q --batch --eval "(progn\
- (setq make-backup-files nil)\
- (setq vc-handled-backends nil)\
- (setq default-directory (file-truename default-directory))\
- (setq generated-autoload-file (expand-file-name \"$@\"))\
- (setq find-file-visit-truename t)\
- (update-directory-autoloads default-directory))"
+ @$(MAKE) -C lisp clean
+ @$(MAKE) -C docs clean
diff --git a/default.mk b/default.mk
new file mode 100644
index 0000000..c40a18e
--- /dev/null
+++ b/default.mk
@@ -0,0 +1,28 @@
+TOP := $(dir $(lastword $(MAKEFILE_LIST)))
+
+PKG = with-editor
+
+ELS = $(PKG).el
+ELCS = $(ELS:.el=.elc)
+
+DEPS = dash
+
+VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut
-c2-)
+
+EMACS ?= emacs
+EMACS_ARGS ?=
+EMACS_ARGS += --eval '(setq with-editor-emacsclient-executable nil)'
+
+LOAD_PATH ?= $(addprefix -L ../../,$(DEPS))
+LOAD_PATH += -L .
+
+ifndef ORG_LOAD_PATH
+ORG_LOAD_PATH = -L ../../org/lisp
+ORG_LOAD_PATH += -L ../../ox-texinfo+
+endif
+
+INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
+MAKEINFO ?= makeinfo
+MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
+
+STATS_DIR ?= $(TOP)docs/stats
diff --git a/AUTHORS.md b/docs/AUTHORS.md
similarity index 100%
rename from AUTHORS.md
rename to docs/AUTHORS.md
diff --git a/Makefile b/docs/Makefile
similarity index 62%
copy from Makefile
copy to docs/Makefile
index 960f183..b40affa 100644
--- a/Makefile
+++ b/docs/Makefile
@@ -1,55 +1,7 @@
--include config.mk
+-include ../config.mk
+include ../default.mk
-PKG = with-editor
-
-ELS = $(PKG).el
-ELCS = $(ELS:.el=.elc)
-
-DEPS = dash
-
-VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut
-c2-)
-
-EMACS ?= emacs
-EMACS_ARGS ?=
-EMACS_ARGS += --eval '(setq with-editor-emacsclient-executable nil)'
-
-LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
-LOAD_PATH += -L .
-
-ifndef ORG_LOAD_PATH
-ORG_LOAD_PATH = -L ../org/lisp
-ORG_LOAD_PATH += -L ../ox-texinfo+
-endif
-
-INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
-MAKEINFO ?= makeinfo
-MANUAL_HTML_ARGS ?= --css-ref /assets/page.css
-
-all: lisp info
-doc: info html html-dir pdf
-
-help:
- $(info make all - generate lisp and manual)
- $(info make doc - generate most manual formats)
- $(info make lisp - generate byte-code and autoloads)
- $(info make texi - generate texi manual (see comments))
- $(info make info - generate info manual)
- $(info make html - generate html manual file)
- $(info make html-dir - generate html manual directory)
- $(info make pdf - generate pdf manual)
- $(info make stats - generate statistics)
- $(info make authors - generate AUTHORS.md)
- $(info make publish - publish snapshot manuals)
- $(info make release - publish release manuals)
- $(info make clean - remove most generated files)
-
-lisp: $(ELCS) loaddefs
-
-loaddefs: $(PKG)-autoloads.el
-
-%.elc: %.el
- @printf "Compiling $<\n"
- @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
+docs: info html html-dir pdf
info: $(PKG).info dir
html: $(PKG).html
@@ -111,7 +63,7 @@ html-dir: $(PKG).texi
.PHONY: stats
stats:
@printf "Generating statistics\n"
- @gitstats -c style=https://magit.vc/assets/stats.css -c max_authors=999
. stats
+ @gitstats -c style=https://magit.vc/assets/stats.css -c max_authors=999
$(TOP) $(STATS_DIR)
DOMAIN ?= magit.vc
PUBLISH_PATH ?= /manual/
@@ -146,11 +98,10 @@ release: html html-dir pdf
@aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST)
--paths \
"$(subst $(space),$(comma),$(addprefix
$(RELEASE_PATH),$(CFRONT_PATHS)))" > /dev/null
-CLEAN = $(ELCS) $(PKG)-autoloads.el $(PKG).info dir
-CLEAN += $(PKG) $(PKG).html $(PKG).pdf
+CLEAN = $(PKG).info dir $(PKG) $(PKG).html $(PKG).pdf
clean:
- @printf "Cleaning...\n"
+ @printf "Cleaning docs/*...\n"
@rm -rf $(CLEAN)
.PHONY: authors AUTHORS.md
@@ -163,31 +114,3 @@ AUTHORS.md:
printf "%s\n" "- Rémi Vanicat <vanicat@debian.org>" && \
git log --pretty=format:'- %aN <%aE>' \
) | sort -u >> $@
-
-define LOADDEFS_TMPL
-;;; $(PKG)-autoloads.el --- automatically extracted autoloads
-;;
-;;; Code:
-(add-to-list 'load-path (directory-file-name \
-(or (file-name-directory #$$) (car load-path))))
-
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; no-update-autoloads: t
-;; End:
-;;; $(PKG)-autoloads.el ends here
-endef
-export LOADDEFS_TMPL
-#'
-
-$(PKG)-autoloads.el: $(ELS)
- @printf "Generating $@\n"
- @printf "%s" "$$LOADDEFS_TMPL" > $@
- @$(EMACS) -Q --batch --eval "(progn\
- (setq make-backup-files nil)\
- (setq vc-handled-backends nil)\
- (setq default-directory (file-truename default-directory))\
- (setq generated-autoload-file (expand-file-name \"$@\"))\
- (setq find-file-visit-truename t)\
- (update-directory-autoloads default-directory))"
diff --git a/htmlxref.cnf b/docs/htmlxref.cnf
similarity index 100%
rename from htmlxref.cnf
rename to docs/htmlxref.cnf
diff --git a/with-editor.org b/docs/with-editor.org
similarity index 100%
rename from with-editor.org
rename to docs/with-editor.org
diff --git a/with-editor.texi b/docs/with-editor.texi
similarity index 100%
rename from with-editor.texi
rename to docs/with-editor.texi
diff --git a/lisp/Makefile b/lisp/Makefile
new file mode 100644
index 0000000..ba0c4c1
--- /dev/null
+++ b/lisp/Makefile
@@ -0,0 +1,44 @@
+-include ../config.mk
+include ../default.mk
+
+lisp: $(ELCS) loaddefs
+
+loaddefs: $(PKG)-autoloads.el
+
+%.elc: %.el
+ @printf "Compiling $<\n"
+ @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $<
+
+CLEAN = $(ELCS) $(PKG)-autoloads.el
+
+clean:
+ @printf "Cleaning lisp/*...\n"
+ @rm -rf $(CLEAN)
+
+define LOADDEFS_TMPL
+;;; $(PKG)-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name \
+(or (file-name-directory #$$) (car load-path))))
+
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; $(PKG)-autoloads.el ends here
+endef
+export LOADDEFS_TMPL
+#'
+
+$(PKG)-autoloads.el: $(ELS)
+ @printf "Generating $@\n"
+ @printf "%s" "$$LOADDEFS_TMPL" > $@
+ @$(EMACS) -Q --batch --eval "(progn\
+ (setq make-backup-files nil)\
+ (setq vc-handled-backends nil)\
+ (setq default-directory (file-truename default-directory))\
+ (setq generated-autoload-file (expand-file-name \"$@\"))\
+ (setq find-file-visit-truename t)\
+ (update-directory-autoloads default-directory))"
diff --git a/with-editor.el b/lisp/with-editor.el
similarity index 100%
rename from with-editor.el
rename to lisp/with-editor.el
- [nongnu] elpa/with-editor updated (d53df36 -> 388a2b8), ELPA Syncer, 2021/12/16
- [nongnu] elpa/with-editor 93ba7c8 1/6: make: Add stats target, ELPA Syncer, 2021/12/16
- [nongnu] elpa/with-editor 35c73e7 3/6: make: Update stats target, ELPA Syncer, 2021/12/16
- [nongnu] elpa/with-editor a94faea 2/6: Add lisp/ and docs/ directories,
ELPA Syncer <=
- [nongnu] elpa/with-editor 96aa1d3 5/6: make: Fix publish and release targets, ELPA Syncer, 2021/12/16
- [nongnu] elpa/with-editor a0d42f7 4/6: make: Cosmetics, ELPA Syncer, 2021/12/16
- [nongnu] elpa/with-editor 388a2b8 6/6: make: Set more variables in default.mk, ELPA Syncer, 2021/12/16