summaryrefslogtreecommitdiff
path: root/buildlib
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:59:34 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:59:34 +0000
commit34b9dd5ac0d90f997adbd70986014e4c692e47ad (patch)
treec1581ab3a81b06d13b89129b8285a5a227bed217 /buildlib
parent809484570008da67b0dcd291af7673481fff52f6 (diff)
gettext stuff
Author: jgg Date: 2002-10-16 05:35:41 GMT gettext stuff
Diffstat (limited to 'buildlib')
-rw-r--r--buildlib/podomain.mak22
1 files changed, 22 insertions, 0 deletions
diff --git a/buildlib/podomain.mak b/buildlib/podomain.mak
new file mode 100644
index 000000000..2bf72ac58
--- /dev/null
+++ b/buildlib/podomain.mak
@@ -0,0 +1,22 @@
+# -*- 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.
+
+MY_DOMAIN := $(PACKAGE)
+ifdef DOMAIN
+$($(LOCAL)-OBJS): CPPFLAGS := $(CPPFLAGS) -DDOMAIN='"$(DOMAIN)"'
+MY_DOMAIN := $(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
+ (echo $(SRC) | xargs -n1 echo) > $@
+all: $(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)