r4306 justify datadir path
[racktables] / Makefile
1 DESTDIR ?=
2 prefix ?= /usr/local
3
4 docdir ?= $(prefix)/share/doc/racktables
5 datadir ?= $(prefix)/share
6 staticdir ?= $(datadir)/racktables/static
7 codedir ?= $(datadir)/racktables/code
8 scriptdir ?= $(datadir)/racktables
9
10 INSTALL := install
11 INSTALL_DATA := $(INSTALL) -m 644
12 INSTALL_DIR := $(INSTALL) -m 755 -d
13 INSTALL_PROGRAM := $(INSTALL) -m 755
14
15 install-docs: COPYING ChangeLog LICENSE README
16 $(INSTALL_DIR) $(DESTDIR)$(docdir)
17 $(INSTALL_DATA) $^ $(DESTDIR)$(docdir)
18
19 install-helpers: scripts gateways
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
24
25 install-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
30 install-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
35 install: install-helpers install-static install-code