File: Makefile

package info (click to toggle)
hobbit-plugins 20120532
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 312 kB
  • sloc: perl: 1,778; makefile: 64; sh: 24
file content (48 lines) | stat: -rw-r--r-- 1,456 bytes parent folder | download
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
ETCFILES = dirty_vcs_dirs dirty_etc_ok
ETCDIRS = clientlaunch.d misc.d hobbitgraph.d hobbitlaunch.d hobbitserver.d
EXTDIRS = client-ext server-ext
MANS = xynagios.1 Hobbit.3pm

all: $(MANS)

xynagios.1: client-bin/xynagios
	pod2man $< > $@

Hobbit.3pm: perl/Hobbit.pm
	pod2man --section=3pm $< > $@

install: $(MANS)
	for dir in $(ETCDIRS) ; do \
		dest=$(DESTDIR)/etc/hobbit/$$dir && \
		install -d $$dest && \
		install -m644 $$dir/* $$dest || exit 1 ; \
	done
	for file in $(ETCFILES) ; do \
		dest=$(DESTDIR)/etc/hobbit && \
		install -d $$dest && \
		install -m644 etc/$$file $$dest || exit 1 ; \
	done
	chmod 755 $(DESTDIR)/etc/hobbit/misc.d/*
	for dir in $(EXTDIRS) ; do \
		dest=$(DESTDIR)/usr/lib/hobbit/`basename $$dir -ext`/ext && \
		install -d $$dest && \
		install $$dir/* $$dest || exit 1; \
	done
	dest=$(DESTDIR)/usr/lib/hobbit/client/bin && \
	     install -d $$dest && \
	     install client-bin/* $$dest
	dest=$(DESTDIR)/etc/sudoers.d && \
	     install -d $$dest && \
	     install sudoers.d/* $$dest
	install -d $(DESTDIR)/usr/share/perl5
	install -m644 perl/* $(DESTDIR)/usr/share/perl5
	install -d $(DESTDIR)/usr/share/man/man1
	install -d $(DESTDIR)/usr/share/man/man3
	install -m644 xynagios.1 $(DESTDIR)/usr/share/man/man1
	install -m644 Hobbit.3pm $(DESTDIR)/usr/share/man/man3

clean:
	rm -f $(MANS)

test:
	for i in `egrep -l '^#! ?/usr/bin/perl' *-ext/* | egrep -v 'misc|postgres|~$$'` perl/*.pm; do perl -Iperl -c $$i; done