2 # "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $"
4 # Locale file makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007-2008 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 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
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
; \
79 $(INSTALL_DATA
) ppdc_
$$loc.po
$(LOCALEDIR
)/$$loc/ppdc_
$$loc.po
; \
99 # Install libraries...
109 uninstall: $(UNINSTALL_LANGUAGES
)
112 -for loc in
$(LANGUAGES
) ; do \
113 $(RM
) $(LOCALEDIR
)/$$loc/cups_
$$loc.po
; \
114 $(RM
) $(LOCALEDIR
)/$$loc/ppdc_
$$loc.po
; \
119 # pot - Creates/updates the cups.pot template file, and merges changes
120 # into existing message catalogs.
124 echo Updating cups.pot...
125 mv cups.pot cups.pot.bck
127 cd ..
; xgettext
-o locale
/cups.pot
-j
-s
--keyword
=_
--no-wrap \
128 --copyright-holder
="Easy Software Products" \
129 --msgid-bugs-address
="http://www.cups.org/str.php" \
132 cat cups.pot | sed
-e
'1,6d' -e
'1,$$s/PACKAGE VERSION/CUPS 1.3/' \
133 -e
'1,$$s/charset=CHARSET/charset=utf-8/'; \
134 cat cups.footer
) > cups.pot.N
135 mv cups.pot.N cups.pot
136 for loc in
$(LANGUAGES
) ; do \
137 echo Merging changes into cups_
$$loc.po...
; \
138 msgmerge
-o cups_
$$loc.po
-s
-N
--no-location cups_
$$loc.po cups.pot
; \
143 # checkpo - A simple utility to check PO files for correct translation
146 # checkpo filename.po [... filenameN.po]
149 checkpo
: checkpo.o ..
/cups
/$(LIBCUPS
)
151 $(CC
) $(LDFLAGS
) -o checkpo checkpo.o
$(LIBS
)
155 # po2strings - A simple utility which uses iconv to convert GNU gettext
156 # message catalogs to Mac OS X .strings files.
158 # po2strings filename.po filename.strings
161 po2strings
: po2strings.o ..
/cups
/$(LIBCUPS
)
163 $(CC
) $(LDFLAGS
) -o po2strings po2strings.o
$(LIBS
)
167 # strings2po - A simple utility which uses iconv to convert Mac OS X
168 # .strings files to GNU gettext message catalogs.
170 # strings2po filename.strings filename.po
173 strings2po
: strings2po.o
175 $(CC
) $(LDFLAGS
) -o strings2po strings2po.o
179 # translate - A simple utility which uses Google to translate the cups.pot
180 # file to one of several languages.
182 # translate outfile language
185 translate
: translate.o ..
/cups
/$(LIBCUPS
)
187 $(CC
) $(LDFLAGS
) -o translate translate.o
$(LIBS
)
198 # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $".