Merge pull request #573 from rafasc/ra/570-improve-suggested-script
[aurutils.git] / Makefile
blobec407511f63b31f07fe6d67f1354dd591a81f51e
1 PROGNM = aurutils
2 PREFIX ?= /usr
3 SHRDIR ?= $(PREFIX)/share
4 BINDIR ?= $(PREFIX)/bin
5 LIBDIR ?= $(PREFIX)/lib
6 AUR_LIB_DIR ?= $(LIBDIR)/$(PROGNM)
8 .PHONY: shellcheck install build completion aur
10 build: aur completion
12 aur: aur.in
13 m4 -DAUR_LIB_DIR='$(AUR_LIB_DIR)' $< >$@
15 completion:
16 @$(MAKE) -C completions bash zsh
18 shellcheck: aur
19 @shellcheck -x -f gcc -e 2094,2035,2086,2016,1071 aur lib/*
21 install-aur: aur
22 @install -Dm755 aur -t '$(DESTDIR)$(BINDIR)'
24 install: install-aur
25 @install -Dm755 lib/aur-* -t '$(DESTDIR)$(LIBDIR)/$(PROGNM)'
26 @install -Dm644 man1/* -t '$(DESTDIR)$(SHRDIR)/man/man1'
27 @install -Dm644 man7/* -t '$(DESTDIR)$(SHRDIR)/man/man7'
28 @install -Dm644 LICENSE -t '$(DESTDIR)$(SHRDIR)/licenses/$(PROGNM)'
29 @$(MAKE) -C completions DESTDIR='$(DESTDIR)' install-bash install-zsh