-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
48 lines (36 loc) · 1.51 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
SHELL := /bin/bash
PAGES := index.html about.html documentation.html screenshots.html download.html links.html
PAGES += commercial.html vloghammer.html yosysjs.html faq.html
HOST_REPO := ../yosyshq.github.io/
web: $(PAGES)
index.html:
ln -sf about.html index.html
%.html: %.in templates/* files/*
perl -pe ' #\
if (/^@(\S+)\s*(.*)@\s*$$/) { #\
open(F, "<templates/$$1.in") or die $$!; $$y=$$2; $$x=""; $$x.=$$_ while <F>; close F; #\
$$_=$$x; s/\@\@/$$y/g; s/\@$(basename $@)\@/1/g; s/\@[0-9a-zA-Z_]*\@/0/g; } #\
if (/^\[\[(.*)\]\]$$/) { $$fn = $$1; open(F, "files/$$fn") or die $$!; $$x=""; $$x.=$$_ while <F>; close F; #\
s/([^a-zA-Z0-9 \t\n])/"&#".ord($1).";"/eg; $$_="<pre>$$x</pre>\n"; #\
$$_ .= "<div class=\"file\"><a href=\"files/$$fn\">$$fn</a></div>\n"; } #\
' $< > [email protected]
mv [email protected] $@
update_show:
git rm --ignore-unmatch -f images/show_*.png
yosys-filterlib -verilogsim < files/cmos_cells.lib > files/cmos_cells.v
cd files; for ys in show_*.ys; do \
yosys $$ys -p "show -lib cmos_cells.v -lib coarse_cells.v -format png -prefix ../images/$${ys%.ys}"; \
rm ../images/$${ys%.ys}.dot; \
done
rm -f files/cmos_cells.v
git add images/show_*.png
wget_nogit:
mkdir -p nogit
wget -r -nH -np --cut-dirs=1 -R 'index.html*' http://bygone.clairexen.net/yosys/nogit/
$(HOST_REPO):
git clone [email protected]:YosysHQ/yosyshq.github.io.git $(HOST_REPO)
push: web | $(HOST_REPO)
rsync -azvR files images *.html *.css vloghammer_bugs/*.html $(HOST_REPO)/yosys/.
clean:
rm -f $(PAGES)
.PHONY: web push clean