]> git.ipfire.org Git - thirdparty/cups.git/blob - locale/Makefile
Merge changes from CUPS 1.6svn-r10267.
[thirdparty/cups.git] / locale / Makefile
1 #
2 # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
3 #
4 # Locale file makefile for CUPS.
5 #
6 # Copyright 2007-2012 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 # Make unit tests...
39 #
40
41 unittests:
42
43
44 #
45 # Clean all config and object files...
46 #
47
48 clean:
49 $(RM) $(TARGETS) $(OBJS)
50
51
52 #
53 # Update dependencies (without system header dependencies...)
54 #
55
56 depend:
57 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
58
59
60 #
61 # Install all targets...
62 #
63
64 install: all install-data install-headers install-libs install-exec
65
66
67 #
68 # Install data files...
69 #
70
71 install-data: $(INSTALL_LANGUAGES)
72
73 install-languages:
74 $(INSTALL_DIR) -m 755 $(LOCALEDIR)
75 for loc in $(LANGUAGES) ; do \
76 if test -f cups_$$loc.po; then \
77 $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
78 $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
79 fi ; \
80 done
81
82 install-langbundle: po2strings
83 $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
84 $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
85
86
87 #
88 # Install programs...
89 #
90
91 install-exec:
92
93
94 #
95 # Install headers...
96 #
97
98 install-headers:
99
100
101 #
102 # Install libraries...
103 #
104
105 install-libs:
106
107
108 #
109 # Uninstall files...
110 #
111
112 uninstall: $(UNINSTALL_LANGUAGES)
113
114 uninstall-languages:
115 -for loc in $(LANGUAGES) ; do \
116 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
117 done
118
119 uninstall-langbundle:
120 $(RM) "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj/cups.strings"
121
122
123 #
124 # pot - Creates/updates the cups.pot template file, merges changes into existing
125 # message catalogs, and updates the cups.strings file. We don't use
126 # xgettext to update the cups.strings file due to known xgettext bugs.
127 #
128
129 pot: checkpo po2strings
130 echo Updating cups.pot...
131 mv cups.pot cups.pot.bck
132 touch cups.pot
133 cd ..; xgettext -o locale/cups.pot -cTRANSLATORS -s \
134 --keyword=_ --no-wrap \
135 --copyright-holder="Apple Inc." \
136 --package-name="CUPS" --package-version="1.5" \
137 --msgid-bugs-address="http://www.cups.org/str.php" \
138 */*.c */*.cxx
139 (cat cups.header; tail +6 cups.pot; cat cups.footer) > cups.pot.N
140 mv cups.pot.N cups.pot
141 echo Checking cups.pot...
142 ./checkpo cups.pot
143 for loc in *.po ; do \
144 echo Merging changes into $$loc... ; \
145 msgmerge -o $$loc -s -N --no-location $$loc cups.pot ; \
146 done
147 echo Updating cups.strings...
148 ./po2strings cups.pot cups.strings
149
150
151 #
152 # checkpo - A simple utility to check PO files for correct translation
153 # strings. Dependency on static library is deliberate.
154 #
155 # checkpo filename.po [... filenameN.po]
156 #
157
158 checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
159 echo Linking $<...
160 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o checkpo checkpo.o \
161 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
162 $(COMMONLIBS) $(LIBZ)
163
164 checkall: checkpo
165 for file in *.po; do \
166 ./checkpo $$file; \
167 done
168
169
170 #
171 # po2strings - A simple utility which uses iconv to convert GNU gettext
172 # message catalogs to Mac OS X .strings files.
173 #
174 # po2strings filename.po filename.strings
175 #
176
177 po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
178 echo Linking $<...
179 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o po2strings po2strings.o \
180 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
181 $(COMMONLIBS) $(LIBZ)
182
183
184 #
185 # strings2po - A simple utility which uses iconv to convert Mac OS X
186 # .strings files to GNU gettext message catalogs.
187 #
188 # strings2po filename.strings filename.po
189 #
190
191 strings2po: strings2po.o
192 echo Linking $<...
193 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o strings2po strings2po.o
194
195
196 #
197 # translate - A simple utility which uses Google to translate the cups.pot
198 # file to one of several languages.
199 #
200 # translate outfile language
201 #
202
203 translate: translate.o ../cups/$(LIBCUPSSTATIC)
204 echo Linking $<...
205 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o translate translate.o \
206 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
207 $(COMMONLIBS) $(LIBZ)
208
209
210 #
211 # Dependencies...
212 #
213
214 include Dependencies
215
216
217 #
218 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
219 #