2 # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
4 # Locale file makefile for CUPS.
6 # Copyright 2007-2012 by Apple Inc.
7 # Copyright 1993-2007 by Easy Software Products.
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/".
19 OBJS
= checkpo.o po2strings.o strings2po.o translate.o
20 TARGETS
= checkpo po2strings strings2po translate
31 # Make library targets...
45 # Clean all config and object files...
49 $(RM
) $(TARGETS
) $(OBJS
)
53 # Update dependencies (without system header dependencies...)
57 $(CC
) -MM
$(ALL_CFLAGS
) $(OBJS
:.o
=.c
) >Dependencies
61 # Install all targets...
64 install: all install-data install-headers install-libs install-exec
68 # Install data files...
71 install-data
: $(INSTALL_LANGUAGES
)
74 $(INSTALL_DIR
) -m
755 $(LOCALEDIR
)
75 for loc in
$(LANGUAGES
) ; do \
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
; \
82 install-langbundle
: po2strings
83 $(INSTALL_DIR
) -m
755 "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
84 $(INSTALL_DATA
) cups.strings
"$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj"
102 # Install libraries...
112 uninstall: $(UNINSTALL_LANGUAGES
)
115 -for loc in
$(LANGUAGES
) ; do \
116 $(RM
) $(LOCALEDIR
)/$$loc/cups_
$$loc.po
; \
119 uninstall-langbundle
:
120 $(RM
) "$(BUILDROOT)$(BUNDLEDIR)/Resources/English.lproj/cups.strings"
124 # pot - Creates/updates the cups.pot template file, merges changes into existing
125 # message catalogs, and updates the cups.strings file. We don't use
126 # xgettext to update the cups.strings file due to known xgettext bugs.
129 pot
: checkpo po2strings
130 echo Updating cups.pot...
131 mv cups.pot cups.pot.bck
133 cd ..
; xgettext
-o locale
/cups.pot
-cTRANSLATORS
-s \
134 --keyword
=_
--no-wrap \
135 --copyright-holder
="Apple Inc." \
136 --package-name
="CUPS" --package-version
="1.6" \
137 --msgid-bugs-address
="http://www.cups.org/str.php" \
139 (cat cups.header
; tail
+6 cups.pot
; cat cups.footer
) > cups.pot.N
140 mv cups.pot.N cups.pot
141 echo Checking cups.pot...
143 for loc in
*.po
; do \
144 if
test $$loc = '*.po'; then \
147 echo Merging changes into
$$loc...
; \
148 msgmerge
-o
$$loc -s
-N
--no-location
$$loc cups.pot
; \
150 echo Updating cups.strings...
151 .
/po2strings cups.pot cups.strings
155 # checkpo - A simple utility to check PO files for correct translation
156 # strings. Dependency on static library is deliberate.
158 # checkpo filename.po [... filenameN.po]
161 checkpo
: checkpo.o ..
/cups
/$(LIBCUPSSTATIC
)
163 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o checkpo checkpo.o \
164 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
165 $(COMMONLIBS
) $(LIBZ
)
168 for file in
*.po
; do \
174 # po2strings - A simple utility which uses iconv to convert GNU gettext
175 # message catalogs to Mac OS X .strings files.
177 # po2strings filename.po filename.strings
180 po2strings
: po2strings.o ..
/cups
/$(LIBCUPSSTATIC
)
182 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o po2strings po2strings.o \
183 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
184 $(COMMONLIBS
) $(LIBZ
)
188 # strings2po - A simple utility which uses iconv to convert Mac OS X
189 # .strings files to GNU gettext message catalogs.
191 # strings2po filename.strings filename.po
194 strings2po
: strings2po.o
196 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o strings2po strings2po.o
200 # translate - A simple utility which uses Google to translate the cups.pot
201 # file to one of several languages.
203 # translate outfile language
206 translate
: translate.o ..
/cups
/$(LIBCUPSSTATIC
)
208 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o translate translate.o \
209 ..
/cups
/$(LIBCUPSSTATIC
) $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) \
210 $(COMMONLIBS
) $(LIBZ
)
221 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".