File: Makefile

package info (click to toggle)
makejail 0.0.5-10
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 252 kB
  • ctags: 156
  • sloc: python: 1,161; makefile: 87; sh: 84
file content (49 lines) | stat: -rw-r--r-- 1,328 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Makefile for makejail

DESTDIR=/
prefix = $(DESTDIR)/usr
BIN_DIR = $(prefix)/sbin
DOC_DIR = $(prefix)/share/doc/makejail
MAN_DIR = $(prefix)/share/man/man8
HTML_DIR = $(DOC_DIR)/html
MAN_PAGE = makejail.8
EXAMPLES_DIR = $(DOC_DIR)/examples

INSTALL = install

DISTDIR = makejail

.PHONY: install distclean

all: docs
	@echo "Usage: make [install|uninstall|docs|clean_docs]"

docs:
	python makedocs
	docbook-to-man manpage.sgml > $(MAN_PAGE)

install:
	if (test ! -d $(BIN_DIR)); then mkdir -p $(BIN_DIR) ; fi
	$(INSTALL) makejail $(BIN_DIR)
	chmod 700 $(BIN_DIR)/makejail
	if (test ! -d $(DOC_DIR)); then mkdir -p $(DOC_DIR) ; chmod 755 $(DOC_DIR) ; fi
	cp doc/README $(DOC_DIR)
	chmod 644 $(DOC_DIR)/README
	if (test ! -d $(HTML_DIR)); then mkdir -p $(HTML_DIR) ; chmod 755 $(HTML_DIR) ; fi
	cp doc/index.html $(HTML_DIR)
	chmod 644 $(HTML_DIR)/index.html
	if (test ! -d $(EXAMPLES_DIR)); then mkdir -p $(EXAMPLES_DIR) ; chmod 755 $(EXAMPLES_DIR) ; fi
	cp -a examples/* $(EXAMPLES_DIR)
	chmod 644 $(EXAMPLES_DIR)/*
	if (test ! -d $(MAN_DIR)); then mkdir -p $(MAN_DIR) ; chmod 755 $(MAN_DIR) ; fi
	$(INSTALL) makejail.8 $(MAN_DIR)
	chmod 644 $(MAN_DIR)/$(MAN_PAGE)

clean_docs:
	rm -rf doc manpage.sgml makejail.8

uninstall:
	rm -f $(BIN_DIR)/makejail
	rm -rf $(EXAMPLES_DIR)
	rm -rf $(DOC_DIR)
	rm -f $(MAN_DIR)/$(MAN_PAGE)