Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 #
2 # potool is a program aiding editing of po files
3 # Copyright (C) 1999-2002 Zbigniew Chyla
4 # Copyright (C) 2000-2019 Marcin Owsiany
5 #
6 # see LICENSE for licensing info
7 #
8
9 VER = 0.19
10
11 DESTDIR = /usr/local
12 BINDIR = $(DESTDIR)/bin
13 INSTALL = install
14 BININSTALL = $(INSTALL) -s
15 GTAR = tar
16 PKG_CONFIG ?= pkg-config
17
18 GLIB_LIB = $(shell $(PKG_CONFIG) --libs glib-2.0)
19 GLIB_INCLUDE = $(shell $(PKG_CONFIG) --cflags glib-2.0)
20 CPPFLAGS += $(GLIB_INCLUDE)
21 CFLAGS += -g -Wall -Werror
22 LDLIBS += $(GLIB_LIB)
23
24 THINGS = potool po.tab lex.po
25 OBJS = $(addsuffix .o, $(THINGS))
26 SOURCES = $(addsuffix .c, $(THINGS))
27
28 potool: $(OBJS)
29
•30 po.tab.o: po-gram.h common.h
31 lex.po.c lex.po.o: po-gram.h common.h po.tab.c
32
33 lex.po.c: po-gram.lex
34 flex -Ppo $<
35 # flex --debug -Ppo $<
36
37 po.tab.c: po-gram.y
38 bison -ppo -bpo -d $<
39
40 install: potool
41 $(INSTALL) -d $(BINDIR)
42 $(BININSTALL) potool $(BINDIR)
43 $(INSTALL) scripts/poedit $(BINDIR)
44 $(INSTALL) scripts/postats $(BINDIR)
45 $(INSTALL) scripts/poupdate $(BINDIR)
46 $(INSTALL) change-po-charset $(BINDIR)
47
48 clean:
49 rm -f $(OBJS) *~ lex.po.c po.tab.[ch] potool scripts/*~
50
51 dist: clean
52 cd ..; \
53 rm -f potool-$(VER).tar{,.gz} potool-$(VER); \
54 ln -s potool potool-$(VER); \
55 $(GTAR) --exclude='*/.git*' --owner=root --group=root -hcf potool-$(VER).tar potool-$(VER) && \
56 gzip -9 potool-$(VER).tar
57
58 check: potool
59 cd tests && bash test
60 # make clean check G_SLICE=always-malloc WRAPPER='valgrind --leak-check=full --show-reachable=yes --error-exitcode=1' CC=colorgcc CFLAGS="-O0 -Wall -Werror"