]> git.ipfire.org Git - thirdparty/cups.git/blame - locale/Makefile
Merge changes from CUPS 1.3.1.
[thirdparty/cups.git] / locale / Makefile
CommitLineData
ef416fc2 1#
db1f069b 2# "$Id: Makefile 6926 2007-09-06 14:34:31Z mike $"
ef416fc2 3#
4# Locale file makefile for the Common UNIX Printing System (CUPS).
5#
bc44d920 6# Copyright 2007 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
db1f069b
MS
19OBJS = checkpo po2strings.o strings2po.o translate.o
20TARGETS = checkpo po2strings strings2po translate
bc44d920 21
22
ef416fc2 23#
24# Make everything...
25#
26
bc44d920 27all: $(TARGETS)
ef416fc2 28
29
30#
31# Clean all config and object files...
32#
33
34clean:
bc44d920 35 $(RM) $(TARGETS) $(OBJS)
ef416fc2 36
37
bd7854cb 38#
bc44d920 39# Update dependencies (without system header dependencies...)
bd7854cb 40#
41
42depend:
bc44d920 43 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
bd7854cb 44
45
ef416fc2 46#
47# Install files...
48#
49
ed486911 50install: all $(INSTALL_LANGUAGES)
51
52install-languages:
bd7854cb 53 $(INSTALL_DIR) -m 755 $(LOCALEDIR)
4744bd90 54 for loc in $(LANGUAGES) ; do \
89d46774 55 if test -f cups_$$loc.po; then \
56 $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
57 $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
58 fi ; \
ef416fc2 59 done
60
61
757d2cad 62#
63# Uninstall files...
64#
65
ed486911 66uninstall: $(UNINSTALL_LANGUAGES)
67
68uninstall-languages:
757d2cad 69 -for loc in $(LANGUAGES) ; do \
70 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
757d2cad 71 done
757d2cad 72
73
ef416fc2 74#
75# pot - Creates/updates the cups.pot template file, and merges changes
76# into existing message catalogs.
77#
78
79pot:
80 echo Updating cups.pot...
bc44d920 81 mv cups.pot cups.pot.bck
82 touch cups.pot
c0e1af83 83 cd ..; xgettext -o locale/cups.pot -j -s --keyword=_ --no-wrap \
84 --copyright-holder="Easy Software Products" \
ef416fc2 85 --msgid-bugs-address="http://www.cups.org/str.php" \
86 */*.c
87 (cat cups.header; \
bc44d920 88 cat cups.pot | sed -e '1,6d' -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \
ef416fc2 89 -e '1,$$s/charset=CHARSET/charset=utf-8/'; \
90 cat cups.footer) > cups.pot.N
91 mv cups.pot.N cups.pot
4744bd90 92 for loc in $(LANGUAGES) ; do \
ef416fc2 93 echo Merging changes into cups_$$loc.po... ; \
355e94dc 94 msgmerge -o cups_$$loc.po -s -N --no-location cups_$$loc.po cups.pot ; \
ef416fc2 95 done
96
97
db1f069b
MS
98#
99# checkpo - A simple utility to check PO files for correct translation
100# strings.
101#
102# checkpo filename.po [... filenameN.po]
103#
104
105checkpo: checkpo.o ../cups/$(LIBCUPS)
106 echo Linking $<...
107 $(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS)
108
109
bc44d920 110#
111# po2strings - A simple utility which uses iconv to convert GNU gettext
112# message catalogs to Mac OS X .strings files.
113#
114# po2strings filename.po filename.strings
115#
116
117po2strings: po2strings.o ../cups/$(LIBCUPS)
118 echo Linking $<...
119 $(CC) $(LDFLAGS) -o po2strings po2strings.o $(LIBS)
120
121
122#
123# strings2po - A simple utility which uses iconv to convert Mac OS X
124# .strings files to GNU gettext message catalogs.
125#
126# strings2po filename.strings filename.po
127#
128
129strings2po: strings2po.o
130 echo Linking $<...
131 $(CC) $(LDFLAGS) -o strings2po strings2po.o
132
133
ef416fc2 134#
135# translate - A simple utility which uses Google to translate the cups.pot
136# file to one of several languages.
137#
138# translate outfile language
139#
140
141translate: translate.o ../cups/$(LIBCUPS)
142 echo Linking $<...
143 $(CC) $(LDFLAGS) -o translate translate.o $(LIBS)
144
bc44d920 145
146#
147# Dependencies...
148#
149
150include Dependencies
ef416fc2 151
152
153#
db1f069b 154# End of "$Id: Makefile 6926 2007-09-06 14:34:31Z mike $".
ef416fc2 155#