]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
75bd9771 | 2 | # "$Id: Makefile 7558 2008-05-12 23:46:44Z 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 | ||
ef416fc2 | 37 | # |
38 | # Clean all config and object files... | |
39 | # | |
40 | ||
41 | clean: | |
bc44d920 | 42 | $(RM) $(TARGETS) $(OBJS) |
ef416fc2 | 43 | |
44 | ||
bd7854cb | 45 | # |
bc44d920 | 46 | # Update dependencies (without system header dependencies...) |
bd7854cb | 47 | # |
48 | ||
49 | depend: | |
bc44d920 | 50 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 |
bd7854cb | 51 | |
52 | ||
ef416fc2 | 53 | # |
50fe7201 | 54 | # Install all targets... |
ef416fc2 | 55 | # |
56 | ||
50fe7201 MS |
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) | |
ed486911 | 65 | |
66 | install-languages: | |
bd7854cb | 67 | $(INSTALL_DIR) -m 755 $(LOCALEDIR) |
4744bd90 | 68 | for loc in $(LANGUAGES) ; do \ |
89d46774 | 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 ; \ | |
ac884b6a | 72 | $(INSTALL_DATA) ppdc_$$loc.po $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \ |
89d46774 | 73 | fi ; \ |
ef416fc2 | 74 | done |
75 | ||
76 | ||
50fe7201 MS |
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 | ||
757d2cad | 98 | # |
99 | # Uninstall files... | |
100 | # | |
101 | ||
ed486911 | 102 | uninstall: $(UNINSTALL_LANGUAGES) |
103 | ||
104 | uninstall-languages: | |
757d2cad | 105 | -for loc in $(LANGUAGES) ; do \ |
106 | $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ | |
ac884b6a | 107 | $(RM) $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \ |
757d2cad | 108 | done |
757d2cad | 109 | |
110 | ||
ef416fc2 | 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... | |
bc44d920 | 118 | mv cups.pot cups.pot.bck |
119 | touch cups.pot | |
c0e1af83 | 120 | cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \ |
121 | --copyright-holder="Easy Software Products" \ | |
ef416fc2 | 122 | --msgid-bugs-address="http://www.cups.org/str.php" \ |
123 | */*.c | |
124 | (cat cups.header; \ | |
bc44d920 | 125 | cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \ |
ef416fc2 | 126 | -e '1,$$s/charset=CHARSET/charset=utf-8/'; \ |
127 | cat cups.footer) > cups.pot.N | |
128 | mv cups.pot.N cups.pot | |
4744bd90 | 129 | for loc in $(LANGUAGES) ; do \ |
ef416fc2 | 130 | echo Merging changes into cups_$$loc.po... ; \ |
355e94dc | 131 | msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \ |
ef416fc2 | 132 | done |
133 | ||
134 | ||
db1f069b MS |
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 | ||
bc44d920 | 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 | ||
ef416fc2 | 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 | ||
bc44d920 | 182 | |
183 | # | |
184 | # Dependencies... | |
185 | # | |
186 | ||
187 | include Dependencies | |
ef416fc2 | 188 | |
189 | ||
190 | # | |
75bd9771 | 191 | # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $". |
ef416fc2 | 192 | # |