]> Cypherpunks.ru repositories - gocheese.git/commitdiff
Replace Makefile with redo
authorSergey Matveev <stargrave@stargrave.org>
Fri, 24 Jul 2020 09:19:00 +0000 (12:19 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 24 Jul 2020 09:23:32 +0000 (12:23 +0300)
Makefile [deleted file]
all.do [new file with mode: 0644]
gocheese.do [new file with mode: 0644]
gocheese.info.do [new file with mode: 0644]
test.do [new file with mode: 0644]
www.do [new file with mode: 0644]
www.mk [deleted file]

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index d88c7e6..0000000
--- a/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-GO ?= go
-MAKEINFO ?= makeinfo
-
-GOPATH != pwd
-VERSION != cat VERSION
-
-MOD = go.cypherpunks.ru/gocheese/v2
-LDFLAGS = -X main.Version=$(VERSION)
-
-all: gocheese gocheese.info
-
-gocheese:
-       GOPATH=$(GOPATH) go build -o gocheese -ldflags "$(LDFLAGS)" $(MOD)
-
-gocheese.info: *.texi
-       $(MAKEINFO) -o $@ gocheese.texi
-
-test:
-       GOPATH=$(GOPATH) go test $(MOD)/...
diff --git a/all.do b/all.do
new file mode 100644 (file)
index 0000000..3a7a0f1
--- /dev/null
+++ b/all.do
@@ -0,0 +1 @@
+redo-ifchange gocheese gocheese.info
diff --git a/gocheese.do b/gocheese.do
new file mode 100644 (file)
index 0000000..f7937fd
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange *.go
+${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" go.cypherpunks.ru/gocheese/v2
diff --git a/gocheese.info.do b/gocheese.info.do
new file mode 100644 (file)
index 0000000..f9fef35
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange *.texi
+${MAKEINFO:=makeinfo} -o $3 gocheese.texi
diff --git a/test.do b/test.do
new file mode 100644 (file)
index 0000000..88272c2
--- /dev/null
+++ b/test.do
@@ -0,0 +1 @@
+${GO:=go} test go.cypherpunks.ru/gocheese/v2/... >&2
diff --git a/www.do b/www.do
new file mode 100644 (file)
index 0000000..61a9a96
--- /dev/null
+++ b/www.do
@@ -0,0 +1,12 @@
+rm -f gocheese.html/*.html
+${MAKEINFO:=makeinfo} --html \
+    --set-customization-variable CSS_LINES="`cat style.css`" \
+    --set-customization-variable SHOW_TITLE=0 \
+    --set-customization-variable USE_ACCESSKEY=0 \
+    --set-customization-variable DATE_IN_HEADER=1 \
+    --set-customization-variable TOP_NODE_UP_URL=index.html \
+    --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+    --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+    -o gocheese.html gocheese.texi
+find gocheese.html -type d -exec chmod 755 {} \;
+find gocheese.html -type f -exec chmod 644 {} \;
diff --git a/www.mk b/www.mk
deleted file mode 100644 (file)
index db7632b..0000000
--- a/www.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-MAKEINFO ?= makeinfo
-
-CSS != cat style.css
-
-all: gocheese.html
-
-gocheese.html: *.texi
-       rm -f gocheese.html/*.html
-       $(MAKEINFO) --html \
-               --set-customization-variable CSS_LINES='$(CSS)' \
-               --set-customization-variable SHOW_TITLE=0 \
-               --set-customization-variable USE_ACCESSKEY=0 \
-               --set-customization-variable DATE_IN_HEADER=1 \
-               --set-customization-variable TOP_NODE_UP_URL=index.html \
-               --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
-               --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
-               -o gocheese.html gocheese.texi