]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b19ccc9e | 2 | # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $" |
ef416fc2 | 3 | # |
4 | # Locale file makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
ac884b6a | 6 | # Copyright 2007-2008 by Apple Inc. |
c0e1af83 | 7 | # Copyright 1993-2007 by Easy Software Products. |
ef416fc2 | 8 | # |
9 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 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 | |
7dfedb92 | 19 | OBJS = checkpo.o po2strings.o strings2po.o translate.o |
db1f069b | 20 | TARGETS = checkpo po2strings strings2po translate |
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: | |
bc44d920 | 57 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 |
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 | ||
82 | ||
50fe7201 MS |
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 | ||
757d2cad | 104 | # |
105 | # Uninstall files... | |
106 | # | |
107 | ||
ed486911 | 108 | uninstall: $(UNINSTALL_LANGUAGES) |
109 | ||
110 | uninstall-languages: | |
757d2cad | 111 | -for loc in $(LANGUAGES) ; do \ |
112 | $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ | |
757d2cad | 113 | done |
757d2cad | 114 | |
115 | ||
ef416fc2 | 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... | |
bc44d920 | 123 | mv cups.pot cups.pot.bck |
124 | touch cups.pot | |
c0e1af83 | 125 | cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \ |
61cf44e2 | 126 | --copyright-holder="Apple Inc." \ |
ef416fc2 | 127 | --msgid-bugs-address="http://www.cups.org/str.php" \ |
61cf44e2 | 128 | */*.c */*.cxx |
ef416fc2 | 129 | (cat cups.header; \ |
61cf44e2 | 130 | cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.4/' \ |
ef416fc2 | 131 | -e '1,$$s/charset=CHARSET/charset=utf-8/'; \ |
132 | cat cups.footer) > cups.pot.N | |
133 | mv cups.pot.N cups.pot | |
4744bd90 | 134 | for loc in $(LANGUAGES) ; do \ |
ef416fc2 | 135 | echo Merging changes into cups_$$loc.po... ; \ |
355e94dc | 136 | msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \ |
ef416fc2 | 137 | done |
138 | ||
139 | ||
db1f069b MS |
140 | # |
141 | # checkpo - A simple utility to check PO files for correct translation | |
142 | # strings. | |
143 | # | |
144 | # checkpo filename.po [... filenameN.po] | |
145 | # | |
146 | ||
147 | checkpo: checkpo.o ../cups/$(LIBCUPS) | |
148 | echo Linking $<... | |
149 | $(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS) | |
150 | ||
f0ab5bff MS |
151 | checkall: checkpo |
152 | for file in *.po; do \ | |
153 | ./checkpo $$file; \ | |
154 | done | |
155 | ||
db1f069b | 156 | |
bc44d920 | 157 | # |
158 | # po2strings - A simple utility which uses iconv to convert GNU gettext | |
159 | # message catalogs to Mac OS X .strings files. | |
160 | # | |
161 | # po2strings filename.po filename.strings | |
162 | # | |
163 | ||
164 | po2strings: po2strings.o ../cups/$(LIBCUPS) | |
165 | echo Linking $<... | |
166 | $(CC) $(LDFLAGS) -o po2strings po2strings.o $(LIBS) | |
167 | ||
168 | ||
169 | # | |
170 | # strings2po - A simple utility which uses iconv to convert Mac OS X | |
171 | # .strings files to GNU gettext message catalogs. | |
172 | # | |
173 | # strings2po filename.strings filename.po | |
174 | # | |
175 | ||
176 | strings2po: strings2po.o | |
177 | echo Linking $<... | |
178 | $(CC) $(LDFLAGS) -o strings2po strings2po.o | |
179 | ||
180 | ||
ef416fc2 | 181 | # |
182 | # translate - A simple utility which uses Google to translate the cups.pot | |
183 | # file to one of several languages. | |
184 | # | |
185 | # translate outfile language | |
186 | # | |
187 | ||
188 | translate: translate.o ../cups/$(LIBCUPS) | |
189 | echo Linking $<... | |
190 | $(CC) $(LDFLAGS) -o translate translate.o $(LIBS) | |
191 | ||
bc44d920 | 192 | |
193 | # | |
194 | # Dependencies... | |
195 | # | |
196 | ||
197 | include Dependencies | |
ef416fc2 | 198 | |
199 | ||
200 | # | |
b19ccc9e | 201 | # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $". |
ef416fc2 | 202 | # |