]> git.ipfire.org Git - thirdparty/cups.git/blame - Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / Makefile
CommitLineData
ef416fc2 1#
3d8365b8 2# "$Id: Makefile 6513 2007-05-06 23:50:25Z mike $"
ef416fc2 3#
4# Top-level Makefile for the Common UNIX Printing System (CUPS).
5#
f7deaa1a 6# Copyright 1997-2007 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
25include Makedefs
26
27#
28# Directories to make...
29#
30
bd7854cb 31DIRS = 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
41all:
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
53clean:
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
64distclean: clean
65 $(RM) Makedefs config.h config.log config.status
66 $(RM) cups-config conf/cupsd.conf conf/pam.std
b94498cf 67 $(RM) doc/help/ref-cupsd-conf.html doc/help/standard.html
68 $(RM) doc/index.html
a9252913 69 $(RM) init/cups.sh init/cups-lpd
b94498cf 70 $(RM) man/client.conf.man
a9252913 71 $(RM) man/cups-deviced.man man/cups-driverd.man
72 $(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
73 $(RM) man/cupsd.conf.man man/lpoptions.man
f7deaa1a 74 $(RM) packaging/cups.list
75 $(RM) templates/edit-config.tmpl templates/header.tmpl
a9252913 76 -$(RM) doc/*/index.html
77 -$(RM) templates/*/edit-config.tmpl
78 -$(RM) templates/*/header.tmpl
79 -$(RM) -r autom4te*.cache
80
81
ef416fc2 82#
83# Make dependencies
84#
85
86depend:
87 for dir in $(DIRS); do\
88 echo Making dependencies in $$dir... ;\
89 (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\
90 done
91
92
b94498cf 93#
94# Generate a ctags file...
95#
96
97ctags:
98 ctags -R .
99
100
ef416fc2 101#
102# Install object and target files...
103#
104
105install: installhdrs
106 for dir in $(DIRS); do\
107 echo Installing in $$dir... ;\
108 (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
109 done
ef416fc2 110 echo Installing cups-config script...
757d2cad 111 $(INSTALL_DIR) -m 755 $(BINDIR)
ef416fc2 112 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
e1d6a774 113 if test "x$(INITDIR)" != x; then \
f301802f 114 echo Installing init scripts...; \
757d2cad 115 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
fa73b229 116 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
f7deaa1a 117 for level in $(RCLEVELS); do \
118 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
119 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \
120 if test `uname` = HP-UX; then \
121 level=`expr $$level - 1`; \
122 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
123 fi; \
124 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \
125 done; \
757d2cad 126 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
f7deaa1a 127 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \
ef416fc2 128 fi
e1d6a774 129 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
ef416fc2 130 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
131 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
f301802f 132 echo Installing StartupItems files...; \
e00b005a 133 $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
134 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
3d8365b8 135 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
e00b005a 136 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
a4d04587 137 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
d09495fa 138 echo Installing LaunchDaemons configuration files...; \
e00b005a 139 $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
d09495fa 140 $(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
3d8365b8 141 case `uname -r` in \
142 8.*) \
143 $(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
144 $(INSTALL_SCRIPT) init/PrintingServices.launchd $(BUILDROOT)/System/Library/StartupItems/PrintingServices/PrintingServices; \
145 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)/System/Library/StartupItems/PrintingServices/StartupParameters.plist; \
146 $(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj; \
147 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings; \
148 ;; \
149 esac \
ef416fc2 150 else \
f301802f 151 echo Installing RC script...; \
fa73b229 152 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
ef416fc2 153 fi \
154 fi
e1d6a774 155 if test "x$(DBUSDIR)" != x; then \
b423cd4c 156 echo Installing cups.conf in $(DBUSDIR)...;\
f7deaa1a 157 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
158 $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/system.d/cups.conf; \
bd7854cb 159 fi
e1d6a774 160 if test "x$(XINETD)" != x; then \
161 echo Installing xinetd configuration file for cups-lpd...; \
162 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
163 $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
164 fi
f7deaa1a 165 if test "x$(MENUDIR)" != x; then \
166 echo Installing desktop menu...; \
167 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(MENUDIR); \
168 $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)$(MENUDIR); \
169 fi
170 if test "x$(ICONDIR)" != x; then \
e1d6a774 171 echo Installing desktop icons...; \
f7deaa1a 172 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps; \
173 $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
174 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps; \
175 $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
176 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps; \
177 $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
178 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps; \
179 $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
e1d6a774 180 fi
ef416fc2 181
182
183#
184# Install source and header files...
185#
186
187installsrc:
bd7854cb 188 gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
ef416fc2 189
190installhdrs:
191 (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
192 (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
193
194
757d2cad 195#
196# Uninstall object and target files...
197#
198
199uninstall:
200 for dir in $(DIRS); do\
201 echo Uninstalling in $$dir... ;\
202 (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\
203 done
204 echo Uninstalling cups-config script...
205 $(RM) $(BINDIR)/cups-config
206 -$(RMDIR) $(BINDIR)
207 echo Uninstalling startup script...
e1d6a774 208 if test "x$(INITDIR)" != x; then \
757d2cad 209 $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
210 $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
211 $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
212 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
213 $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
214 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
215 $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
216 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
217 $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
218 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
219 fi
e1d6a774 220 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
757d2cad 221 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
222 $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
223 $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
224 $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
225 $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
226 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
3d8365b8 227 $(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cupsd.plist; \
228 $(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cups-lpd.plist; \
229 $(RMDIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
757d2cad 230 else \
231 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
232 fi \
233 $(RMDIR) $(BUILDROOT)$(INITDDIR); \
234 fi
e1d6a774 235 if test "x$(DBUSDIR)" != x; then \
757d2cad 236 echo Uninstalling cups.conf in $(DBUSDIR)...;\
237 $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
238 $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
239 fi
e1d6a774 240 $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
241 $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
242 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
243 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
244 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
245 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
757d2cad 246
247
ef416fc2 248#
249# Run the test suite...
250#
251
d09495fa 252test: all
ef416fc2 253 echo Running CUPS test suite...
254 cd test; ./run-stp-tests.sh
255
256
d09495fa 257check: all
258 echo Running CUPS test suite with defaults...
259 cd test; ./run-stp-tests.sh 1 0 n
260
261
ef416fc2 262#
4744bd90 263# Make software distributions using EPM (http://www.easysw.com/epm/)...
ef416fc2 264#
265
d09495fa 266EPMFLAGS = -v --output-dir dist $(EPMARCH)
ef416fc2 267
b86bc4cf 268aix bsd deb depot inst pkg setld slackware swinstall tardist:
4744bd90 269 epm $(EPMFLAGS) -f $@ cups packaging/cups.list
ef416fc2 270
271epm:
d09495fa 272 epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
273
274osx:
275 epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
276
b86bc4cf 277rpm:
278 epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
279
d09495fa 280.PHONEY: dist
281dist: all
282 $(RM) -r dist
283 $(MAKE) $(MFLAGS) epm
284 case `uname` in \
285 *BSD*) $(MAKE) $(MFLAGS) bsd;; \
286 Darwin*) $(MAKE) $(MFLAGS) osx;; \
287 IRIX*) $(MAKE) $(MFLAGS) tardist;; \
288 Linux*) $(MAKE) $(MFLAGS) rpm;; \
289 SunOS*) $(MAKE) $(MFLAGS) pkg;; \
290 esac
ef416fc2 291
bd7854cb 292
ef416fc2 293#
3d8365b8 294# End of "$Id: Makefile 6513 2007-05-06 23:50:25Z mike $".
ef416fc2 295#