forked from tuxor1337/hidetopbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (30 loc) · 1.33 KB
/
Makefile
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
35
36
37
38
39
40
41
42
SHELL := /bin/bash
JS_FILES = $(shell echo {extension,convenience,intellihide,panelVisibilityManager,prefs,desktopIconsIntegration}.js)
UI_FILES = $(shell echo Settings.ui)
LOCALES_PO = $(wildcard locale/*/*/*.po)
LOCALES_MO = $(patsubst %.po,%.mo,$(LOCALES_PO))
.PHONY: distclean clean all all-po
all: hidetopbar.zip
schemas/gschemas.compiled:
glib-compile-schemas --strict ./schemas/
hidetopbar.zip: schemas/gschemas.compiled $(LOCALES_MO)
zip hidetopbar.zip -r COPYING.txt $(JS_FILES) metadata.json $(LOCALES_MO) schemas Settings.ui
clean:
rm -rf hidetopbar.zip schemas/gschemas.compiled ${LOCALES_MO}
distclean: clean
rm -rf locale/hidetopbar.pot-stamp
%.mo: %.po locale/hidetopbar.pot locale/hidetopbar.pot-stamp
msgfmt -c -o $@ $<
%.po: locale/hidetopbar.pot locale/hidetopbar.pot-stamp
@echo "Updating $@"
@msgmerge --previous --update $@ $<
all-po: $(LOCALES_PO)
locale/hidetopbar.pot locale/hidetopbar.pot-stamp : $(UI_FILES)
xgettext --copyright-holder="Thomas Vogt" \
--package-name="Hide Top Bar" \
--output=locale/hidetopbar.pot \
$(JS_FILES) $(UI_FILES)
sed -i '1s/.*/# <LANGUAGE> translation for the Hide Top Bar extension./' locale/hidetopbar.pot
sed -i "2s/.*/# Copyright (C) $$(date +%Y) Thomas Vogt/" locale/hidetopbar.pot
sed -i '17s/CHARSET/UTF-8/' locale/hidetopbar.pot
touch locale/hidetopbar.pot-stamp