• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Configuration file makefile for CUPS.
3#
4# Copyright © 2020-2024 by OpenPrinting.
5# Copyright 2007-2015 by Apple Inc.
6# Copyright 1993-2006 by Easy Software Products.
7#
8# Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
9#
10
11include ../Makedefs
12
13#
14# Config files...
15#
16
17KEEP	=	cups-files.conf cupsd.conf snmp.conf
18REPLACE	=	mime.convs mime.types
19
20
21#
22# Make everything...
23#
24
25all:
26
27
28#
29# Make library targets...
30#
31
32libs:
33
34
35#
36# Make unit tests...
37#
38
39unittests:
40
41
42#
43# Clean all config and object files...
44#
45
46clean:
47
48
49#
50# Dummy depend...
51#
52
53depend:
54
55
56#
57# Install all targets...
58#
59
60install:	all install-data install-headers install-libs install-exec
61
62
63#
64# Install data files...
65#
66
67install-data:
68	for file in $(KEEP); do \
69		if test -r $(SERVERROOT)/$$file ; then \
70			$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.N ; \
71		else \
72			$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \
73		fi ; \
74		$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \
75	done
76	$(INSTALL_DIR) -m 755 $(DATADIR)/mime
77	for file in $(REPLACE); do \
78		if test -r $(DATADIR)/mime/$$file ; then \
79			$(MV) $(DATADIR)/mime/$$file $(DATADIR)/mime/$$file.O ; \
80		fi ; \
81		if test -r $(SERVERROOT)/$$file ; then \
82			$(MV) $(SERVERROOT)/$$file $(DATADIR)/mime/$$file.O ; \
83		fi ; \
84		$(INSTALL_DATA) $$file $(DATADIR)/mime ; \
85	done
86	-if test x$(PAMDIR) != x; then \
87		$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
88		if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
89			$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
90		else \
91			$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
92		fi ; \
93	fi
94
95
96#
97# Install programs...
98#
99
100install-exec:
101
102
103#
104# Install headers...
105#
106
107install-headers:
108
109
110#
111# Install libraries...
112#
113
114install-libs:
115
116
117#
118# Uninstall files...
119#
120
121uninstall:
122	for file in $(KEEP) $(REPLACE) cupsd.conf.default; do \
123		$(RM) $(SERVERROOT)/$$file; \
124	done
125	-$(RMDIR) $(SERVERROOT)
126	for file in $(REPLACE); do \
127		$(RM) $(DATADIR)/mime/$$file; \
128	done
129	-$(RMDIR) $(DATADIR)/mime
130	-if test x$(PAMDIR) != x; then \
131		$(RM) $(BUILDROOT)$(PAMDIR)/cups; \
132		$(RMDIR) $(BUILDROOT)$(PAMDIR); \
133	fi
134