]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b86bc4cf | 2 | # "$Id: Makefile 6128 2006-12-05 16:07:23Z mike $" |
ef416fc2 | 3 | # |
4 | # Top-level Makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
fa73b229 | 6 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 7 | # |
8 | # These coded instructions, statements, and computer programs are the | |
9 | # property of Easy Software Products and are protected by Federal | |
10 | # copyright law. Distribution and use rights are outlined in the file | |
11 | # "LICENSE.txt" which should have been included with this file. If this | |
12 | # file is missing or damaged please contact Easy Software Products | |
13 | # at: | |
14 | # | |
15 | # Attn: CUPS Licensing Information | |
16 | # Easy Software Products | |
17 | # 44141 Airport View Drive, Suite 204 | |
18 | # Hollywood, Maryland 20636-3142 USA | |
19 | # | |
20 | # Voice: (301) 373-9600 | |
21 | # EMail: cups-info@cups.org | |
22 | # WWW: http://www.cups.org | |
23 | # | |
24 | ||
25 | include Makedefs | |
26 | ||
27 | # | |
28 | # Directories to make... | |
29 | # | |
30 | ||
bd7854cb | 31 | DIRS = cups backend berkeley cgi-bin filter locale man monitor \ |
e1d6a774 | 32 | notifier $(PDFTOPS) scheduler systemv test \ |
757d2cad | 33 | $(PHPDIR) \ |
34 | conf data doc fonts ppd templates | |
bd7854cb | 35 | |
ef416fc2 | 36 | |
37 | # | |
38 | # Make all targets... | |
39 | # | |
40 | ||
41 | all: | |
42 | chmod +x cups-config | |
43 | for dir in $(DIRS); do\ | |
44 | echo Making all in $$dir... ;\ | |
45 | (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\ | |
46 | done | |
47 | ||
bd7854cb | 48 | |
ef416fc2 | 49 | # |
50 | # Remove object and target files... | |
51 | # | |
52 | ||
53 | clean: | |
54 | for dir in $(DIRS); do\ | |
55 | echo Cleaning in $$dir... ;\ | |
56 | (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\ | |
57 | done | |
58 | ||
bd7854cb | 59 | |
a9252913 | 60 | # |
61 | # Remove all non-distribution files... | |
62 | # | |
63 | ||
64 | distclean: clean | |
65 | $(RM) Makedefs config.h config.log config.status | |
66 | $(RM) cups-config conf/cupsd.conf conf/pam.std | |
67 | $(RM) doc/help/standard.html doc/index.html | |
68 | $(RM) init/cups.sh init/cups-lpd | |
69 | $(RM) man/cups-deviced.man man/cups-driverd.man | |
70 | $(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man | |
71 | $(RM) man/cupsd.conf.man man/lpoptions.man | |
72 | $(RM) packaging/cups templates/edit-config.tmpl templates/header.tmpl | |
73 | -$(RM) doc/*/index.html | |
74 | -$(RM) templates/*/edit-config.tmpl | |
75 | -$(RM) templates/*/header.tmpl | |
76 | -$(RM) -r autom4te*.cache | |
77 | ||
78 | ||
ef416fc2 | 79 | # |
80 | # Make dependencies | |
81 | # | |
82 | ||
83 | depend: | |
84 | for dir in $(DIRS); do\ | |
85 | echo Making dependencies in $$dir... ;\ | |
86 | (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\ | |
87 | done | |
88 | ||
89 | ||
90 | # | |
91 | # Install object and target files... | |
92 | # | |
93 | ||
94 | install: installhdrs | |
95 | for dir in $(DIRS); do\ | |
96 | echo Installing in $$dir... ;\ | |
97 | (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\ | |
98 | done | |
ef416fc2 | 99 | echo Installing cups-config script... |
757d2cad | 100 | $(INSTALL_DIR) -m 755 $(BINDIR) |
ef416fc2 | 101 | $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config |
e1d6a774 | 102 | if test "x$(INITDIR)" != x; then \ |
f301802f | 103 | echo Installing init scripts...; \ |
757d2cad | 104 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \ |
fa73b229 | 105 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \ |
757d2cad | 106 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \ |
fa73b229 | 107 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \ |
757d2cad | 108 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \ |
fa73b229 | 109 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \ |
757d2cad | 110 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \ |
fa73b229 | 111 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \ |
757d2cad | 112 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \ |
fa73b229 | 113 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \ |
ef416fc2 | 114 | fi |
e1d6a774 | 115 | if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \ |
ef416fc2 | 116 | $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \ |
117 | if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \ | |
f301802f | 118 | echo Installing StartupItems files...; \ |
e00b005a | 119 | $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \ |
120 | $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \ | |
757d2cad | 121 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \ |
e00b005a | 122 | $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \ |
a4d04587 | 123 | elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \ |
d09495fa | 124 | echo Installing LaunchDaemons configuration files...; \ |
e00b005a | 125 | $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \ |
d09495fa | 126 | $(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \ |
ef416fc2 | 127 | else \ |
f301802f | 128 | echo Installing RC script...; \ |
fa73b229 | 129 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \ |
ef416fc2 | 130 | fi \ |
131 | fi | |
e1d6a774 | 132 | if test "x$(DBUSDIR)" != x; then \ |
b423cd4c | 133 | echo Installing cups.conf in $(DBUSDIR)...;\ |
757d2cad | 134 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \ |
bd7854cb | 135 | $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \ |
136 | fi | |
e1d6a774 | 137 | if test "x$(XINETD)" != x; then \ |
138 | echo Installing xinetd configuration file for cups-lpd...; \ | |
139 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ | |
140 | $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \ | |
141 | fi | |
142 | if test -d /usr/share/applications; then \ | |
143 | echo Installing desktop icons...; \ | |
144 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \ | |
145 | $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \ | |
146 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \ | |
147 | $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \ | |
148 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \ | |
149 | $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \ | |
150 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \ | |
151 | $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \ | |
152 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \ | |
153 | $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \ | |
154 | fi | |
ef416fc2 | 155 | |
156 | ||
157 | # | |
158 | # Install source and header files... | |
159 | # | |
160 | ||
161 | installsrc: | |
bd7854cb | 162 | gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf - |
ef416fc2 | 163 | |
164 | installhdrs: | |
165 | (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\ | |
166 | (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1; | |
167 | ||
168 | ||
757d2cad | 169 | # |
170 | # Uninstall object and target files... | |
171 | # | |
172 | ||
173 | uninstall: | |
174 | for dir in $(DIRS); do\ | |
175 | echo Uninstalling in $$dir... ;\ | |
176 | (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\ | |
177 | done | |
178 | echo Uninstalling cups-config script... | |
179 | $(RM) $(BINDIR)/cups-config | |
180 | -$(RMDIR) $(BINDIR) | |
181 | echo Uninstalling startup script... | |
e1d6a774 | 182 | if test "x$(INITDIR)" != x; then \ |
757d2cad | 183 | $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \ |
184 | $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \ | |
185 | $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \ | |
186 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \ | |
187 | $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \ | |
188 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \ | |
189 | $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \ | |
190 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \ | |
191 | $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \ | |
192 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \ | |
193 | fi | |
e1d6a774 | 194 | if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \ |
757d2cad | 195 | if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \ |
196 | $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \ | |
197 | $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \ | |
198 | $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \ | |
199 | $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \ | |
200 | elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \ | |
201 | $(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \ | |
202 | else \ | |
203 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \ | |
204 | fi \ | |
205 | $(RMDIR) $(BUILDROOT)$(INITDDIR); \ | |
206 | fi | |
e1d6a774 | 207 | if test "x$(DBUSDIR)" != x; then \ |
757d2cad | 208 | echo Uninstalling cups.conf in $(DBUSDIR)...;\ |
209 | $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \ | |
210 | $(RMDIR) $(BUILDROOT)$(DBUSDIR); \ | |
211 | fi | |
e1d6a774 | 212 | $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd |
213 | $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop | |
214 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png | |
215 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png | |
216 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png | |
217 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png | |
757d2cad | 218 | |
219 | ||
ef416fc2 | 220 | # |
221 | # Run the test suite... | |
222 | # | |
223 | ||
d09495fa | 224 | test: all |
ef416fc2 | 225 | echo Running CUPS test suite... |
226 | cd test; ./run-stp-tests.sh | |
227 | ||
228 | ||
d09495fa | 229 | check: all |
230 | echo Running CUPS test suite with defaults... | |
231 | cd test; ./run-stp-tests.sh 1 0 n | |
232 | ||
233 | ||
ef416fc2 | 234 | # |
4744bd90 | 235 | # Make software distributions using EPM (http://www.easysw.com/epm/)... |
ef416fc2 | 236 | # |
237 | ||
d09495fa | 238 | EPMFLAGS = -v --output-dir dist $(EPMARCH) |
ef416fc2 | 239 | |
b86bc4cf | 240 | aix bsd deb depot inst pkg setld slackware swinstall tardist: |
4744bd90 | 241 | epm $(EPMFLAGS) -f $@ cups packaging/cups.list |
ef416fc2 | 242 | |
243 | epm: | |
d09495fa | 244 | epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list |
245 | ||
246 | osx: | |
247 | epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list | |
248 | ||
b86bc4cf | 249 | rpm: |
250 | epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list | |
251 | ||
d09495fa | 252 | .PHONEY: dist |
253 | dist: all | |
254 | $(RM) -r dist | |
255 | $(MAKE) $(MFLAGS) epm | |
256 | case `uname` in \ | |
257 | *BSD*) $(MAKE) $(MFLAGS) bsd;; \ | |
258 | Darwin*) $(MAKE) $(MFLAGS) osx;; \ | |
259 | IRIX*) $(MAKE) $(MFLAGS) tardist;; \ | |
260 | Linux*) $(MAKE) $(MFLAGS) rpm;; \ | |
261 | SunOS*) $(MAKE) $(MFLAGS) pkg;; \ | |
262 | esac | |
ef416fc2 | 263 | |
bd7854cb | 264 | |
ef416fc2 | 265 | # |
b86bc4cf | 266 | # End of "$Id: Makefile 6128 2006-12-05 16:07:23Z mike $". |
ef416fc2 | 267 | # |