Files: 21cf63b48e3c7f02ebf1d146de15aabd704929cd / Makefile
824 bytesRaw
1 | .POSIX: |
2 | DILLO_DIR=~/.dillo |
3 | DPI_DIR=$(DILLO_DIR)/dpi |
4 | DPIDRC=$(DILLO_DIR)/dpidrc |
5 | PROTO=did |
6 | NAME=did |
7 | BIN_NAME=did.dpi |
8 | BIN=target/debug/did-dpi |
9 | SRC = src/main.rs |
10 | |
11 | all: $(BIN) |
12 | |
13 | test: |
14 | @#cargo test |
15 | cargo build |
16 | -dpidc stop |
17 | @#timeout 1 dillo did:asdf |
18 | |
19 | $(BIN): $(SRC) |
20 | cargo build |
21 | |
22 | install: $(BIN) install-proto |
23 | mkdir -p $(DPI_DIR)/$(NAME) |
24 | cp -f $(BIN) $(DPI_DIR)/$(NAME)/$(BIN_NAME) |
25 | |
26 | link: $(BIN) install-proto |
27 | mkdir -p $(DPI_DIR)/$(NAME) |
28 | ln -frs $(BIN) $(DPI_DIR)/$(NAME)/$(BIN_NAME) |
29 | |
30 | install-proto: |
31 | test -e $(DPIDRC) || cp /etc/dillo/dpidrc $(DPIDRC) |
32 | grep -qF 'proto.$(PROTO)=$(NAME)/$(BIN_NAME)' $(DPIDRC) ||\ |
33 | echo 'proto.$(PROTO)=$(NAME)/$(BIN_NAME)' >> $(DPIDRC) |
34 | |
35 | clean: |
36 | cargo clean |
37 | |
38 | uninstall: |
39 | rm -f $(DPI_DIR)/$(NAME)/$(BIN_NAME) |
40 | test -s $(DPIDRC) && sed -i~ '/proto\.$(PROTO)=$(NAME)\/$(BIN_NAME)/d' $(DPIDRC) |
41 |
Built with git-ssb-web