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