File: Makefile

package info (click to toggle)
websec 1.9.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 180 kB
  • ctags: 39
  • sloc: perl: 804; makefile: 82; lisp: 18; sh: 4
file content (69 lines) | stat: -rw-r--r-- 1,691 bytes parent folder | download | duplicates (3)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
PREFIX=/usr/local
BINDIR=$(DESTDIR)$(PREFIX)/bin
MANDIR=$(DESTDIR)$(PREFIX)/share/man
MAN1DIR=$(MANDIR)/man1
MAN5DIR=$(MANDIR)/man5
DOCDIR=$(DESTDIR)$(PREFIX)/share/doc/websec
EMACSDIR=$(DESTDIR)$(PREFIX)/share/emacs/site-lisp
VIMSYNDIR=$(DESTDIR)$(PREFIX)/share/vim/vim63/syntax

PROGSRC=websec webdiff
CONFSRC=url.list ignore.list

PROGMAN=$(PROGSRC:%=%.1)
CONFMAN=$(CONFSRC:%=%.5)

PROGMANHTML=$(addsuffix (1).html,$(PROGSRC))
CONFMANHTML=$(addsuffix (5).html,$(CONFSRC))

# Generated files
GENFILES=$(PROGMAN) $(CONFMAN)
HTMLFILES=$(addprefix ",$(addsuffix ",$(PROGMANHTML) $(CONFMANHTML)))

all: $(GENFILES)

install: all
	install -d $(BINDIR)
	install websec $(BINDIR)/
	install webdiff $(BINDIR)/

	install -d $(MAN1DIR)
	install -m 0644 websec.1 $(MAN1DIR)
	install -m 0644 webdiff.1 $(MAN1DIR)

	install -d $(MAN5DIR)
	install -m 0644 url.list.5 $(MAN5DIR)
	install -m 0644 ignore.list.5 $(MAN5DIR)

	install -d $(DOCDIR)
	install -d $(DOCDIR)/examples
	install -m 0644 url.list $(DOCDIR)/examples/
	install -m 0644 ignore.list $(DOCDIR)/examples/
	install -m 0644 README $(DOCDIR)/

	install -d $(EMACSDIR)
	install -m 0644 websec.el $(EMACSDIR)
	
	install -d $(VIMSYNDIR)
	install -m 0644 websec.vim $(VIMSYNDIR)

clean:
	rm -f $(GENFILES) pod2htm* $(HTMLFILES)

$(PROGMAN) : %.1 : %
	pod2man $< > $@

$(CONFMAN) : %.5 : %
	pod2man --section 5 $< > $@

install_html: html
	install -m 0644 $(HTMLFILES) $(DEST)

html: $(CONFMANHTML) $(PROGMANHTML)

$(CONFMANHTML) : %(5).html : %
	pod2html --htmlroot . --podroot . --podpath . --infile "$<" --outfile "$@"

$(PROGMANHTML) : %(1).html : %
	-rm -f pod2htm*
	pod2html --htmlroot . --podroot . --podpath . --infile "$<" --outfile "$@"