source: skype/Makefile @ 49a3c02

Last change on this file since 49a3c02 was cc7a153, checked in by Miklos Vajna <vmiklos@…>, at 2010-04-05T21:25:07Z

make building documentation optional

  • Property mode set to 100644
File size: 2.4 KB
Line 
1-include config.mak
2
3VERSION = 0.8.1
4DATE := $(shell date +%Y-%m-%d)
5# latest stable
6BITLBEE_VERSION = 1.2.5
7
8AMPATH = $(shell grep automake- $(shell which automake)|sed "s|.*'\(.*\)';|\1|")
9
10ifeq ($(AMPATH),)
11# Gentoo, it has some crappy wrapper
12AMPATH = $(shell find /usr/share/ -maxdepth 1 -name 'automake-*'|tail -n 1)
13endif
14
15ifeq ($(ASCIIDOC),yes)
16MANPAGES = skyped.1
17else
18MANPAGES =
19endif
20
21ifeq ($(BITLBEE),yes)
22LIBS = skype.$(SHARED_EXT)
23else
24LIBS =
25endif
26
27all: $(LIBS) $(MANPAGES)
28
29skype.$(SHARED_EXT): skype.c config.mak
30ifeq ($(BITLBEE),yes)
31        $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS)
32endif
33
34install: all
35ifeq ($(BITLBEE),yes)
36        $(INSTALL) -d $(DESTDIR)$(plugindir)
37        $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir)
38endif
39ifeq ($(SKYPE4PY),yes)
40        $(INSTALL) -d $(DESTDIR)$(bindir)
41        $(INSTALL) -d $(DESTDIR)$(sysconfdir)
42        $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped
43        perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped
44        $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf
45        perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf
46        $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir)
47endif
48
49client: client.c
50
51autogen: configure.ac
52        cp $(AMPATH)/install-sh ./
53        autoconf
54
55clean:
56        rm -f skype.$(SHARED_EXT)
57
58distclean: clean
59        rm -f config.log config.mak config.status
60
61autoclean: distclean
62        rm -rf aclocal.m4 autom4te.cache configure install-sh
63
64# take this from the kernel
65check:
66        perl checkpatch.pl --no-tree --file skype.c
67
68dist:
69        git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf -
70        mkdir -p bitlbee-skype-$(VERSION)
71        git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog
72        make -C bitlbee-skype-$(VERSION) autogen
73        tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION)
74        rm -rf bitlbee-skype-$(VERSION)
75
76release:
77        git tag $(VERSION)
78        $(MAKE) dist
79        gpg --comment "See http://vmiklos.hu/gpg/ for info" \
80                -ba bitlbee-skype-$(VERSION).tar.gz
81
82doc: HEADER.html Changelog
83
84HEADER.html: README Makefile
85        asciidoc -a toc -a numbered -a sectids -o HEADER.html README
86        sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html
87        sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html
88
89Changelog: .git/refs/heads/master
90        git log --no-merges |git name-rev --tags --stdin >Changelog
91
92%.1: %.txt asciidoc.conf
93        a2x --asciidoc-opts="-f asciidoc.conf" \
94                -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $<
Note: See TracBrowser for help on using the repository browser.