]> git.ipfire.org Git - thirdparty/cups.git/blob - locale/Makefile
04656a59c5463dd3c31efaf8f3021a503ef23a46
[thirdparty/cups.git] / locale / Makefile
1 #
2 # "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $"
3 #
4 # Locale file makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007-2008 by Apple Inc.
7 # Copyright 1993-2007 by Easy Software Products.
8 #
9 # These coded instructions, statements, and computer programs are the
10 # property of Apple Inc. and are protected by Federal copyright
11 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 # which should have been included with this file. If this file is
13 # file is missing or damaged, see the license at "http://www.cups.org/".
14 #
15
16 include ../Makedefs
17
18
19 OBJS = checkpo.o po2strings.o strings2po.o translate.o
20 TARGETS = checkpo po2strings strings2po translate
21
22
23 #
24 # Make everything...
25 #
26
27 all: $(TARGETS)
28
29
30 #
31 # Make library targets...
32 #
33
34 libs:
35
36
37 #
38 # Clean all config and object files...
39 #
40
41 clean:
42 $(RM) $(TARGETS) $(OBJS)
43
44
45 #
46 # Update dependencies (without system header dependencies...)
47 #
48
49 depend:
50 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
51
52
53 #
54 # Install all targets...
55 #
56
57 install: all install-data install-headers install-libs install-exec
58
59
60 #
61 # Install data files...
62 #
63
64 install-data: $(INSTALL_LANGUAGES)
65
66 install-languages:
67 $(INSTALL_DIR) -m 755 $(LOCALEDIR)
68 for loc in $(LANGUAGES) ; do \
69 if test -f cups_$$loc.po; then \
70 $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
71 $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
72 $(INSTALL_DATA) ppdc_$$loc.po $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \
73 fi ; \
74 done
75
76
77 #
78 # Install programs...
79 #
80
81 install-exec:
82
83
84 #
85 # Install headers...
86 #
87
88 install-headers:
89
90
91 #
92 # Install libraries...
93 #
94
95 install-libs:
96
97
98 #
99 # Uninstall files...
100 #
101
102 uninstall: $(UNINSTALL_LANGUAGES)
103
104 uninstall-languages:
105 -for loc in $(LANGUAGES) ; do \
106 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
107 $(RM) $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \
108 done
109
110
111 #
112 # pot - Creates/updates the cups.pot template file, and merges changes
113 # into existing message catalogs.
114 #
115
116 pot:
117 echo Updating cups.pot...
118 mv cups.pot cups.pot.bck
119 touch cups.pot
120 cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \
121 --copyright-holder="Easy Software Products" \
122 --msgid-bugs-address="http://www.cups.org/str.php" \
123 */*.c
124 (cat cups.header; \
125 cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \
126 -e '1,$$s/charset=CHARSET/charset=utf-8/'; \
127 cat cups.footer) > cups.pot.N
128 mv cups.pot.N cups.pot
129 for loc in $(LANGUAGES) ; do \
130 echo Merging changes into cups_$$loc.po... ; \
131 msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \
132 done
133
134
135 #
136 # checkpo - A simple utility to check PO files for correct translation
137 # strings.
138 #
139 # checkpo filename.po [... filenameN.po]
140 #
141
142 checkpo: checkpo.o ../cups/$(LIBCUPS)
143 echo Linking $<...
144 $(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS)
145
146
147 #
148 # po2strings - A simple utility which uses iconv to convert GNU gettext
149 # message catalogs to Mac OS X .strings files.
150 #
151 # po2strings filename.po filename.strings
152 #
153
154 po2strings: po2strings.o ../cups/$(LIBCUPS)
155 echo Linking $<...
156 $(CC) $(LDFLAGS) -o po2strings po2strings.o $(LIBS)
157
158
159 #
160 # strings2po - A simple utility which uses iconv to convert Mac OS X
161 # .strings files to GNU gettext message catalogs.
162 #
163 # strings2po filename.strings filename.po
164 #
165
166 strings2po: strings2po.o
167 echo Linking $<...
168 $(CC) $(LDFLAGS) -o strings2po strings2po.o
169
170
171 #
172 # translate - A simple utility which uses Google to translate the cups.pot
173 # file to one of several languages.
174 #
175 # translate outfile language
176 #
177
178 translate: translate.o ../cups/$(LIBCUPS)
179 echo Linking $<...
180 $(CC) $(LDFLAGS) -o translate translate.o $(LIBS)
181
182
183 #
184 # Dependencies...
185 #
186
187 include Dependencies
188
189
190 #
191 # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $".
192 #