]> git.ipfire.org Git - thirdparty/cups.git/blob - locale/Makefile
Merge changes from CUPS 1.5svn-r9105.
[thirdparty/cups.git] / locale / Makefile
1 #
2 # "$Id: Makefile 7871 2008-08-27 21:12:43Z 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 # 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 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
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
83 #
84 # Install programs...
85 #
86
87 install-exec:
88
89
90 #
91 # Install headers...
92 #
93
94 install-headers:
95
96
97 #
98 # Install libraries...
99 #
100
101 install-libs:
102
103
104 #
105 # Uninstall files...
106 #
107
108 uninstall: $(UNINSTALL_LANGUAGES)
109
110 uninstall-languages:
111 -for loc in $(LANGUAGES) ; do \
112 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
113 done
114
115
116 #
117 # pot - Creates/updates the cups.pot template file, and merges changes
118 # into existing message catalogs.
119 #
120
121 pot:
122 echo Updating cups.pot...
123 mv cups.pot cups.pot.bck
124 touch cups.pot
125 cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \
126 --copyright-holder="Apple Inc." \
127 --msgid-bugs-address="http://www.cups.org/str.php" \
128 */*.c */*.cxx
129 (cat cups.header; \
130 cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.4/' \
131 -e '1,$$s/charset=CHARSET/charset=utf-8/'; \
132 cat cups.footer) > cups.pot.N
133 mv cups.pot.N cups.pot
134 for loc in $(LANGUAGES) ; do \
135 echo Merging changes into cups_$$loc.po... ; \
136 msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \
137 done
138
139
140 #
141 # checkpo - A simple utility to check PO files for correct translation
142 # strings. Dependency on static library is deliberate.
143 #
144 # checkpo filename.po [... filenameN.po]
145 #
146
147 checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
148 echo Linking $<...
149 $(CC) $(LDFLAGS) -o checkpo checkpo.o ../cups/$(LIBCUPSSTATIC) \
150 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
151
152 checkall: checkpo
153 for file in *.po; do \
154 ./checkpo $$file; \
155 done
156
157
158 #
159 # po2strings - A simple utility which uses iconv to convert GNU gettext
160 # message catalogs to Mac OS X .strings files.
161 #
162 # po2strings filename.po filename.strings
163 #
164
165 po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
166 echo Linking $<...
167 $(CC) $(LDFLAGS) -o po2strings po2strings.o ../cups/$(LIBCUPSSTATIC) \
168 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
169
170
171 #
172 # strings2po - A simple utility which uses iconv to convert Mac OS X
173 # .strings files to GNU gettext message catalogs.
174 #
175 # strings2po filename.strings filename.po
176 #
177
178 strings2po: strings2po.o
179 echo Linking $<...
180 $(CC) $(LDFLAGS) -o strings2po strings2po.o
181
182
183 #
184 # translate - A simple utility which uses Google to translate the cups.pot
185 # file to one of several languages.
186 #
187 # translate outfile language
188 #
189
190 translate: translate.o ../cups/$(LIBCUPSSTATIC)
191 echo Linking $<...
192 $(CC) $(LDFLAGS) -o translate translate.o ../cups/$(LIBCUPSSTATIC) \
193 $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
194
195
196 #
197 # Dependencies...
198 #
199
200 include Dependencies
201
202
203 #
204 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
205 #