cookutils view Makefile @ rev 653
Improve CFLAGS and cross tools build
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Mar 05 00:24:19 2014 +0100 (2014-03-05) |
parents | 4cee6103d578 |
children | 0f3d27925e4b |
line source
1 # Makefile for SliTaz Cooker.
2 #
4 PREFIX?=/usr
5 DESTDIR?=
6 LINGUAS?=ru pt_BR
7 VERSION:=$(shell grep ^VERSION cook | cut -d'=' -f2)
9 all:
11 install: install-cook install-libcook install-cross
12 uninstall: uninstall-cook uninstall-libcook uninstall-cross
14 # Cook
16 install-cook:
17 install -m 0755 -d $(DESTDIR)/etc/slitaz
18 install -m 0755 -d $(DESTDIR)/etc/init.d
19 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
20 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker
21 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest
23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
24 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin
25 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin
26 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin
27 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin
28 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
29 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
30 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
31 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
32 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
33 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
34 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
35 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
36 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
37 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
38 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
40 uninstall-cook:
41 rm -rf \
42 $(DESTDIR)$(PREFIX)/bin/cook \
43 $(DESTDIR)$(PREFIX)/bin/cooker \
44 $(DESTDIR)$(PREFIX)/bin/cookiso \
45 $(DESTDIR)$(PREFIX)/bin/cooklinux \
46 $(DESTDIR)$(PREFIX)/share/cook \
47 $(DESTDIR)/etc/slitaz/cook.* \
48 $(DESTDIR)/var/www/cooker
50 # Libcook
52 install-libcook:
53 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
54 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
56 uninstall-libcook:
57 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
59 # Cross
61 install-cross:
62 install -m 0755 -d $(DESTDIR)/etc/slitaz
63 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
64 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
65 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
66 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
67 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
68 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
70 uninstall-cross:
71 rm -rf \
72 $(DESTDIR)$(PREFIX)/bin/cross \
73 $(DESTDIR)/etc/slitaz/cross.conf \
74 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
76 # i18n
78 pot:
79 xgettext -o po/cook.pot -k_ -k_n -L Shell -cL10n \
80 --copyright-holder="SliTaz Association" \
81 --package-name="Cook" \
82 --package-version="$(VERSION)" \
83 ./cook
85 msgmerge:
86 @for l in $(LINGUAS); do \
87 echo -n "Updating $$l po file."; \
88 msgmerge -U po/$$l.po po/cook.pot; \
89 done;
91 msgfmt:
92 @for l in $(LINGUAS); do \
93 echo "Compiling $$l mo file..."; \
94 mkdir -p po/mo/$$l/LC_MESSAGES; \
95 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
96 done;
98 # Clean source
100 clean:
101 rm -rf po/mo
102 rm -f po/*.mo
103 rm -f po/*.*~
105 help:
106 @echo "make"
107 @echo " install | uninstall - all"
108 @echo " install-cook | uninstall-cook - cook"
109 @echo " install-libcook | uninstall-libcook - libcook"
110 @echo " install-cross | uninstall-cross - cross"
111 @echo " pot | msgmerge | msgfmt | clean - i18n"