tazweb annotate Makefile @ rev 209
Add Italian; make pot; make msgmerge; make clean
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jan 30 12:36:38 2018 +0200 (2018-01-30) |
parents | d05a5c35a71e |
children |
rev | line source |
---|---|
pankso@71 | 1 # Makefile for TazWeb |
pankso@1 | 2 # |
pankso@1 | 3 PREFIX?=/usr |
pankso@17 | 4 DOCDIR?=$(PREFIX)/share/doc |
pankso@1 | 5 DESTDIR?= |
pankso@1 | 6 |
pankso@1 | 7 PACKAGE=tazweb |
pankso@204 | 8 VERSION=1.12 |
al@188 | 9 LINGUAS?=$(shell grep -v "^\#" po/LINGUAS) |
pankso@1 | 10 |
pankso@140 | 11 CC?=gcc |
pankso@140 | 12 |
pankso@1 | 13 all: |
pankso@177 | 14 $(CC) src/tazweb.c -o $(PACKAGE) $(CFLAGS) \ |
pankso@1 | 15 `pkg-config --cflags --libs gtk+-2.0 webkit-1.0` |
pankso@16 | 16 @du -sh $(PACKAGE) |
pankso@1 | 17 |
pankso@177 | 18 # Next generation |
pankso@177 | 19 ng: |
pankso@177 | 20 $(CC) src/tazweb-ng.c -o $(PACKAGE)-ng $(CFLAGS) \ |
pankso@177 | 21 `pkg-config --cflags --libs gtk+-2.0 webkit-1.0` |
pankso@177 | 22 @du -sh $(PACKAGE)-ng |
pankso@177 | 23 |
pankso@140 | 24 qt: |
pankso@140 | 25 cd src && qmake && make |
pankso@140 | 26 @du -sh src/$(PACKAGE)-qt |
pankso@140 | 27 |
al@121 | 28 # i18n |
al@121 | 29 |
al@121 | 30 pot: |
al@188 | 31 xgettext -o po/$(PACKAGE).pot -k_ \ |
al@121 | 32 --package-name="TazWeb" \ |
al@121 | 33 --package-version="$(VERSION)" \ |
al@188 | 34 ./src/tazweb.c ./lib/helper.sh ./data/tazweb.desktop.in |
al@121 | 35 |
al@121 | 36 msgmerge: |
al@121 | 37 @for l in $(LINGUAS); do \ |
al@121 | 38 echo -n "Updating $$l po file."; \ |
al@121 | 39 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \ |
al@121 | 40 done; |
al@121 | 41 |
al@121 | 42 msgfmt: |
al@121 | 43 @for l in $(LINGUAS); do \ |
al@121 | 44 echo "Compiling $$l mo file..."; \ |
al@121 | 45 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@121 | 46 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \ |
al@121 | 47 done; |
al@121 | 48 |
al@188 | 49 desktop: |
al@188 | 50 msgfmt --desktop --template=data/tazweb.desktop.in -d po \ |
al@188 | 51 -o data/tazweb.desktop; |
al@188 | 52 |
al@188 | 53 install: msgfmt desktop |
pankso@1 | 54 mkdir -p \ |
pankso@17 | 55 $(DESTDIR)$(DOCDIR)/$(PACKAGE) \ |
pankso@1 | 56 $(DESTDIR)$(PREFIX)/bin \ |
pankso@178 | 57 $(DESTDIR)$(PREFIX)/lib/tazweb \ |
pankso@35 | 58 $(DESTDIR)$(PREFIX)/share/tazweb \ |
al@161 | 59 $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps \ |
pankso@1 | 60 $(DESTDIR)$(PREFIX)/share/applications |
erjo@25 | 61 install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin |
pankso@178 | 62 install -m 0755 lib/helper.sh $(DESTDIR)$(PREFIX)/lib/tazweb |
pankso@38 | 63 cp -d doc/* $(DESTDIR)$(DOCDIR)/$(PACKAGE) |
al@161 | 64 install -m 0644 data/tazweb.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps |
pankso@141 | 65 install -m 0644 data/tazweb.desktop $(DESTDIR)$(PREFIX)/share/applications |
pankso@141 | 66 install -m 0644 data/bookmarks.txt $(DESTDIR)$(PREFIX)/share/tazweb |
al@125 | 67 mkdir -p $(DESTDIR)$(PREFIX)/share/locale |
al@121 | 68 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@1 | 69 |
pankso@1 | 70 clean: |
pankso@203 | 71 rm -f $(PACKAGE) $(PACKAGE)-ng |
al@121 | 72 rm -rf po/mo |
al@121 | 73 rm -f po/*.mo |
al@121 | 74 rm -f po/*.*~ |
pankso@129 | 75 rm -f src/Makefile src/*.o src/tazweb-qt |
al@188 | 76 rm -f data/*.desktop |
al@121 | 77 |
al@121 | 78 help: |
pankso@177 | 79 @echo "make [ ng | qt | pot | msgmerge | msgfmt | install | clean ]" |