cookutils annotate Makefile @ rev 848
cook: add cook_split_rm(); web/cooker.cgi: visualize console colorizations (existed in the bash log)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Dec 14 23:03:59 2016 +0200 (2016-12-14) |
parents | d8daf2802972 |
children | 9e21916774fb |
rev | line source |
---|---|
pankso@7 | 1 # Makefile for SliTaz Cooker. |
pankso@7 | 2 # |
pankso@7 | 3 |
pankso@7 | 4 PREFIX?=/usr |
pankso@7 | 5 DESTDIR?= |
al@840 | 6 LINGUAS?=fr pt_BR ru zh_CN zh_TW |
al@596 | 7 VERSION:=$(shell grep ^VERSION cook | cut -d'=' -f2) |
pankso@7 | 8 |
pankso@7 | 9 all: |
pankso@7 | 10 |
pankso@422 | 11 install: install-cook install-libcook install-cross |
pankso@422 | 12 uninstall: uninstall-cook uninstall-libcook uninstall-cross |
pankso@422 | 13 |
pankso@422 | 14 # Cook |
pankso@422 | 15 |
pankso@422 | 16 install-cook: |
pankso@361 | 17 install -m 0755 -d $(DESTDIR)/etc/slitaz |
pankso@362 | 18 install -m 0755 -d $(DESTDIR)/etc/init.d |
pankso@362 | 19 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@362 | 20 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@361 | 21 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@361 | 23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@261 | 24 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin |
al@769 | 25 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin |
pankso@261 | 26 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin |
pankso@320 | 27 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin |
pankso@633 | 28 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin |
pankso@7 | 29 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz |
pankso@7 | 30 install -m 0644 cook.site $(DESTDIR)/etc/slitaz |
pankso@362 | 31 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker |
pankso@362 | 32 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications |
pankso@362 | 33 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook |
pankso@362 | 34 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook |
pankso@362 | 35 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest |
pankso@362 | 36 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@362 | 37 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@362 | 38 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d |
pankso@362 | 39 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi |
pankso@7 | 40 |
pankso@422 | 41 uninstall-cook: |
pankso@16 | 42 rm -rf \ |
pankso@7 | 43 $(DESTDIR)$(PREFIX)/bin/cook \ |
al@769 | 44 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \ |
pankso@7 | 45 $(DESTDIR)$(PREFIX)/bin/cooker \ |
pankso@633 | 46 $(DESTDIR)$(PREFIX)/bin/cookiso \ |
pankso@633 | 47 $(DESTDIR)$(PREFIX)/bin/cooklinux \ |
pankso@633 | 48 $(DESTDIR)$(PREFIX)/share/cook \ |
pankso@16 | 49 $(DESTDIR)/etc/slitaz/cook.* \ |
pankso@261 | 50 $(DESTDIR)/var/www/cooker |
pankso@361 | 51 |
pankso@422 | 52 # Libcook |
pankso@422 | 53 |
pankso@422 | 54 install-libcook: |
pankso@422 | 55 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 56 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz |
pankso@422 | 57 |
pankso@422 | 58 uninstall-libcook: |
pankso@422 | 59 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh |
pankso@422 | 60 |
pankso@361 | 61 # Cross |
pankso@361 | 62 |
pankso@361 | 63 install-cross: |
pankso@361 | 64 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@656 | 65 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 66 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@361 | 67 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin |
pankso@361 | 68 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils |
pankso@649 | 69 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross |
pankso@361 | 70 |
pankso@361 | 71 uninstall-cross: |
pankso@361 | 72 rm -rf \ |
pankso@361 | 73 $(DESTDIR)$(PREFIX)/bin/cross \ |
pankso@656 | 74 $(DESTDIR)$(PREFIX)/share/cross \ |
pankso@361 | 75 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt |
al@596 | 76 |
al@596 | 77 # i18n |
al@596 | 78 |
al@596 | 79 pot: |
al@779 | 80 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \ |
al@596 | 81 --copyright-holder="SliTaz Association" \ |
al@596 | 82 --package-name="Cook" \ |
al@596 | 83 --package-version="$(VERSION)" \ |
al@596 | 84 ./cook |
al@596 | 85 |
al@596 | 86 msgmerge: |
al@596 | 87 @for l in $(LINGUAS); do \ |
al@596 | 88 echo -n "Updating $$l po file."; \ |
al@596 | 89 msgmerge -U po/$$l.po po/cook.pot; \ |
al@596 | 90 done; |
al@596 | 91 |
al@596 | 92 msgfmt: |
al@596 | 93 @for l in $(LINGUAS); do \ |
al@596 | 94 echo "Compiling $$l mo file..."; \ |
al@596 | 95 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@596 | 96 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \ |
al@596 | 97 done; |
al@596 | 98 |
al@596 | 99 # Clean source |
al@596 | 100 |
al@596 | 101 clean: |
al@596 | 102 rm -rf po/mo |
al@596 | 103 rm -f po/*.mo |
al@596 | 104 rm -f po/*.*~ |
al@596 | 105 |
al@596 | 106 help: |
al@596 | 107 @echo "make" |
al@596 | 108 @echo " install | uninstall - all" |
al@596 | 109 @echo " install-cook | uninstall-cook - cook" |
al@596 | 110 @echo " install-libcook | uninstall-libcook - libcook" |
al@596 | 111 @echo " install-cross | uninstall-cross - cross" |
al@596 | 112 @echo " pot | msgmerge | msgfmt | clean - i18n" |