summaryrefslogtreecommitdiff
path: root/buildlib/podomain.mak
blob: 265359abc35860a7c20f0ec50df8af1a176887e3 (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
# -*- make -*-

# This creates the file listing used by xgettext and friends based on the
# declared domain of the make file. It also arranges to set the DOMAIN 
# CPPFLAG for the compilation.

ifneq ($(APT_DOMAIN),none)

MY_DOMAIN := $(PACKAGE)
ifdef APT_DOMAIN
$($(LOCAL)-OBJS): CPPFLAGS := $(CPPFLAGS) -DAPT_DOMAIN='"$(APT_DOMAIN)"'
MY_DOMAIN := $(APT_DOMAIN)
endif

MKDIRS += $(PO_DOMAINS)/$(MY_DOMAIN)
$(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: SRC := $(addprefix $(SUBDIR)/,$(SOURCE))
$(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: makefile dirs
	(echo $(SRC) | xargs -n1 echo) > $@.tmp
	cmp --silent $@.tmp $@ || mv $@.tmp $@
startup binary program clean update-po: $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list

veryclean: veryclean/$(LOCAL)
veryclean/po/$(LOCAL): LIST := $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
veryclean/po/$(LOCAL):
	rm -f $(LIST)

endif