-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (27 loc) · 1.14 KB
/
Makefile
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
#!/usr/bin/make
#-----------------------------------------------------------------------------
#DIALYZER_PLT = ~/.dialyzer_plt
DIALYZER_OPTS = --no_check_plt $(foreach D,$(DIALYZER_PLT),--plt $D)
#-----------------------------------------------------------------------------
.PHONY: all doc edoc compile build dialyzer tests
all: compile doc
doc edoc:
rebar doc
compile build:
rebar compile
dialyzer:
dialyzer $(strip $(DIALYZER_OPTS)) --src src
tests:
prove --exec=estap tests/*.t
#-----------------------------------------------------------------------------
srpm: VERSION=$(shell awk '$$1 == "%define" && $$2 == "_version" {print $$3}' redhat/*.spec)
srpm: PKGNAME=erlang-xmerlrpc
srpm:
rm -rf rpm-build
mkdir -p rpm-build/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ HEAD | gzip -9 > rpm-build/rpm/SOURCES/$(PKGNAME)-$(VERSION).tar.gz
rpmbuild --define="%_usrsrc $$PWD/rpm-build" --define="%_topdir %{_usrsrc}/rpm" -bs redhat/*.spec
mv rpm-build/rpm/SRPMS/$(PKGNAME)-*.src.rpm .
rm -r rpm-build
#-----------------------------------------------------------------------------
# vim:ft=make