aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 30858fdda5779bb1ea502e1dc5a649d1b19348a8 (plain)
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

NAME=iurt
PACKAGE=$(NAME)
VERSION=$(shell sed -n -e "s/my \$$version = '\(.*\)'.*/\1/p" iurt)

VENDORLIB = $(shell eval "`perl -V:installvendorlib`"; echo $$installvendorlib)
INSTALLVENDORLIB = $(DESTDIR)$(VENDORLIB)

sharedir=/usr/share
libdir=/usr/lib
bindir=/usr/bin
sbindir=/usr/sbin

install:
	install -d $(bindir) $(sbindir) $(INSTALLVENDORLIB)/Iurt
	install -m 644 lib/Iurt/*.pm $(INSTALLVENDORLIB)/Iurt
	install -m755 iurt_root_command $(sbindir)/
	install -m755 iurt $(bindir)/iurt
	install -m755 emi ulri $(bindir)/

tar: dist

dist:
	git archive --prefix $(NAME)-$(VERSION)/ HEAD | xz -9 > $(NAME)-$(VERSION).tar.xz

submit: ci
	mdvsys submit $(NAME)

TESTS = $(wildcard t/*.t)
.PHONY: $(TESTS)
$(TESTS):
	perl -Ilib $@
	perl -Ilib -c ulri
	perl -Ilib -c iurt
	perl -Ilib -c emi
check: $(TESTS)