File: Makefile

package info (click to toggle)
rust-linescroll 0.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: makefile: 23
file content (26 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (2)
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
VERSION := $(shell grep version Cargo.toml | sed -e 's/.* = "//g;s/"$$//g')
NAME := linescroll
DOC := $(NAME)
MDDATE := $(shell find $(DOC).md -printf "%Td %TB %TY\n")
RELEASE := target/release/$(NAME)

all: build test bintest doc

build:
	cargo build --release

doc:
	( cat $(NAME).md | sed -e 's/^footer: \(\S\+\) \S\+$$/footer: \1 $(VERSION)/g' -e 's/^date:.*/date: $(MDDATE)/g' ) > $(NAME).md.tmp && mv $(NAME).md.tmp $(NAME).md
	cat $(NAME).md | sed -e 's,\([^ `-]\)--\([a-zA-Z]\),\1\\--\2,g' -e '/^|/s/\\n/\\\\n/g' -e '/^|/s/\\t/\\\\t/g' > $(NAME).man.md
	pandoc --standalone --ascii --to man $(NAME).man.md -o $(NAME).1
	rm $(NAME).man.md

test:
	cargo test

bintest:

install: all
	strip $(RELEASE)
	please install -m 0755 $(RELEASE) /usr/local/bin