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