]> git.ipfire.org Git - thirdparty/cups.git/blame - locale/Makefile
Update ipp documentation to reflect the behavior of configuring WiFi on IPP USB printers.
[thirdparty/cups.git] / locale / Makefile
CommitLineData
ef416fc2 1#
7e86f2f6 2# Locale file makefile for CUPS.
ef416fc2 3#
21609267 4# Copyright © 2007-2019 by Apple Inc.
e4b72d7e 5# Copyright © 1993-2007 by Easy Software Products.
ef416fc2 6#
e4b72d7e
MS
7# Licensed under Apache License v2.0. See the file "LICENSE" for more
8# information.
ef416fc2 9#
10
11include ../Makedefs
12
ef416fc2 13
7e86f2f6
MS
14OBJS = checkpo.o po2strings.o strings2po.o
15TARGETS = checkpo po2strings strings2po
bc44d920 16
17
ef416fc2 18#
19# Make everything...
20#
21
bc44d920 22all: $(TARGETS)
ef416fc2 23
24
c9fc04c6
MS
25#
26# Make library targets...
27#
28
29libs:
30
31
5f64df29
MS
32#
33# Make unit tests...
34#
35
36unittests:
37
38
ef416fc2 39#
40# Clean all config and object files...
41#
42
43clean:
bc44d920 44 $(RM) $(TARGETS) $(OBJS)
ef416fc2 45
46
bd7854cb 47#
bc44d920 48# Update dependencies (without system header dependencies...)
bd7854cb 49#
50
51depend:
12f89d24 52 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
bd7854cb 53
54
ef416fc2 55#
50fe7201 56# Install all targets...
ef416fc2 57#
58
50fe7201
MS
59install: all install-data install-headers install-libs install-exec
60
61
62#
63# Install data files...
64#
65
66install-data: $(INSTALL_LANGUAGES)
ed486911 67
68install-languages:
bd7854cb 69 $(INSTALL_DIR) -m 755 $(LOCALEDIR)
fe0d6115 70 for loc in en $(LANGUAGES) ; do \
89d46774 71 if test -f cups_$$loc.po; then \
72 $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
73 $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
74 fi ; \
ef416fc2 75 done
76
0c5991db 77install-langbundle:
e4b72d7e
MS
78 $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(RESOURCEDIR)"
79 $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(RESOURCEDIR)"
0837b7e8 80
ef416fc2 81
50fe7201
MS
82#
83# Install programs...
84#
85
86install-exec:
87
88
89#
90# Install headers...
91#
92
93install-headers:
94
95
96#
97# Install libraries...
98#
99
100install-libs:
101
102
757d2cad 103#
104# Uninstall files...
105#
106
ed486911 107uninstall: $(UNINSTALL_LANGUAGES)
108
109uninstall-languages:
fe0d6115 110 -for loc in en $(LANGUAGES) ; do \
757d2cad 111 $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
757d2cad 112 done
757d2cad 113
0837b7e8 114uninstall-langbundle:
e4b72d7e 115 $(RM) "$(BUILDROOT)$(RESOURCEDIR)/cups.strings"
0837b7e8 116
757d2cad 117
ef416fc2 118#
0837b7e8
MS
119# pot - Creates/updates the cups.pot template file, merges changes into existing
120# message catalogs, and updates the cups.strings file. We don't use
121# xgettext to update the cups.strings file due to known xgettext bugs.
ef416fc2 122#
123
0837b7e8 124pot: checkpo po2strings
ef416fc2 125 echo Updating cups.pot...
bc44d920 126 mv cups.pot cups.pot.bck
127 touch cups.pot
84315f46 128 cd ..; xgettext -o locale/cups.pot -cTRANSLATORS -s \
fe0d6115 129 --keyword=_ --no-wrap --from-code utf-8 \
61cf44e2 130 --copyright-holder="Apple Inc." \
44b3f161
MS
131 --package-name="CUPS" --package-version="$(CUPS_VERSION)" \
132 --msgid-bugs-address="https://github.com/apple/cups/issues" \
61cf44e2 133 */*.c */*.cxx
fe0d6115 134 (cat cups.header; tail +6 cups.pot) > cups.pot.N
ef416fc2 135 mv cups.pot.N cups.pot
0837b7e8
MS
136 echo Checking cups.pot...
137 ./checkpo cups.pot
dcb445bc 138 for loc in *.po ; do \
bb0d23b2
MS
139 if test $$loc = '*.po'; then \
140 break; \
141 fi; \
dcb445bc
MS
142 echo Merging changes into $$loc... ; \
143 msgmerge -o $$loc -s -N --no-location $$loc cups.pot ; \
ef416fc2 144 done
0837b7e8 145 echo Updating cups.strings...
fe0d6115
MS
146 ./po2strings cups_en.po cups.strings
147
148cups.strings: cups_en.po po2strings
149 echo Updating cups.strings...
150 ./po2strings cups_en.po cups.strings
ef416fc2 151
152
db1f069b
MS
153#
154# checkpo - A simple utility to check PO files for correct translation
8b116e60 155# strings. Dependency on static library is deliberate.
db1f069b
MS
156#
157# checkpo filename.po [... filenameN.po]
158#
159
6d2f911b 160checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
ed26f50f 161 echo Linking $@...
21609267 162 $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o checkpo checkpo.o \
3e391a8e 163 $(LINKCUPSSTATIC)
00dbe99f 164 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
db1f069b 165
f0ab5bff 166checkall: checkpo
6d086e08 167 ./checkpo *.po *.strings
f0ab5bff 168
db1f069b 169
bc44d920 170#
171# po2strings - A simple utility which uses iconv to convert GNU gettext
8072030b 172# message catalogs to macOS .strings files.
bc44d920 173#
174# po2strings filename.po filename.strings
175#
176
6d2f911b 177po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
ed26f50f 178 echo Linking $@...
21609267 179 $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o po2strings po2strings.o \
3e391a8e 180 $(LINKCUPSSTATIC)
00dbe99f 181 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
bc44d920 182
183
184#
8072030b 185# strings2po - A simple utility which uses iconv to convert macOS .strings files
f3c17241 186# to GNU gettext message catalogs.
bc44d920 187#
188# strings2po filename.strings filename.po
189#
190
191strings2po: strings2po.o
ed26f50f 192 echo Linking $@...
21609267 193 $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o strings2po strings2po.o
00dbe99f 194 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
bc44d920 195
196
bc44d920 197#
198# Dependencies...
199#
321d8d57 200
bc44d920 201include Dependencies