-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
112 lines (88 loc) · 3.79 KB
/
Makefile
File metadata and controls
112 lines (88 loc) · 3.79 KB
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
SHELL=bash
FILES ?= about.qmd backends.qmd blog.qmd index.qmd packages-overview.qmd publications.qmd roadmap.qmd talks.qmd usage.qmd quality.qmd tutorials.qmd now.qmd
PACKAGES ?= doFuture future futurize future.apply future.batchtools future.callr future.mirai future.mapreduce future.p2p future.tests future.tools futureverse globals listenv marshal parallelly progressify progressr
DOMAIN ?= futureverse.org
all: spell build
spell:
hunspell -H $(FILES)
blog: blog.qmd
blog.qmd: blog.qmd.rsp
Rscript -e R.rsp::rfile "$<" --postprocess=FALSE
build: blog
module try-load pandoc quarto; \
quarto render
preview:
quarto preview
view:
xdg-open docs/index.html
stats: stats-revdep-over-time stats-downloads
## Takes 5-15 minutes to download if starting out fresh
stats-revdep-over-time:
@Rscript -e "if (!requireNamespace('revdepcheck.extras', quietly = TRUE)) remotes::install_github('HenrikBengtsson/revdepcheck.extras')"
R_PROGRESSR_ENABLE=true Rscript R/revdep_over_time.R
## Takes ~5 hours to download and compute if starting out fresh
stats-downloads:
@Rscript -e "pkgs <- c('cranlogs', 'readr', 'ISOweek'); avail <- sapply(pkgs, requireNamespace, quietly = TRUE); pkgs <- pkgs[!avail]; install.packages(pkgs)"
R_PROGRESSR_ENABLE=true Rscript R/cran_stats.R
stats-revdep:
Rscript -e "if (!requireNamespace('revdepcheck.extras')) remotes::install_github('HenrikBengtsson/revdepcheck.extras')"
R_PROGRESSR_ENABLE=true Rscript R/revdep.R
images/favicon.ico: images/logo.png
cd $(<D); \
convert $(<F) -resize 256x256 -transparent white favicon-256.png; \
convert favicon-256.png -resize 16x16 favicon-16.png; \
convert favicon-256.png -resize 32x32 favicon-32.png; \
convert favicon-256.png -resize 64x64 favicon-64.png; \
convert favicon-256.png -resize 128x128 favicon-128.png; \
convert favicon-16.png favicon-32.png favicon-64.png favicon-128.png favicon-256.png -colors 256 $(@F)
## INSTRUCTIONS:
## 1. Download first slide of Google Slides 'futureverse.org-site_preview_text' as a PNG (https://docs.google.com/presentation/d/1IE6--kN7ZrLutcroxvUrtu-2Fnr139iELN6R6fbwkeE/edit#slide=id.p)
## 2. Move file to images/
## 3. Call 'make site_preview'
site_preview: images/site_preview.png
images/site_preview.png: images/logo.png images/futureverse.org-site_preview_text.png
tf1=$$(mktemp --suffix=.png); \
tf2=$$(mktemp --suffix=.png); \
tf3=$$(mktemp --suffix=.png); \
convert "$(word 2,$^)" -trim "$$tf1"; \
h=$$(identify -format "%[fx:h]" "$$tf1") ;\
convert "$<" -trim -resize "x$${h}" "$$tf2"; \
montage "$$tf2" "$$tf1" -tile 2x1 -geometry +30+30 "$$tf3"; \
montage "$$tf3" -geometry 1200x628 "$$tf1"; \
mv "$$tf1" "$@"; \
rm "$$tf2" "$$tf3"
pkgdown-refresh:
@source ~/.bashrc.d/interactive=true/git-rpkgs.sh; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; pkgdown_refresh); \
done
pkgdown-build: pkgdown-ymlrsp
@export R_PROGRESSR_DEMO_DELAY=0; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; Rscript -e pkgdown.extras::build_site); \
done
pkgdown-deploy:
@source ~/.bashrc.d/interactive=true/git-rpkgs.sh; \
for pkg in $(PACKAGES); do \
echo "Package $$pkg:"; \
(cd "../$${pkg}"; pkgdown_deploy) \
done
pkgdown-cname:
@for pkg in $(PACKAGES); do \
printf "Package $$pkg: "; \
(cd "../$${pkg}"; echo "$$pkg.$(DOMAIN)" > docs/CNAME) \
done
pkgdown-favicon:
@for pkg in $(PACKAGES); do \
if [ ! -d "../$$pkg/pkgdown/favicon" ]; then \
cp -R ".pkgdown/favicon" "../$$pkg/pkgdown/favicon"; \
(cd "../$$pkg"; git add "pkgdown/favicon/"; git commit pkgdown/favicon -m "pkgdown: add favicon"; git push); \
fi; \
done
pkgdown-ymlrsp: .pkgdown/_pkgdown.yml.rsp
for pkg in $(PACKAGES); do \
mkdir -p "../$$pkg/pkgdown"; \
cp "$<" "../$$pkg/pkgdown/_pkgdown.yml.rsp"; \
done