-
Notifications
You must be signed in to change notification settings - Fork 260
/
Makefile.doc
153 lines (112 loc) · 4.11 KB
/
Makefile.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# -*- Makefile -*-
-include config.mk
include default.mk
## ###################################################################
.PHONY: install clean AUTHORS.md stats
all: info
## Build #############################################################
info: $(INFOPAGES) dir
html: $(HTMLFILES)
pdf: $(PDFFILES)
%.info: %.texi
@printf "Generating $@\n"
@$(MAKEINFO) --no-split $< -o $@
dir: use-package.info
@printf "Generating dir\n"
@echo $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
%.html: %.texi
@printf "Generating $@\n"
@$(MAKEINFO) --html --no-split $(MANUAL_HTML_ARGS) $<
html-dir: $(TEXIFILES)
@printf "Generating use-package/*.html\n"
@$(MAKEINFO) --html $(MANUAL_HTML_ARGS) use-package.texi
%.pdf: %.texi
@printf "Generating $@\n"
@texi2pdf --clean $< > /dev/null
## Install ###########################################################
install: install-info install-docs
install-docs: install-info
@$(MKDIR) $(DESTDIR)$(docdir)
$(CP) AUTHORS.md $(DESTDIR)$(docdir)
install-info: info
@$(MKDIR) $(DESTDIR)$(infodir)
$(CP) $(INFOPAGES) $(DESTDIR)$(infodir)
## Clean #############################################################
clean:
@printf "Cleaning Documentation/*...\n"
@$(RMDIR) dir $(INFOPAGES) $(HTMLFILES) $(HTMLDIRS) $(PDFFILES)
## Release management ################################################
stats:
@printf "Generating statistics\n"
@gitstats -c style=/assets/stats.css -c max_authors=999 $(TOP) $(statsdir)
authors: AUTHORS.md
AUTHORS.md:
@printf "Generating AUTHORS.md..."
@test -e $(TOP).git \
&& (printf "$$AUTHORS_HEADER\n" > $@ \
&& git log --pretty=format:'- %aN <%aE>' | sort -u >> $@ \
&& printf "done\n" ; ) \
|| printf "FAILED (non-fatal)\n"
DOMAIN ?= use-package.vc
CFRONT_DIST ?= E2LUHBKU1FBV02
PUBLISH_BUCKET ?= s3://$(DOMAIN)
PREVIEW_BUCKET ?= s3://preview.$(DOMAIN)
PUBLISH_URL ?= http://$(DOMAIN).s3-website.eu-central-1.amazonaws.com
PREVIEW_URL ?= http://preview.$(DOMAIN).s3-website.eu-central-1.amazonaws.com
preview-stats: stats
@printf "Uploading statistics...\n"
@aws s3 sync $(statsdir) $(PREVIEW_BUCKET)/stats/
@aws cloudfront create-invalidation \
--distribution-id $(CFRONT_DIST) --paths "/stats/*"
@printf "Uploaded to $(PREVIEW_URL)/stats/\n"
publish-stats: stats
@printf "Uploading statistics...\n"
@aws s3 sync $(statsdir) $(PUBLISH_BUCKET)/stats/
@aws cloudfront create-invalidation \
--distribution-id $(CFRONT_DIST) --paths "/stats/*"
@printf "Uploaded to $(PUBLISH_URL)/stats/\n"
preview-manuals: html html-dir pdf
@printf "Uploading manuals...\n"
@aws s3 sync use-package $(PREVIEW_BUCKET)/manual/use-package/
@aws s3 cp use-package.html $(PREVIEW_BUCKET)/manual/
@aws s3 cp use-package.pdf $(PREVIEW_BUCKET)/manual/
@aws cloudfront create-invalidation \
--distribution-id $(CFRONT_DIST) --paths "/manual/*"
@printf "Uploaded to $(PREVIEW_URL)/manual/\n"
publish-manuals: html html-dir pdf
@printf "Uploading manuals...\n"
@aws s3 sync use-package $(PUBLISH_BUCKET)/manual/use-package/
@aws s3 cp use-package.html $(PUBLISH_BUCKET)/manual/
@aws s3 cp use-package.pdf $(PUBLISH_BUCKET)/manual/
@aws cloudfront create-invalidation \
--distribution-id $(CFRONT_DIST) --paths "/manual/*"
@printf "Uploaded to $(PUBLISH_URL)/manual/\n"
# Templates ##########################################################
define AUTHORS_HEADER
Authors
=======
The following people have contributed to Use-Package.
For statistics see https://magit.vc/stats/authors.html.
Names below are sorted alphabetically.
Author
------
- Marius Vollmer <marius.vollmer@gmail.com>
Maintainer
----------
- Jonas Bernoulli <jonas@bernoul.li>
Developers
----------
- Kyle Meyer <kyle@kyleam.com>
- Noam Postavsky <npostavs@users.sourceforge.net>
Retired Maintainers and Developers
----------------------------------
- Nicolas Dudebout <nicolas.dudebout@gatech.edu>
- Peter J. Weisberg <pj@irregularexpressions.net>
- Pieter Praet <pieter@praet.org>
- Phil Jackson <phil@shellarchive.co.uk>
- Rémi Vanicat <vanicat@debian.org>
- Yann Hodique <yann.hodique@gmail.com>
Contributors
------------
endef
export AUTHORS_HEADER