-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (17 loc) · 733 Bytes
/
Makefile
File metadata and controls
25 lines (17 loc) · 733 Bytes
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
PREFIX ?= /usr/local/
.PHONY: doc check_libxmlpatch check_libxml check_pkgconfig install test
doc: compile
$(MAKE) -C doc
compile: check_libxmlpatch check_libxml
$(MAKE) -C src
check_libxml: check_pkgconfig
@pkg-config --exists libxml-2.0 || (echo 'ERROR: libxml-2.0 is not installed' && false)
check_libxmlpatch: check_pkgconfig
@pkg-config --exists libxmlpatch || (echo 'ERROR: libxmlpatch is not installed' && false)
check_pkgconfig:
@which pkg-config || (echo 'ERROR: pkg-config is not installed' && false)
test: compile
@cd t && ./test.sh
install: compile doc test
install -D -t $(PREFIX)/bin -o root -g root -m 0755 src/xmlpatch
install -D -t $(PREFIX)/share/man/man1 -o root -g root -m 0644 doc/xmlpatch.1.gz