]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f2d18633 | 2 | # "$Id$" |
ef416fc2 | 3 | # |
7e86f2f6 | 4 | # Locale file makefile for CUPS. |
ef416fc2 | 5 | # |
7e86f2f6 MS |
6 | # Copyright 2007-2014 by Apple Inc. |
7 | # Copyright 1993-2007 by Easy Software Products. | |
ef416fc2 | 8 | # |
7e86f2f6 MS |
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/". | |
ef416fc2 | 14 | # |
15 | ||
16 | include ../Makedefs | |
17 | ||
ef416fc2 | 18 | |
7e86f2f6 MS |
19 | OBJS = checkpo.o po2strings.o strings2po.o |
20 | TARGETS = checkpo po2strings strings2po | |
bc44d920 | 21 | |
22 | ||
ef416fc2 | 23 | # |
24 | # Make everything... | |
25 | # | |
26 | ||
bc44d920 | 27 | all: $(TARGETS) |
ef416fc2 | 28 | |
29 | ||
c9fc04c6 MS |
30 | # |
31 | # Make library targets... | |
32 | # | |
33 | ||
34 | libs: | |
35 | ||
36 | ||
5f64df29 MS |
37 | # |
38 | # Make unit tests... | |
39 | # | |
40 | ||
41 | unittests: | |
42 | ||
43 | ||
ef416fc2 | 44 | # |
45 | # Clean all config and object files... | |
46 | # | |
47 | ||
48 | clean: | |
bc44d920 | 49 | $(RM) $(TARGETS) $(OBJS) |
ef416fc2 | 50 | |
51 | ||
bd7854cb | 52 | # |
bc44d920 | 53 | # Update dependencies (without system header dependencies...) |
bd7854cb | 54 | # |
55 | ||
56 | depend: | |
12f89d24 | 57 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
bd7854cb | 58 | |
59 | ||
ef416fc2 | 60 | # |
50fe7201 | 61 | # Install all targets... |
ef416fc2 | 62 | # |
63 | ||
50fe7201 MS |
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) | |
ed486911 | 72 | |
73 | install-languages: | |
bd7854cb | 74 | $(INSTALL_DIR) -m 755 $(LOCALEDIR) |
4744bd90 | 75 | for loc in $(LANGUAGES) ; do \ |
89d46774 | 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 ; \ | |
ef416fc2 | 80 | done |
81 | ||
0837b7e8 | 82 | install-langbundle: po2strings |
c779abb0 MS |
83 | $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj" |
84 | $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj" | |
0837b7e8 | 85 | |
ef416fc2 | 86 | |
50fe7201 MS |
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 | ||
757d2cad | 108 | # |
109 | # Uninstall files... | |
110 | # | |
111 | ||
ed486911 | 112 | uninstall: $(UNINSTALL_LANGUAGES) |
113 | ||
114 | uninstall-languages: | |
757d2cad | 115 | -for loc in $(LANGUAGES) ; do \ |
116 | $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ | |
757d2cad | 117 | done |
757d2cad | 118 | |
0837b7e8 | 119 | uninstall-langbundle: |
c779abb0 | 120 | $(RM) "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj/cups.strings" |
0837b7e8 | 121 | |
757d2cad | 122 | |
ef416fc2 | 123 | # |
0837b7e8 MS |
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. | |
ef416fc2 | 127 | # |
128 | ||
0837b7e8 | 129 | pot: checkpo po2strings |
ef416fc2 | 130 | echo Updating cups.pot... |
bc44d920 | 131 | mv cups.pot cups.pot.bck |
132 | touch cups.pot | |
84315f46 | 133 | cd ..; xgettext -o locale/cups.pot -cTRANSLATORS -s \ |
0837b7e8 | 134 | --keyword=_ --no-wrap \ |
61cf44e2 | 135 | --copyright-holder="Apple Inc." \ |
bb0d23b2 | 136 | --package-name="CUPS" --package-version="1.6" \ |
ef416fc2 | 137 | --msgid-bugs-address="http://www.cups.org/str.php" \ |
61cf44e2 | 138 | */*.c */*.cxx |
0837b7e8 | 139 | (cat cups.header; tail +6 cups.pot; cat cups.footer) > cups.pot.N |
ef416fc2 | 140 | mv cups.pot.N cups.pot |
0837b7e8 MS |
141 | echo Checking cups.pot... |
142 | ./checkpo cups.pot | |
dcb445bc | 143 | for loc in *.po ; do \ |
bb0d23b2 MS |
144 | if test $$loc = '*.po'; then \ |
145 | break; \ | |
146 | fi; \ | |
dcb445bc MS |
147 | echo Merging changes into $$loc... ; \ |
148 | msgmerge -o $$loc -s -N --no-location $$loc cups.pot ; \ | |
ef416fc2 | 149 | done |
0837b7e8 MS |
150 | echo Updating cups.strings... |
151 | ./po2strings cups.pot cups.strings | |
ef416fc2 | 152 | |
153 | ||
db1f069b MS |
154 | # |
155 | # checkpo - A simple utility to check PO files for correct translation | |
8b116e60 | 156 | # strings. Dependency on static library is deliberate. |
db1f069b MS |
157 | # |
158 | # checkpo filename.po [... filenameN.po] | |
159 | # | |
160 | ||
6d2f911b | 161 | checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC) |
db1f069b | 162 | echo Linking $<... |
229681c1 MS |
163 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o checkpo checkpo.o \ |
164 | ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | |
165 | $(COMMONLIBS) $(LIBZ) | |
db1f069b | 166 | |
f0ab5bff MS |
167 | checkall: checkpo |
168 | for file in *.po; do \ | |
169 | ./checkpo $$file; \ | |
170 | done | |
171 | ||
db1f069b | 172 | |
bc44d920 | 173 | # |
174 | # po2strings - A simple utility which uses iconv to convert GNU gettext | |
f3c17241 | 175 | # message catalogs to OS X .strings files. |
bc44d920 | 176 | # |
177 | # po2strings filename.po filename.strings | |
178 | # | |
179 | ||
6d2f911b | 180 | po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC) |
bc44d920 | 181 | echo Linking $<... |
229681c1 MS |
182 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o po2strings po2strings.o \ |
183 | ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | |
184 | $(COMMONLIBS) $(LIBZ) | |
bc44d920 | 185 | |
186 | ||
187 | # | |
f3c17241 MS |
188 | # strings2po - A simple utility which uses iconv to convert OS X .strings files |
189 | # to GNU gettext message catalogs. | |
bc44d920 | 190 | # |
191 | # strings2po filename.strings filename.po | |
192 | # | |
193 | ||
194 | strings2po: strings2po.o | |
195 | echo Linking $<... | |
229681c1 | 196 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o strings2po strings2po.o |
bc44d920 | 197 | |
198 | ||
bc44d920 | 199 | # |
200 | # Dependencies... | |
201 | # | |
321d8d57 | 202 | |
bc44d920 | 203 | include Dependencies |
ef416fc2 | 204 | |
205 | ||
206 | # | |
f2d18633 | 207 | # End of "$Id$". |
ef416fc2 | 208 | # |