forked from SSLMate/caa_helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (43 loc) · 1.92 KB
/
Makefile
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
# Copyright (C) 2017 Opsmate, Inc.
#
# This Source Code Form is subject to the terms of the Mozilla
# Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This software is distributed WITHOUT A WARRANTY OF ANY KIND.
# See the Mozilla Public License for details.
ENDPOINT = https://sslmate.com/caa/api
-include config.mk
all: index.html support.html about.html
index.html: index.xml template.xslt cas.xml extra_cas.xml
xsltproc --xinclude --stringparam endpoint "$(ENDPOINT)" template.xslt index.xml > $@
support.html: support.xml template.xslt
xsltproc --stringparam endpoint "$(ENDPOINT)" template.xslt support.xml > $@
about.html: about.xml template.xslt
xsltproc --stringparam endpoint "$(ENDPOINT)" template.xslt about.xml > $@
cas.xml: CAInformationReportCSVFormat mkcasxml.go
sed '1 d' < CAInformationReportCSVFormat | go run mkcasxml.go > cas.xml
CAInformationReportCSVFormat:
curl -sS https://ccadb-public.secure.force.com/mozilla/CAInformationReportCSVFormat > CAInformationReportCSVFormat
clean:
rm -f *.html
ifneq ($(DESTDIR),)
install: $(FILES)
install -m 755 -d $(DESTDIR)
install -m 644 index.html $(DESTDIR)/index.html
gzip -n9 < $(DESTDIR)/index.html > $(DESTDIR)/index.htmlgz
install -m 644 support.html $(DESTDIR)/support.html
gzip -n9 < $(DESTDIR)/support.html > $(DESTDIR)/support.htmlgz
install -m 644 about.html $(DESTDIR)/about.html
gzip -n9 < $(DESTDIR)/about.html > $(DESTDIR)/about.htmlgz
yui-compressor --type js --nomunge < generator.js > $(DESTDIR)/generator.js
gzip -n9 < $(DESTDIR)/generator.js > $(DESTDIR)/generator.jsgz
yui-compressor --type css < style.css > $(DESTDIR)/style.css
gzip -n9 < $(DESTDIR)/style.css > $(DESTDIR)/style.cssgz
install -m 644 github_ribbon.png $(DESTDIR)/github_ribbon.png
else
install:
@echo "Please set DESTDIR variable to use 'make install'"
@false
endif
.PHONY: all clean install