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