]> git.ipfire.org Git - thirdparty/cups.git/blob - locale/Makefile
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / locale / Makefile
1 #
2 # Locale file makefile for CUPS.
3 #
4 # Copyright 2007-2014 by Apple Inc.
5 # Copyright 1993-2007 by Easy Software Products.
6 #
7 # These coded instructions, statements, and computer programs are the
8 # property of Apple Inc. and are protected by Federal copyright
9 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 # which should have been included with this file. If this file is
11 # file is missing or damaged, see the license at "http://www.cups.org/".
12 #
13
14 include ../Makedefs
15
16
17 OBJS = checkpo.o po2strings.o strings2po.o
18 TARGETS = checkpo po2strings strings2po
19
20
21 #
22 # Make everything...
23 #
24
25 all: $(TARGETS)
26
27
28 #
29 # Make library targets...
30 #
31
32 libs:
33
34
35 #
36 # Make unit tests...
37 #
38
39 unittests:
40
41
42 #
43 # Clean all config and object files...
44 #
45
46 clean:
47 $(RM) $(TARGETS) $(OBJS)
48
49
50 #
51 # Update dependencies (without system header dependencies...)
52 #
53
54 depend:
55 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
56
57
58 #
59 # Install all targets...
60 #
61
62 install: all install-data install-headers install-libs install-exec
63
64
65 #
66 # Install data files...
67 #
68
69 install-data: $(INSTALL_LANGUAGES)
70
71 install-languages:
72 $(INSTALL_DIR) -m 755 $(LOCALEDIR)
73 for loc in $(LANGUAGES) ; do \
74 if test -f cups_$$loc.po; then \
75 $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
76 $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
77 fi ; \
78 done
79
80 install-langbundle: po2strings
81 $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
82 $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
83
84
85 #
86 # Install programs...
87 #
88
89 install-exec:
90
91
92 #
93 # Install headers...
94 #
95
96 install-headers:
97
98
99 #
100 # Install libraries...
101 #
102
103 install-libs:
104
105
106 #
107 # Uninstall files...
108 #
109
110 uninstall: $(UNINSTALL_LANGUAGES)
111
112 uninstall-languages:
113 -for loc in $(LANGUAGES) ; do \
114 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
115 done
116
117 uninstall-langbundle:
118 $(RM) "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj/cups.strings"
119
120
121 #
122 # pot - Creates/updates the cups.pot template file, merges changes into existing
123 # message catalogs, and updates the cups.strings file. We don't use
124 # xgettext to update the cups.strings file due to known xgettext bugs.
125 #
126
127 pot: checkpo po2strings
128 echo Updating cups.pot...
129 mv cups.pot cups.pot.bck
130 touch cups.pot
131 cd ..; xgettext -o locale/cups.pot -cTRANSLATORS -s \
132 --keyword=_ --no-wrap \
133 --copyright-holder="Apple Inc." \
134 --package-name="CUPS" --package-version="1.6" \
135 --msgid-bugs-address="http://www.cups.org/str.php" \
136 */*.c */*.cxx
137 (cat cups.header; tail +6 cups.pot; cat cups.footer) > cups.pot.N
138 mv cups.pot.N cups.pot
139 echo Checking cups.pot...
140 ./checkpo cups.pot
141 for loc in *.po ; do \
142 if test $$loc = '*.po'; then \
143 break; \
144 fi; \
145 echo Merging changes into $$loc... ; \
146 msgmerge -o $$loc -s -N --no-location $$loc cups.pot ; \
147 done
148 echo Updating cups.strings...
149 ./po2strings cups.pot cups.strings
150
151
152 #
153 # checkpo - A simple utility to check PO files for correct translation
154 # strings. Dependency on static library is deliberate.
155 #
156 # checkpo filename.po [... filenameN.po]
157 #
158
159 checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
160 echo Linking $@...
161 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o checkpo checkpo.o \
162 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
163 $(COMMONLIBS) $(LIBZ)
164
165 checkall: checkpo
166 for file in *.po; do \
167 ./checkpo $$file; \
168 done
169
170
171 #
172 # po2strings - A simple utility which uses iconv to convert GNU gettext
173 # message catalogs to OS X .strings files.
174 #
175 # po2strings filename.po filename.strings
176 #
177
178 po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
179 echo Linking $@...
180 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o po2strings po2strings.o \
181 ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
182 $(COMMONLIBS) $(LIBZ)
183
184
185 #
186 # strings2po - A simple utility which uses iconv to convert OS X .strings files
187 # to GNU gettext message catalogs.
188 #
189 # strings2po filename.strings filename.po
190 #
191
192 strings2po: strings2po.o
193 echo Linking $@...
194 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o strings2po strings2po.o
195
196
197 #
198 # Dependencies...
199 #
200
201 include Dependencies