summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 4fb4879b38f1a6c8cc16aeece382eaf21ea64a41 (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
37
38
39
40
41
42
43
RPM ?= $(HOME)/rpm

PREFIX = /usr
BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share
fake_packages_dir = $(DATADIR)/perl_checker/fake_packages
PERL_CHECKER_TARGET = native-code
PERL_CHECKER_VERSION = 1.2.4

FILES-perl_checker = AUTHORS COPYING README.emacs Makefile misc src fake_packages

.PHONY: src

all: src/perl_checker test

src/perl_checker:
	$(MAKE) -C src build_ml perl_checker.html $(PERL_CHECKER_TARGET) fake_packages_dir=$(fake_packages_dir) DEBUG=0

test: src/perl_checker
	$(MAKE) -C src/test

clean:
	rm -f src/perl_checker *.tar.* .perl_checker.cache lib
	$(MAKE) -C src clean
	find -name "*~" | xargs rm -rf

install: clean all
	$(MAKE) -C misc install
	install src/perl_checker $(DESTDIR)$(BINDIR)
	install -d $(DESTDIR)$(fake_packages_dir)
	cd fake_packages ; tar c `find . -name "*.pm"` | tar xC $(DESTDIR)$(fake_packages_dir)

update:
	svn update

commit:
	svn commit

tar: clean
	mkdir -p perl_checker-$(PERL_CHECKER_VERSION)
	tar c --exclude "GNUmakefile*" --exclude .svn $(FILES-perl_checker) | tar xC perl_checker-$(PERL_CHECKER_VERSION)
	tar cfj perl_checker-$(PERL_CHECKER_VERSION).tar.bz2 perl_checker-$(PERL_CHECKER_VERSION)
	rm -rf perl_checker-$(PERL_CHECKER_VERSION)