]> git.ipfire.org Git - thirdparty/cups.git/blob - Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / Makefile
1 #
2 # "$Id: Makefile 5498 2006-05-07 16:52:14Z mike $"
3 #
4 # Top-level Makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
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
31 DIRS = cups backend berkeley cgi-bin filter locale man monitor \
32 notifier $(PDFTOPS) scheduler systemv test \
33 $(PHPDIR) \
34 conf data doc fonts ppd templates
35
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
48
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
59
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
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
99 echo Installing cups-config script...
100 $(INSTALL_DIR) -m 755 $(BINDIR)
101 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
102 echo Installing startup script...
103 if test "x$(INITDIR)" != x; then \
104 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
105 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
106 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
107 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
108 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \
109 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
110 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \
111 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
112 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \
113 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
114 fi
115 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
116 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
117 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
118 $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
119 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
120 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
121 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
122 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
123 $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
124 else \
125 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
126 fi \
127 fi
128 if test "x$(DBUSDIR)" != x; then \
129 echo Installing cups.conf in $(DBUSDIR)...;\
130 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \
131 $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
132 fi
133 if test "x$(XINETD)" != x; then \
134 echo Installing xinetd configuration file for cups-lpd...; \
135 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
136 $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
137 fi
138 if test -d /usr/share/applications; then \
139 echo Installing desktop icons...; \
140 $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \
141 $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \
142 $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \
143 $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \
144 $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \
145 $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \
146 $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \
147 $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \
148 $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \
149 $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \
150 fi
151
152
153 #
154 # Install source and header files...
155 #
156
157 installsrc:
158 gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
159
160 installhdrs:
161 (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
162 (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
163
164
165 #
166 # Uninstall object and target files...
167 #
168
169 uninstall:
170 for dir in $(DIRS); do\
171 echo Uninstalling in $$dir... ;\
172 (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\
173 done
174 echo Uninstalling cups-config script...
175 $(RM) $(BINDIR)/cups-config
176 -$(RMDIR) $(BINDIR)
177 echo Uninstalling startup script...
178 if test "x$(INITDIR)" != x; then \
179 $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
180 $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
181 $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
182 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
183 $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
184 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
185 $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
186 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
187 $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
188 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
189 fi
190 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
191 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
192 $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
193 $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
194 $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
195 $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
196 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
197 $(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
198 else \
199 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
200 fi \
201 $(RMDIR) $(BUILDROOT)$(INITDDIR); \
202 fi
203 if test "x$(DBUSDIR)" != x; then \
204 echo Uninstalling cups.conf in $(DBUSDIR)...;\
205 $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
206 $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
207 fi
208 $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
209 $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
210 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
211 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
212 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
213 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
214
215
216 #
217 # Run the test suite...
218 #
219
220 check test: all
221 echo Running CUPS test suite...
222 cd test; ./run-stp-tests.sh
223
224
225 #
226 # Make software distributions using EPM (http://www.easysw.com/epm/)...
227 #
228
229 EPMFLAGS = -v
230
231 aix bsd deb depot inst osx pkg rpm setld slackware swinstall tardist:
232 epm $(EPMFLAGS) -f $@ cups packaging/cups.list
233
234 epm:
235 epm $(EPMFLAGS) cups packaging/cups.list
236
237
238 #
239 # End of "$Id: Makefile 5498 2006-05-07 16:52:14Z mike $".
240 #