branch: elpa/emacsql
commit 88fd72b4fd960e71ee637bf8d797f3fecf0586de
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    Add docs/Makefile and output statistics to docs/stats/
    
    For consistency with other packages I maintain.
---
 .gitignore    |  2 +-
 Makefile      | 16 +++++-----------
 docs/Makefile | 22 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore
index 004cced8278..03c1a32ce4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
 /*.elc
 /*-autoloads.el
 /config.mk
-/stats/
+/docs/stats/
diff --git a/Makefile b/Makefile
index 2830fda67d2..2893fe3360c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 -include config.mk
 include default.mk
 
-.PHONY: test stats
+.PHONY: test
 
 all: lisp
 
@@ -30,7 +30,8 @@ clean: clean-lisp clean-docs clean-test
 clean-lisp:
        @printf " Cleaning *...\n"
        @rm -rf $(ELCS) $(PKG)-autoloads.el
-clean-docs: ;
+clean-docs:
+       @$(MAKE) -C docs clean
 clean-test:
        @printf " Cleaning test/*...\n"
        @rm -rf $(TEST_ELCS)
@@ -57,13 +58,6 @@ test: all $(TEST_ELCS)
        -l test/emacsql-external-tests.elc -f ert-run-tests-batch-and-exit
 
 stats:
-       @printf "Generating statistics\n"
-       @$(GITSTATS) $(GITSTATS_ARGS) . $(GITSTATS_DIR)
-
+       @$(MAKE) -C docs stats
 stats-upload:
-       @printf "Uploading statistics...\n"
-       @aws s3 sync $(GITSTATS_DIR) $(S3_BUCKET)/stats/$(PKG)
-       @printf "Uploaded to $(S3_BUCKET)/stats/$(PKG)\n"
-       @printf "Generating CDN invalidation\n"
-       @aws cloudfront create-invalidation \
-       --distribution-id $(CFRONT_DIST) --paths "/stats/*" > /dev/null
+       @$(MAKE) -C docs stats-upload
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 00000000000..a8dc0926219
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,22 @@
+-include ../config.mk
+include ../default.mk
+
+.PHONY: stats
+
+stats:
+       @printf "Generating statistics...\n"
+       @$(GITSTATS) $(GITSTATS_ARGS) $(TOP) $(GITSTATS_DIR)
+
+stats-upload:
+       @printf "Uploading statistics...\n"
+       @aws s3 sync $(GITSTATS_DIR) $(S3_BUCKET)/stats/$(PKG)
+       @printf "Uploaded to $(S3_BUCKET)/stats/$(PKG)\n"
+       @printf "Generating CDN invalidation\n"
+       @aws cloudfront create-invalidation \
+       --distribution-id $(CFRONT_DIST) --paths "/stats/*" > /dev/null
+
+CLEAN = stats
+
+clean:
+       @printf " Cleaning docs/*...\n"
+       @rm -rf $(CLEAN)

Reply via email to