-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
129 lines (105 loc) · 3.72 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
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
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2023 The Foundation for Public Code <info@publiccode.net>
# Makefile variables used:
#
# $@ : target label
# $< : the first prerequisite after the colon
# $^ : all of the prerequisite files
# $* : wildcard matched part
#
# see https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors
# for differences in ":=" vs "?=" variable assignments
#
# patsubst : $(patsubst pattern,replacement,text)
# https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
TIMEOUT ?= 30
.PHONY: default
default: all
url-check/url-check.py:
# git submodule add https://github.com/publiccodenet/url-check.git
git submodule update --init --recursive
.PHONY: update-url-check
update-url-check: url-check/url-check.py
git submodule update --init --recursive
.PHONY: check
check: url-check-config.json url-check/url-check.py check-no-fails.sh
./check-no-fails.sh
@echo SUCCESS $@
.PHONY: all
all: url-check/url-check.py
vendor/bundle:
bundle install
url-check-fails.json \
standard.publiccode.net-url-check-fails.json \
bumperscripter-url-check-fails.json \
publiccode.net-url-check-fails.json \
about.publiccode.net-url-check-fails.json \
blog.publiccode.net-url-check-fails.json \
community-implementation-guide-standard-url-check-fails.json \
standard.publiccode.net-develop-url-check-fails.json \
&: url-check/url-check.py url-check-config.json
url-check/url-check.py --verbose --timeout=$(TIMEOUT)
_site/url-check-fails.json _site/index.html &: index.md url-check-fails.json \
badges/standard.publiccode.net.svg \
badges/standard.publiccode.net-develop.svg \
badges/community-implementation-guide-standard.svg \
badges/bumperscripter.svg \
badges/publiccode.net.svg \
badges/about.publiccode.net.svg \
badges/blog.publiccode.net.svg \
vendor/bundle
PAGES_REPO_NWO=publiccodenet/publiccodenet-url-check \
bundle exec jekyll build
./node_modules/.bin/badge:
npm install badge-maker
./url-check/make-badge: ./node_modules/.bin/badge
LICENSE_ID ?= CC0-1.0
COPYRIGHT_TEXT ?= 2023 The Foundation for Public Code <info@publiccode.net>
MAKE_BADGE=\
LICENSE_ID='$(LICENSE_ID)' \
COPYRIGHT_TEXT='$(COPYRIGHT_TEXT)' \
./url-check/make-badge
badges/standard.publiccode.net.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
standard.publiccode.net-url-check-fails.json
$(MAKE_BADGE) "standard.publiccode.net" "main"
badges/standard.publiccode.net-develop.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
standard.publiccode.net-develop-url-check-fails.json
$(MAKE_BADGE) "standard.publiccode.net-develop" "develop"
badges/community-implementation-guide-standard.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
community-implementation-guide-standard-url-check-fails.json
$(MAKE_BADGE) "community-implementation-guide-standard" "main"
badges/bumperscripter.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
bumperscripter-url-check-fails.json
$(MAKE_BADGE) "bumperscripter" "main"
badges/publiccode.net.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
publiccode.net-url-check-fails.json
$(MAKE_BADGE) "publiccode.net" "main"
badges/about.publiccode.net.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
about.publiccode.net-url-check-fails.json
$(MAKE_BADGE) "about.publiccode.net" "main"
badges/blog.publiccode.net.svg: \
./node_modules/.bin/badge \
./url-check/make-badge \
blog.publiccode.net-url-check-fails.json
$(MAKE_BADGE) "blog.publiccode.net" "main"
.PHONY: build
build: _site/index.html
.PHONY: serve
serve: _site/url-check-fails.json vendor/bundle
PAGES_REPO_NWO=publiccodenet/publiccodenet-url-check \
bundle exec jekyll serve
.PHONY: clean
clean:
rm -rf _site badges