]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
2e4ff8af | 2 | # "$Id: Makefile 6993 2007-09-28 18:05:28Z 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 | ||
30 | # | |
31 | # Clean all config and object files... | |
32 | # | |
33 | ||
34 | clean: | |
bc44d920 | 35 | $(RM) $(TARGETS) $(OBJS) |
ef416fc2 | 36 | |
37 | ||
bd7854cb | 38 | # |
bc44d920 | 39 | # Update dependencies (without system header dependencies...) |
bd7854cb | 40 | # |
41 | ||
42 | depend: | |
bc44d920 | 43 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 |
bd7854cb | 44 | |
45 | ||
ef416fc2 | 46 | # |
50fe7201 | 47 | # Install all targets... |
ef416fc2 | 48 | # |
49 | ||
50fe7201 MS |
50 | install: all install-data install-headers install-libs install-exec |
51 | ||
52 | ||
53 | # | |
54 | # Install data files... | |
55 | # | |
56 | ||
57 | install-data: $(INSTALL_LANGUAGES) | |
ed486911 | 58 | |
59 | install-languages: | |
bd7854cb | 60 | $(INSTALL_DIR) -m 755 $(LOCALEDIR) |
4744bd90 | 61 | for loc in $(LANGUAGES) ; do \ |
89d46774 | 62 | if test -f cups_$$loc.po; then \ |
63 | $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \ | |
64 | $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ | |
ac884b6a | 65 | $(INSTALL_DATA) ppdc_$$loc.po $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \ |
89d46774 | 66 | fi ; \ |
ef416fc2 | 67 | done |
68 | ||
69 | ||
50fe7201 MS |
70 | # |
71 | # Install programs... | |
72 | # | |
73 | ||
74 | install-exec: | |
75 | ||
76 | ||
77 | # | |
78 | # Install headers... | |
79 | # | |
80 | ||
81 | install-headers: | |
82 | ||
83 | ||
84 | # | |
85 | # Install libraries... | |
86 | # | |
87 | ||
88 | install-libs: | |
89 | ||
90 | ||
757d2cad | 91 | # |
92 | # Uninstall files... | |
93 | # | |
94 | ||
ed486911 | 95 | uninstall: $(UNINSTALL_LANGUAGES) |
96 | ||
97 | uninstall-languages: | |
757d2cad | 98 | -for loc in $(LANGUAGES) ; do \ |
99 | $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ | |
ac884b6a | 100 | $(RM) $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \ |
757d2cad | 101 | done |
757d2cad | 102 | |
103 | ||
ef416fc2 | 104 | # |
105 | # pot - Creates/updates the cups.pot template file, and merges changes | |
106 | # into existing message catalogs. | |
107 | # | |
108 | ||
109 | pot: | |
110 | echo Updating cups.pot... | |
bc44d920 | 111 | mv cups.pot cups.pot.bck |
112 | touch cups.pot | |
c0e1af83 | 113 | cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \ |
114 | --copyright-holder="Easy Software Products" \ | |
ef416fc2 | 115 | --msgid-bugs-address="http://www.cups.org/str.php" \ |
116 | */*.c | |
117 | (cat cups.header; \ | |
bc44d920 | 118 | cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \ |
ef416fc2 | 119 | -e '1,$$s/charset=CHARSET/charset=utf-8/'; \ |
120 | cat cups.footer) > cups.pot.N | |
121 | mv cups.pot.N cups.pot | |
4744bd90 | 122 | for loc in $(LANGUAGES) ; do \ |
ef416fc2 | 123 | echo Merging changes into cups_$$loc.po... ; \ |
355e94dc | 124 | msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \ |
ef416fc2 | 125 | done |
126 | ||
127 | ||
db1f069b MS |
128 | # |
129 | # checkpo - A simple utility to check PO files for correct translation | |
130 | # strings. | |
131 | # | |
132 | # checkpo filename.po [... filenameN.po] | |
133 | # | |
134 | ||
135 | checkpo: checkpo.o ../cups/$(LIBCUPS) | |
136 | echo Linking $<... | |
137 | $(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS) | |
138 | ||
139 | ||
bc44d920 | 140 | # |
141 | # po2strings - A simple utility which uses iconv to convert GNU gettext | |
142 | # message catalogs to Mac OS X .strings files. | |
143 | # | |
144 | # po2strings filename.po filename.strings | |
145 | # | |
146 | ||
147 | po2strings: po2strings.o ../cups/$(LIBCUPS) | |
148 | echo Linking $<... | |
149 | $(CC) $(LDFLAGS) -o po2strings po2strings.o $(LIBS) | |
150 | ||
151 | ||
152 | # | |
153 | # strings2po - A simple utility which uses iconv to convert Mac OS X | |
154 | # .strings files to GNU gettext message catalogs. | |
155 | # | |
156 | # strings2po filename.strings filename.po | |
157 | # | |
158 | ||
159 | strings2po: strings2po.o | |
160 | echo Linking $<... | |
161 | $(CC) $(LDFLAGS) -o strings2po strings2po.o | |
162 | ||
163 | ||
ef416fc2 | 164 | # |
165 | # translate - A simple utility which uses Google to translate the cups.pot | |
166 | # file to one of several languages. | |
167 | # | |
168 | # translate outfile language | |
169 | # | |
170 | ||
171 | translate: translate.o ../cups/$(LIBCUPS) | |
172 | echo Linking $<... | |
173 | $(CC) $(LDFLAGS) -o translate translate.o $(LIBS) | |
174 | ||
bc44d920 | 175 | |
176 | # | |
177 | # Dependencies... | |
178 | # | |
179 | ||
180 | include Dependencies | |
ef416fc2 | 181 | |
182 | ||
183 | # | |
2e4ff8af | 184 | # End of "$Id: Makefile 6993 2007-09-28 18:05:28Z mike $". |
ef416fc2 | 185 | # |