File: Makefile

package info (click to toggle)
sharness 1.0.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 228 kB
  • sloc: sh: 912; perl: 63; makefile: 60
file content (36 lines) | stat: -rw-r--r-- 1,015 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
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