File: Makefile

package info (click to toggle)
hydrogen 1.2.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,860 kB
  • sloc: xml: 75,490; cpp: 75,443; sh: 871; python: 238; ruby: 219; makefile: 158; javascript: 130; php: 90; ansic: 26
file content (34 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
33
34
###
### must have the following commandline tools:
###
### itstool  (Debian package: itstool)
### msgfmt   (Debian package: gettext)
### msgmerge (Debian package: gettext)
###

OUT_FILES := org.hydrogenmusic.Hydrogen.metainfo.xml
PO_DIR := po
MO_FILES := $(patsubst %.po,%.mo,$(wildcard $(PO_DIR)/*.po))

ITSTOOL := itstool -i ./$(PO_DIR)/appstream-metainfo.its
MSGMERGE := msgmerge
MSGFMT := msgfmt

all: $(OUT_FILES)
.PHONY: all

clean:
	-rm -f $(MO_FILES)

$(OUT_FILES): %.xml: %.xml.in $(MO_FILES)
	$(ITSTOOL) -j $@.in -o $@ $(MO_FILES)

$(PO_DIR)/appstream.pot: *.xml.in $(PO_DIR)/appstream-metainfo.its
	$(ITSTOOL) -o ./$(PO_DIR)/appstream.pot $^

$(PO_DIR)/*.po: $(PO_DIR)/appstream.pot
	$(MSGMERGE) -N -U $@ ./$(PO_DIR)/appstream.pot --backup=simple --no-wrap --verbose

$(PO_DIR)/%.mo: $(PO_DIR)/%.po
	$(MSGFMT) --check -o $@ -L $* $<