Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
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 lex.po.c lex.po.o: po-gram.h common.h
31
32 lex.po.c: po-gram.lex
33 flex -Ppo $<
34 # flex --debug -Ppo $<
35
36 po.tab.c: po-gram.y
37 bison -ppo -bpo -d $<
38
39 install: potool
40 $(INSTALL) -d $(BINDIR)
41 $(BININSTALL) potool $(BINDIR)
42 $(INSTALL) scripts/poedit $(BINDIR)
43 $(INSTALL) scripts/postats $(BINDIR)
44 $(INSTALL) scripts/poupdate $(BINDIR)
45 $(INSTALL) change-po-charset $(BINDIR)
46
47 clean:
48 rm -f $(OBJS) *~ lex.po.c po.tab.[ch] potool scripts/*~
49
50 dist: clean
51 cd ..; \
52 rm -f potool-$(VER).tar{,.gz} potool-$(VER); \
53 ln -s potool potool-$(VER); \
54 $(GTAR) --exclude='*/.git*' --owner=root --group=root -hcf potool-$(VER).tar potool-$(VER) && \
55 gzip -9 potool-$(VER).tar
56
57 check: potool
58 cd tests && bash test
59 # make clean check G_SLICE=always-malloc WRAPPER='valgrind --leak-check=full --show-reachable=yes --error-exitcode=1' CC=colorgcc CFLAGS="-O0 -Wall -Werror"