2 # "$Id: Makefile 6500 2007-04-30 21:47:48Z mike $"
4 # Top-level Makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
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
15 # Attn: CUPS Licensing Information
16 # Easy Software Products
17 # 44141 Airport View Drive, Suite 204
18 # Hollywood, Maryland 20636-3142 USA
20 # Voice: (301) 373-9600
21 # EMail: cups-info@cups.org
22 # WWW: http://www.cups.org
28 # Directories to make...
31 DIRS
= cups backend berkeley cgi-bin
filter locale man monitor \
32 notifier
$(PDFTOPS
) scheduler systemv
test \
34 conf data doc fonts ppd templates
43 for
dir in
$(DIRS
); do\
44 echo Making
all in
$$dir...
;\
45 (cd
$$dir ; $(MAKE
) $(MFLAGS
)) || exit
1;\
50 # Remove object and target files...
54 for
dir in
$(DIRS
); do\
55 echo Cleaning in
$$dir...
;\
56 (cd
$$dir; $(MAKE
) $(MFLAGS
) clean) || exit
1;\
61 # Remove all non-distribution files...
65 $(RM
) Makedefs config.h config.log config.status
66 $(RM
) cups-config conf
/cupsd.conf conf
/pam.std
67 $(RM
) doc
/help
/ref-cupsd-conf.html doc
/help
/standard.html
69 $(RM
) init
/cups.sh init
/cups-lpd
70 $(RM
) man
/client.conf.man
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
74 $(RM
) packaging
/cups.list
75 $(RM
) templates
/edit-config.tmpl templates
/header.tmpl
76 -$(RM
) doc
/*/index.html
77 -$(RM
) templates
/*/edit-config.tmpl
78 -$(RM
) templates
/*/header.tmpl
79 -$(RM
) -r autom4te
*.cache
87 for
dir in
$(DIRS
); do\
88 echo Making dependencies in
$$dir...
;\
89 (cd
$$dir; $(MAKE
) $(MFLAGS
) depend
) || exit
1;\
94 # Generate a ctags file...
102 # Install object and target files...
106 for
dir in
$(DIRS
); do\
107 echo Installing in
$$dir...
;\
108 (cd
$$dir; $(MAKE
) $(MFLAGS
) install) || exit
1;\
110 echo Installing cups-config script...
111 $(INSTALL_DIR
) -m
755 $(BINDIR
)
112 $(INSTALL_SCRIPT
) cups-config
$(BINDIR
)/cups-config
113 if
test "x$(INITDIR)" != x
; then \
114 echo Installing init scripts...
; \
115 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(INITDIR
)/init.d
; \
116 $(INSTALL_SCRIPT
) init
/cups.sh
$(BUILDROOT
)$(INITDIR
)/init.d
/cups
; \
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
; \
124 $(LN
) ..
/init.d
/cups
$(BUILDROOT
)$(INITDIR
)/rc
$${level}.d
/K
$(RCSTOP
)cups
; \
126 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(INITDIR
)/rc0.d
; \
127 $(LN
) ..
/init.d
/cups
$(BUILDROOT
)$(INITDIR
)/rc0.d
/K
$(RCSTOP
)cups
; \
129 if
test "x$(INITDIR)" = x
-a
"x$(INITDDIR)" != x
; then \
130 $(INSTALL_DIR
) $(BUILDROOT
)$(INITDDIR
); \
131 if
test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
132 echo Installing StartupItems files...
; \
133 $(INSTALL_SCRIPT
) init
/PrintingServices
$(BUILDROOT
)$(INITDDIR
)/PrintingServices
; \
134 $(INSTALL_DATA
) init
/StartupParameters.plist
$(BUILDROOT
)$(INITDDIR
)/StartupParameters.plist
; \
135 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
; \
136 $(INSTALL_DATA
) init
/Localizable.strings
$(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
/Localizable.strings
; \
137 elif
test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
138 echo Installing LaunchDaemons configuration files...
; \
139 $(INSTALL_DATA
) init
/org.cups.cupsd.plist
$(BUILDROOT
)$(DEFAULT_LAUNCHD_CONF
); \
140 $(INSTALL_DATA
) init
/org.cups.cups-lpd.plist
$(BUILDROOT
)/System
/Library
/LaunchDaemons
; \
142 echo Installing RC script...
; \
143 $(INSTALL_SCRIPT
) init
/cups.sh
$(BUILDROOT
)$(INITDDIR
)/cups
; \
146 if
test "x$(DBUSDIR)" != x
; then \
147 echo Installing cups.conf in
$(DBUSDIR
)...
;\
148 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(DBUSDIR
)/system.d
; \
149 $(INSTALL_DATA
) packaging
/cups-dbus.conf
$(BUILDROOT
)$(DBUSDIR
)/system.d
/cups.conf
; \
151 if
test "x$(XINETD)" != x
; then \
152 echo Installing xinetd configuration file for cups-lpd...
; \
153 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(XINETD
); \
154 $(INSTALL_DATA
) init
/cups-lpd
$(BUILDROOT
)$(XINETD
)/cups-lpd
; \
156 if
test "x$(MENUDIR)" != x
; then \
157 echo Installing desktop menu...
; \
158 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(MENUDIR
); \
159 $(INSTALL_DATA
) desktop
/cups.desktop
$(BUILDROOT
)$(MENUDIR
); \
161 if
test "x$(ICONDIR)" != x
; then \
162 echo Installing desktop icons...
; \
163 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(ICONDIR
)/hicolor
/16x16
/apps
; \
164 $(INSTALL_DATA
) desktop
/cups-16.png
$(BUILDROOT
)$(ICONDIR
)/hicolor
/16x16
/apps
/cups.png
; \
165 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(ICONDIR
)/hicolor
/32x32
/apps
; \
166 $(INSTALL_DATA
) desktop
/cups-32.png
$(BUILDROOT
)$(ICONDIR
)/hicolor
/32x32
/apps
/cups.png
; \
167 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(ICONDIR
)/hicolor
/64x64
/apps
; \
168 $(INSTALL_DATA
) desktop
/cups-64.png
$(BUILDROOT
)$(ICONDIR
)/hicolor
/64x64
/apps
/cups.png
; \
169 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(ICONDIR
)/hicolor
/128x128
/apps
; \
170 $(INSTALL_DATA
) desktop
/cups-128.png
$(BUILDROOT
)$(ICONDIR
)/hicolor
/128x128
/apps
/cups.png
; \
175 # Install source and header files...
179 gnutar
--dereference
--exclude
=.svn
-cf
- . | gnutar
-C
$(SRCROOT
) -xf
-
182 (cd cups
; $(MAKE
) $(MFLAGS
) installhdrs
) || exit
1;\
183 (cd
filter ; $(MAKE
) $(MFLAGS
) installhdrs
) || exit
1;
187 # Uninstall object and target files...
191 for
dir in
$(DIRS
); do\
192 echo Uninstalling in
$$dir...
;\
193 (cd
$$dir; $(MAKE
) $(MFLAGS
) uninstall) || exit
1;\
195 echo Uninstalling cups-config script...
196 $(RM
) $(BINDIR
)/cups-config
198 echo Uninstalling startup script...
199 if
test "x$(INITDIR)" != x
; then \
200 $(RM
) $(BUILDROOT
)$(INITDIR
)/init.d
/cups
; \
201 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/init.d
; \
202 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc0.d
/K00cups
; \
203 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc0.d
; \
204 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc2.d
/S99cups
; \
205 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc2.d
; \
206 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc3.d
/S99cups
; \
207 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc3.d
; \
208 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc5.d
/S99cups
; \
209 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc5.d
; \
211 if
test "x$(INITDIR)" = x
-a
"x$(INITDDIR)" != x
; then \
212 if
test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
213 $(RM
) $(BUILDROOT
)$(INITDDIR
)/PrintingServices
; \
214 $(RM
) $(BUILDROOT
)$(INITDDIR
)/StartupParameters.plist
; \
215 $(RM
) $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
/Localizable.strings
; \
216 $(RMDIR
) $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
; \
217 elif
test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
218 $(RM
) $(BUILDROOT
)$(DEFAULT_LAUNCHD_CONF
); \
220 $(INSTALL_SCRIPT
) init
/cups.sh
$(BUILDROOT
)$(INITDDIR
)/cups
; \
222 $(RMDIR
) $(BUILDROOT
)$(INITDDIR
); \
224 if
test "x$(DBUSDIR)" != x
; then \
225 echo Uninstalling cups.conf in
$(DBUSDIR
)...
;\
226 $(RM
) $(BUILDROOT
)$(DBUSDIR
)/cups.conf
; \
227 $(RMDIR
) $(BUILDROOT
)$(DBUSDIR
); \
229 $(RM
) $(BUILDROOT
)/etc
/xinetd.d
/cups-lpd
230 $(RM
) $(BUILDROOT
)/usr
/share
/applications
/cups.desktop
231 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/16x16
/apps
/cups.png
232 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/32x32
/apps
/cups.png
233 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/64x64
/apps
/cups.png
234 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/128x128
/apps
/cups.png
238 # Run the test suite...
242 echo Running CUPS
test suite...
243 cd
test; .
/run-stp-tests.sh
247 echo Running CUPS
test suite with defaults...
248 cd
test; .
/run-stp-tests.sh
1 0 n
252 # Make software distributions using EPM (http://www.easysw.com/epm/)...
255 EPMFLAGS
= -v
--output-dir
dist $(EPMARCH
)
257 aix bsd deb depot inst pkg setld slackware swinstall tardist
:
258 epm
$(EPMFLAGS
) -f
$@ cups packaging
/cups.list
261 epm
$(EPMFLAGS
) -s packaging
/installer.gif cups packaging
/cups.list
264 epm
$(EPMFLAGS
) -f osx
-s packaging
/installer.tif cups packaging
/cups.list
267 epm
$(EPMFLAGS
) -f rpm
-s packaging
/installer.gif cups packaging
/cups.list
272 $(MAKE
) $(MFLAGS
) epm
274 *BSD
*) $(MAKE
) $(MFLAGS
) bsd
;; \
275 Darwin
*) $(MAKE
) $(MFLAGS
) osx
;; \
276 IRIX
*) $(MAKE
) $(MFLAGS
) tardist
;; \
277 Linux
*) $(MAKE
) $(MFLAGS
) rpm
;; \
278 SunOS
*) $(MAKE
) $(MFLAGS
) pkg
;; \
283 # End of "$Id: Makefile 6500 2007-04-30 21:47:48Z mike $".