summaryrefslogtreecommitdiff
path: root/po/Makefile
blob: e3de867280e4e2c54ba7147f7b686bd45ea351fe (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
include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk

domains = $(filter-out all,$(libretools.groups))
locales := $(filter-out .,$(sort $(patsubst %/,%,$(dir $(files.src.src)))))

files.src.gen += $(addsuffix .pot,$(domains))
nested.subdirs += $(locales)

# Have the header include the version number
$(srcdir)/header.po.head: $(srcdir)/%: $(srcdir)/%.in
	@echo 'EDIT < $< > $@'; $(libretools.edit) < '$<' > '$@'
$(srcdir)/header.po.head: $(var.)PACKAGE $(var.)VERSION
files.src.int += header.po.head

# Rely on ../Makefile to fill in a list of our .pot dependencies
$(srcdir)/%.pot: $(srcdir)/header.po.head
	@echo 'MSGCAT $^ > $@';
	@{ \
		cd $(topsrcdir) && \
		for file in $(call at.relto,$(topsrcdir),$^); do \
			sed "/^#:/s, , $${file%/*}/,g" <"$$file"; \
		done; \
	} | msguniq -Fi > '$@'
at.subdirs += ..

include $(topsrcdir)/build-aux/Makefile.tail.mk