forked from OpenPrinting/pappl-retrofit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.am
More file actions
251 lines (216 loc) · 6.23 KB
/
Copy pathMakefile.am
File metadata and controls
251 lines (216 loc) · 6.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
ACLOCAL_AMFLAGS = -I m4
pkgconfdir = $(libdir)/pkgconfig
pkgconf_DATA = \
libpappl-retrofit.pc
doc_DATA = \
README.md \
AUTHORS \
COPYING \
NOTICE \
LICENSE \
DEVELOPING.md \
CONTRIBUTING.md
EXTRA_DIST = \
$(doc_DATA) \
autogen.sh \
config.rpath \
libpappl-retrofit.pc.in
EXTRA_DIST += \
pappl-retrofit/test-internal.h
# ==================================
# CUPS Driver legacy support library
# ==================================
pkgpappl_retrofitincludedir = $(includedir)
pkgpappl_retrofitinclude_DATA = \
pappl-retrofit/pappl-retrofit.h
lib_LTLIBRARIES = libpappl-retrofit.la
libpappl_retrofit_la_SOURCES = \
pappl-retrofit/pappl-retrofit.c \
pappl-retrofit/pappl-retrofit-private.h \
pappl-retrofit/print-job.c \
pappl-retrofit/print-job-private.h \
pappl-retrofit/cups-backends.c \
pappl-retrofit/cups-backends-private.h \
pappl-retrofit/cups-side-back-channel.c \
pappl-retrofit/cups-side-back-channel-private.h \
pappl-retrofit/web-interface.c \
pappl-retrofit/web-interface-private.h \
pappl-retrofit/libcups2-private.h
$(pkgpappl_retrofitinclude_DATA)
libpappl_retrofit_la_LIBADD = \
$(CUPS_LIBS) \
$(CUPSFILTERS_LIBS) \
$(PPD_LIBS) \
$(PAPPL_LIBS)
libpappl_retrofit_la_CFLAGS = \
$(CUPS_CFLAGS) \
$(CUPSFILTERS_CFLAGS) \
$(PPD_CFLAGS) \
$(PAPPL_CFLAGS)
libpappl_retrofit_la_LDFLAGS = \
-no-undefined \
-version-info 1
EXTRA_DIST += \
$(pkgpappl_retrofitinclude_DATA)
# =====
# Tests
# =====
#
# NOTE: The test CFLAGS deliberately add BOTH `-I$(srcdir)` and
# `-I$(srcdir)/pappl-retrofit/`. The latter lets each test file
# include its target private header directly ("cups-backends-private.h",
# "print-job-private.h", etc.); the former lets those private headers'
# own `<pappl-retrofit/pappl-retrofit-private.h>` includes resolve.
#
check_PROGRAMS = \
test_backend_parse \
test_ascii85 \
test_devid_match
TESTS = \
test_backend_parse \
test_ascii85 \
test_devid_match
test_backend_parse_SOURCES = pappl-retrofit/test_backend_parse.c
test_backend_parse_LDADD = \
libpappl-retrofit.la \
$(CUPS_LIBS) \
$(CUPSFILTERS_LIBS) \
$(PPD_LIBS) \
$(PAPPL_LIBS)
test_backend_parse_CFLAGS = \
-I$(srcdir) \
-I$(srcdir)/pappl-retrofit/ \
$(CUPS_CFLAGS) \
$(CUPSFILTERS_CFLAGS) \
$(PPD_CFLAGS) \
$(PAPPL_CFLAGS)
test_ascii85_SOURCES = pappl-retrofit/test_ascii85.c
test_ascii85_LDADD = \
libpappl-retrofit.la \
$(CUPS_LIBS) \
$(CUPSFILTERS_LIBS) \
$(PPD_LIBS) \
$(PAPPL_LIBS)
test_ascii85_CFLAGS = \
-I$(srcdir) \
-I$(srcdir)/pappl-retrofit/ \
$(CUPS_CFLAGS) \
$(CUPSFILTERS_CFLAGS) \
$(PPD_CFLAGS) \
$(PAPPL_CFLAGS)
test_devid_match_SOURCES = pappl-retrofit/test_devid_match.c
test_devid_match_LDADD = \
libpappl-retrofit.la \
$(CUPS_LIBS) \
$(CUPSFILTERS_LIBS) \
$(PPD_LIBS) \
$(PAPPL_LIBS)
test_devid_match_CFLAGS = \
-I$(srcdir) \
-I$(srcdir)/pappl-retrofit/ \
$(CUPS_CFLAGS) \
$(CUPSFILTERS_CFLAGS) \
$(PPD_CFLAGS) \
$(PAPPL_CFLAGS)
# ==========================
# Legacy Printer Application
# ==========================
if LEGACY_PRINTER_APP_AS_DAEMON
sbin_PROGRAMS = \
legacy-printer-app
else
bin_PROGRAMS = \
legacy-printer-app
endif
legacy_printer_app_SOURCES = \
legacy/legacy-printer-app.c
legacy_printer_app_LDADD = \
$(CUPS_LIBS) \
$(CUPSFILTERS_LIBS) \
$(PPD_LIBS) \
libpappl-retrofit.la
legacy_printer_app_CFLAGS = \
$(CUPS_CFLAGS) \
$(CUPSFILTERS_CFLAGS) \
$(PPD_CFLAGS) \
-I$(srcdir)/pappl-retrofit/
EXTRA_DIST += \
legacy/legacy-printer-app.service
# =========
# Man pages
# =========
man_MANS =
legacy_printer_app_manpage1 = \
legacy/legacy-printer-app.1
legacy_printer_app_manpage8 = \
legacy/legacy-printer-app.8
if LEGACY_PRINTER_APP_AS_DAEMON
$(legacy_printer_app_manpage8): $(legacy_printer_app_manpage1)
cp $(legacy_printer_app_manpage1) $(legacy_printer_app_manpage8)
sed -i -e 's/\.TH legacy-printer-app 1 "/\.TH legacy-printer-app 8 "/' $(legacy_printer_app_manpage8)
legacy_printer_app_manpages = \
$(legacy_printer_app_manpage8)
else
legacy_printer_app_manpages = \
$(legacy_printer_app_manpage1)
endif
man_MANS += $(legacy_printer_app_manpages)
EXTRA_DIST += \
$(legacy_printer_app_manpage1)
# ===========
# Directories
# ===========
legacy_printer_app_statedir=$(localstatedir)/lib/legacy-printer-app
legacy_printer_app_userppddir=$(legacy_printer_app_statedir)/ppd
legacy_printer_app_spooldir=$(localstatedir)/spool/legacy-printer-app
legacy_printer_app_resourcedir=$(datadir)/legacy-printer-app
legacy_printer_app_serverbin=$(prefix)/lib/legacy-printer-app
# ==========
# Test pages
# ==========
testpagedir = $(legacy_printer_app_resourcedir)
testpagefiles = \
data/testpage.pdf \
data/testpage.ps
testpage_DATA = $(testpagefiles)
EXTRA_DIST += $(testpagefiles)
distclean-local:
rm -rf *.cache *~ */*~
clean-local:
rm -f $(legacy_printer_app_manpage8)
install-data-hook:
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_statedir)
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_userppddir)
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_spooldir)
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_resourcedir)
if [ -d $(CUPS_SERVERBIN) ]; then \
$(LN_S) -f $(CUPS_SERVERBIN) $(DESTDIR)$(legacy_printer_app_serverbin);\
else \
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_serverbin); \
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_serverbin)/filter; \
$(INSTALL) -d -m 755 $(DESTDIR)$(legacy_printer_app_serverbin)/backend; \
fi
if LEGACY_PRINTER_APP_AS_DAEMON
$(INSTALL) -d -m 755 $(DESTDIR)$(SYSTEMD_UNITDIR)
$(INSTALL) -m 644 legacy/legacy-printer-app.service $(DESTDIR)$(SYSTEMD_UNITDIR)
endif
uninstall-hook:
-rmdir $(DESTDIR)$(legacy_printer_app_userppddir)
-rmdir $(DESTDIR)$(legacy_printer_app_statedir)
-rmdir $(DESTDIR)$(legacy_printer_app_spooldir)
-rmdir $(DESTDIR)$(legacy_printer_app_resourcedir)
-if [ -d $(CUPS_SERVERBIN) ]; then \
$(RM) $(DESTDIR)$(legacy_printer_app_serverbin);\
else \
rmdir $(DESTDIR)$(legacy_printer_app_serverbin);\
rmdir $(DESTDIR)$(legacy_printer_app_serverbin)/filter;\
rmdir $(DESTDIR)$(legacy_printer_app_serverbin)/backend;\
fi
-rmdir $(DESTDIR)$(includedir)/pappl-retrofit
-rmdir $(DESTDIR)$(docdir)
if LEGACY_PRINTER_APP_AS_DAEMON
-rm $(DESTDIR)$(SYSTEMD_UNITDIR)/legacy-printer-app.service
-rmdir $(DESTDIR)$(SYSTEMD_UNITDIR)
endif
uninstall-hook:
SUBDIRS =