r4306 justify datadir path
[racktables] / Makefile
CommitLineData
cf7f9a86
DO
1DESTDIR ?=
2prefix ?= /usr/local
3
4docdir ?= $(prefix)/share/doc/racktables
abc915d4
DO
5datadir ?= $(prefix)/share
6staticdir ?= $(datadir)/racktables/static
7codedir ?= $(datadir)/racktables/code
8scriptdir ?= $(datadir)/racktables
cf7f9a86
DO
9
10INSTALL := install
11INSTALL_DATA := $(INSTALL) -m 644
12INSTALL_DIR := $(INSTALL) -m 755 -d
13INSTALL_PROGRAM := $(INSTALL) -m 755
14
15install-docs: COPYING ChangeLog LICENSE README
16 $(INSTALL_DIR) $(DESTDIR)$(docdir)
17 $(INSTALL_DATA) $^ $(DESTDIR)$(docdir)
18
19install-helpers: scripts gateways
abc915d4
DO
20 $(INSTALL_DIR) $(DESTDIR)$(scriptdir)
21 cp -r $^ $(DESTDIR)$(scriptdir)
22 find $(DESTDIR)$(scriptdir)/scripts -type d -a -name '.svn' -exec rm -rf \{\} \; -prune
23 find $(DESTDIR)$(scriptdir)/gateways -type d -a -name '.svn' -exec rm -rf \{\} \; -prune
cf7f9a86
DO
24
25install-static: wwwroot/css wwwroot/js wwwroot/pix
26 $(INSTALL_DIR) $(DESTDIR)$(staticdir)
27 cp -r $^ $(DESTDIR)$(staticdir)
28 find $(DESTDIR)$(staticdir) -type d -a -name '.svn' -exec rm -rf \{\} \; -prune
29
30install-code: wwwroot/inc wwwroot/favicon.ico wwwroot/index.php
31 $(INSTALL_DIR) $(DESTDIR)$(codedir)/inc
32 $(INSTALL_DATA) wwwroot/favicon.ico wwwroot/index.php $(DESTDIR)$(codedir)
33 $(INSTALL_DATA) wwwroot/inc/*.php $(DESTDIR)$(codedir)/inc
34
35install: install-helpers install-static install-code