Load cups into easysw/current.
[thirdparty/cups.git] / Makefile
CommitLineData
ef416fc2 1#
757d2cad 2# "$Id: Makefile 5229 2006-03-05 16:48:12Z 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
25include Makedefs
26
27#
28# Directories to make...
29#
30
bd7854cb 31DIRS = cups backend berkeley cgi-bin filter locale man monitor \
b423cd4c 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
ef416fc2 60#
61# Make dependencies
62#
63
64depend:
65 for dir in $(DIRS); do\
66 echo Making dependencies in $$dir... ;\
67 (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\
68 done
69
70
71#
72# Install object and target files...
73#
74
75install: installhdrs
76 for dir in $(DIRS); do\
77 echo Installing in $$dir... ;\
78 (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
79 done
ef416fc2 80 echo Installing cups-config script...
757d2cad 81 $(INSTALL_DIR) -m 755 $(BINDIR)
ef416fc2 82 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
83 echo Installing startup script...
84 if test "x$(INITDIR)" != "x"; then \
757d2cad 85 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
fa73b229 86 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
757d2cad 87 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
fa73b229 88 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
757d2cad 89 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \
fa73b229 90 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
757d2cad 91 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \
fa73b229 92 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
757d2cad 93 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \
fa73b229 94 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
ef416fc2 95 fi
96 if test "x$(INITDIR)" = "x" -a "x$(INITDDIR)" != "x"; then \
97 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
98 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
e00b005a 99 $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
100 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
757d2cad 101 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
e00b005a 102 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
a4d04587 103 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
e00b005a 104 $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
ef416fc2 105 else \
fa73b229 106 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
ef416fc2 107 fi \
108 fi
bd7854cb 109 if test "x$(DBUSDIR)" != "x"; then \
b423cd4c 110 echo Installing cups.conf in $(DBUSDIR)...;\
757d2cad 111 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \
bd7854cb 112 $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
113 fi
ef416fc2 114
115
116#
117# Install source and header files...
118#
119
120installsrc:
bd7854cb 121 gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
ef416fc2 122
123installhdrs:
124 (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
125 (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
126
127
757d2cad 128#
129# Uninstall object and target files...
130#
131
132uninstall:
133 for dir in $(DIRS); do\
134 echo Uninstalling in $$dir... ;\
135 (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\
136 done
137 echo Uninstalling cups-config script...
138 $(RM) $(BINDIR)/cups-config
139 -$(RMDIR) $(BINDIR)
140 echo Uninstalling startup script...
141 if test "x$(INITDIR)" != "x"; then \
142 $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
143 $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
144 $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
145 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
146 $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
147 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
148 $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
149 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
150 $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
151 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
152 fi
153 if test "x$(INITDIR)" = "x" -a "x$(INITDDIR)" != "x"; then \
154 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
155 $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
156 $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
157 $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
158 $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
159 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
160 $(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
161 else \
162 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
163 fi \
164 $(RMDIR) $(BUILDROOT)$(INITDDIR); \
165 fi
166 if test "x$(DBUSDIR)" != "x"; then \
167 echo Uninstalling cups.conf in $(DBUSDIR)...;\
168 $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
169 $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
170 fi
171
172
ef416fc2 173#
174# Run the test suite...
175#
176
177check test: all
178 echo Running CUPS test suite...
179 cd test; ./run-stp-tests.sh
180
181
182#
4744bd90 183# Make software distributions using EPM (http://www.easysw.com/epm/)...
ef416fc2 184#
185
186EPMFLAGS = -v
187
4744bd90 188aix bsd deb depot inst osx pkg rpm setld slackware swinstall tardist:
189 epm $(EPMFLAGS) -f $@ cups packaging/cups.list
ef416fc2 190
191epm:
192 epm $(EPMFLAGS) cups packaging/cups.list
193
bd7854cb 194
ef416fc2 195#
757d2cad 196# End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $".
ef416fc2 197#