Makefile: DESTDIR
This commit is contained in:
parent
8193e471f0
commit
2ad7140e1e
12
Makefile
12
Makefile
@ -8,9 +8,12 @@
|
||||
# notice are preserved. This file is offered as-is, without any warranty.
|
||||
|
||||
.POSIX:
|
||||
|
||||
# if using BSD make(1), remove these pragmas because they break it
|
||||
.PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1)
|
||||
.PRAGMA: command_comment # breaks without this?
|
||||
|
||||
DESTDIR=./dist
|
||||
PREFIX=/usr/local
|
||||
|
||||
CC?=cc
|
||||
@ -32,14 +35,13 @@ clean:
|
||||
rm -rf build/ dist/
|
||||
|
||||
dist: all
|
||||
mkdir -p dist/bin dist/share/man/man1
|
||||
cp build/bin/* dist/bin/
|
||||
cp docs/*.1 dist/share/man/man1/
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
cp build/bin/* $(DESTDIR)$(PREFIX)/bin/
|
||||
cp docs/*.1 $(DESTDIR)$(PREFIX)/share/man/man1/
|
||||
|
||||
.PHONY: install
|
||||
install: dist
|
||||
mkdir -p $(PREFIX)
|
||||
cp -r dist/* $(PREFIX)/
|
||||
cp -r $(DESTDIR)/* /
|
||||
|
||||
.PHONY: test
|
||||
test: build
|
||||
|
Loading…
Reference in New Issue
Block a user