File: Makefile

package info (click to toggle)
potool 0.12-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 192 kB
  • sloc: ansic: 613; yacc: 350; sh: 231; makefile: 83; perl: 51
file content (52 lines) | stat: -rw-r--r-- 1,252 bytes parent folder | download
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
51
52
#
# potool is a program aiding editing of po files
# Copyright (C) 1999-2002 Zbigniew Chyla
# Copyright (C) 2000-2011 Marcin Owsiany
#
# see LICENSE for licensing info
#

VER = 0.12

DESTDIR = /usr/local
BINDIR = $(DESTDIR)/bin
INSTALL = install
BININSTALL = $(INSTALL) -s
GTAR = tar

GLIB_LIB = $(shell pkg-config --libs glib-2.0)
GLIB_INCLUDE = $(shell pkg-config --cflags glib-2.0)
CFLAGS = $(GLIB_INCLUDE) -g -Wall -O2
LDLIBS = $(GLIB_LIB)

THINGS  = potool po.tab lex.po
OBJS    = $(addsuffix .o, $(THINGS))
SOURCES = $(addsuffix .c, $(THINGS))

potool: $(OBJS)

po.tab.o lex.po.c lex.po.o: po-gram.h common.h

lex.po.c: po-gram.lex
	flex -Ppo $<
#	flex --debug -Ppo $<

po.tab.c: po-gram.y
	bison -ppo -bpo -d $<

install: potool
	$(BININSTALL) potool $(BINDIR)
	$(INSTALL) scripts/poedit $(BINDIR)/potooledit
	$(INSTALL) scripts/postats $(BINDIR)
#	$(INSTALL) scripts/poupdate $(BINDIR)
	$(INSTALL) change-po-charset $(BINDIR)

clean:
	rm -f $(OBJS) *~ lex.po.c po.tab.[ch] potool scripts/*~

dist: clean
	cd ..; \
	 rm -f potool-$(VER).tar{,.gz} potool-$(VER); \
	 ln -s potool potool-$(VER); \
	 $(GTAR) --exclude='*/CVS' --exclude='*/.cvsignore' --owner=root --group=root -hcf potool-$(VER).tar potool-$(VER) && \
	 gzip -9 potool-$(VER).tar