summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 07ad4b382e717103d0f231c1d725f4718484f9f0 (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
44
45
46
47
48
49
50
.SUFFIXES: .x .c .o
VERSION=$(shell grep ^Version: pomatic.spec | cut -f2 -d' ')
CVSTAG=pomatic-$(shell echo $(VERSION) | sed 's^\.^-^g')

bindir=/usr/bin
libdir=/usr/lib
mandir=/usr/share/man

all: pomatic

CFLAGS=-Wall
LDFLAGS=-lfl

.o:
	$(CC) -o $@ $^ $(LDFLAGS)
	
.c.o:
	$(CC) -o $@ $(CFLAGS) -c $^

.x.c:
	flex -o$@ $^

SCRIPTS = collect-potfiles convert-locale create-locales inject-talkfilter-locales

install: all
	mkdir -p $(DESTDIR)$(bindir) 
	mkdir -p $(DESTDIR)$(mandir)/man1
	install -m755 pomatic $(SCRIPTS) $(DESTDIR)$(bindir)/
	install -m644 pomatic.1 $(DESTDIR)$(mandir)/man1

clean:
	$(RM) *.o pomatic

dist: archive

tag:
	cvs tag -c $(CVSTAG)

force-tag:
	cvs tag -cF $(CVSTAG)

archive:
	@rm -rf /tmp/pomatic-$(VERSION) /tmp/pomatic
	@cd /tmp; cvs export -r$(CVSTAG) pomatic; mv pomatic pomatic-$(VERSION)
	@cd /tmp; tar czSpf pomatic-$(VERSION).tar.gz pomatic-$(VERSION)
	@rm -rf /tmp/pomatic-$(VERSION)
	@cp /tmp/pomatic-$(VERSION).tar.gz .
	@rm -f /tmp/pomatic-$(VERSION).tar.gz
	@echo ""
	@echo "The final archive is ./pomatic-$(VERSION).tar.gz."