]> git.ipfire.org Git - thirdparty/cups.git/blame - locale/Makefile
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / locale / Makefile
CommitLineData
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
16include ../Makedefs
17
ef416fc2 18
7dfedb92 19OBJS = checkpo.o po2strings.o strings2po.o translate.o
db1f069b 20TARGETS = checkpo po2strings strings2po translate
bc44d920 21
22
ef416fc2 23#
24# Make everything...
25#
26
bc44d920 27all: $(TARGETS)
ef416fc2 28
29
c9fc04c6
MS
30#
31# Make library targets...
32#
33
34libs:
35
36
5f64df29
MS
37#
38# Make unit tests...
39#
40
41unittests:
42
43
ef416fc2 44#
45# Clean all config and object files...
46#
47
48clean:
bc44d920 49 $(RM) $(TARGETS) $(OBJS)
ef416fc2 50
51
bd7854cb 52#
bc44d920 53# Update dependencies (without system header dependencies...)
bd7854cb 54#
55
56depend:
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
64install: all install-data install-headers install-libs install-exec
65
66
67#
68# Install data files...
69#
70
71install-data: $(INSTALL_LANGUAGES)
ed486911 72
73install-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 ; \
ac884b6a 79 $(INSTALL_DATA) ppdc_$$loc.po $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \
89d46774 80 fi ; \
ef416fc2 81 done
82
83
50fe7201
MS
84#
85# Install programs...
86#
87
88install-exec:
89
90
91#
92# Install headers...
93#
94
95install-headers:
96
97
98#
99# Install libraries...
100#
101
102install-libs:
103
104
757d2cad 105#
106# Uninstall files...
107#
108
ed486911 109uninstall: $(UNINSTALL_LANGUAGES)
110
111uninstall-languages:
757d2cad 112 -for loc in $(LANGUAGES) ; do \
113 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
ac884b6a 114 $(RM) $(LOCALEDIR)/$$loc/ppdc_$$loc.po ; \
757d2cad 115 done
757d2cad 116
117
ef416fc2 118#
119# pot - Creates/updates the cups.pot template file, and merges changes
120# into existing message catalogs.
121#
122
123pot:
124 echo Updating cups.pot...
bc44d920 125 mv cups.pot cups.pot.bck
126 touch cups.pot
c0e1af83 127 cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \
128 --copyright-holder="Easy Software Products" \
ef416fc2 129 --msgid-bugs-address="http://www.cups.org/str.php" \
130 */*.c
131 (cat cups.header; \
bc44d920 132 cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \
ef416fc2 133 -e '1,$$s/charset=CHARSET/charset=utf-8/'; \
134 cat cups.footer) > cups.pot.N
135 mv cups.pot.N cups.pot
4744bd90 136 for loc in $(LANGUAGES) ; do \
ef416fc2 137 echo Merging changes into cups_$$loc.po... ; \
355e94dc 138 msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \
ef416fc2 139 done
140
141
db1f069b
MS
142#
143# checkpo - A simple utility to check PO files for correct translation
144# strings.
145#
146# checkpo filename.po [... filenameN.po]
147#
148
149checkpo: checkpo.o ../cups/$(LIBCUPS)
150 echo Linking $<...
151 $(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS)
152
153
bc44d920 154#
155# po2strings - A simple utility which uses iconv to convert GNU gettext
156# message catalogs to Mac OS X .strings files.
157#
158# po2strings filename.po filename.strings
159#
160
161po2strings: po2strings.o ../cups/$(LIBCUPS)
162 echo Linking $<...
163 $(CC) $(LDFLAGS) -o po2strings po2strings.o $(LIBS)
164
165
166#
167# strings2po - A simple utility which uses iconv to convert Mac OS X
168# .strings files to GNU gettext message catalogs.
169#
170# strings2po filename.strings filename.po
171#
172
173strings2po: strings2po.o
174 echo Linking $<...
175 $(CC) $(LDFLAGS) -o strings2po strings2po.o
176
177
ef416fc2 178#
179# translate - A simple utility which uses Google to translate the cups.pot
180# file to one of several languages.
181#
182# translate outfile language
183#
184
185translate: translate.o ../cups/$(LIBCUPS)
186 echo Linking $<...
187 $(CC) $(LDFLAGS) -o translate translate.o $(LIBS)
188
bc44d920 189
190#
191# Dependencies...
192#
193
194include Dependencies
ef416fc2 195
196
197#
b19ccc9e 198# End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".
ef416fc2 199#