forked from felipec/sharness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 1015 Bytes
/
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
prefix = $(HOME)
INSTALL_DIR = $(prefix)/share/sharness
DOC_DIR = $(prefix)/share/doc/sharness
EXAMPLE_DIR = $(DOC_DIR)/examples
INSTALL_FILES = aggregate-results.sh sharness.sh
DOC_FILES = API.md CHANGELOG.md COPYING README.git README.md
EXAMPLE_FILES = test/Makefile test/simple.t
INSTALL = install
RM = rm -f
SED = sed
TOMDOCSH = tomdoc.sh
all:
install: all
$(INSTALL) -d -m 755 $(INSTALL_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
$(INSTALL) -m 644 $(INSTALL_FILES) $(INSTALL_DIR)
$(INSTALL) -m 644 $(DOC_FILES) $(DOC_DIR)
$(SED) -e "s!aggregate-results.sh!$(INSTALL_DIR)/aggregate-results.sh!" test/Makefile > $(EXAMPLE_DIR)/Makefile
$(SED) -e "s!. ./sharness.sh!. $(INSTALL_DIR)/sharness.sh!" test/simple.t > $(EXAMPLE_DIR)/simple.t
uninstall:
$(RM) -r $(INSTALL_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
doc: all
{ printf "# Sharness API\n\n"; \
$(TOMDOCSH) -m -a Public sharness.sh; \
printf "Generated by "; $(TOMDOCSH) --version; } >API.md
test: all
$(MAKE) -C test
.PHONY: all install uninstall doc test