2 # "$Id: Makefile 5547 2006-05-19 12:44:29Z mike $"
4 # Top-level Makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 1997-2006 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
/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
84 for
dir in
$(DIRS
); do\
85 echo Making dependencies in
$$dir...
;\
86 (cd
$$dir; $(MAKE
) $(MFLAGS
) depend
) || exit
1;\
91 # Install object and target files...
95 for
dir in
$(DIRS
); do\
96 echo Installing in
$$dir...
;\
97 (cd
$$dir; $(MAKE
) $(MFLAGS
) install) || exit
1;\
99 echo Installing cups-config script...
100 $(INSTALL_DIR
) -m
755 $(BINDIR
)
101 $(INSTALL_SCRIPT
) cups-config
$(BINDIR
)/cups-config
102 if
test "x$(INITDIR)" != x
; then \
103 echo Installing init scripts...
; \
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
; \
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 echo Installing StartupItems files...
; \
119 $(INSTALL_SCRIPT
) init
/PrintingServices
$(BUILDROOT
)$(INITDDIR
)/PrintingServices
; \
120 $(INSTALL_DATA
) init
/StartupParameters.plist
$(BUILDROOT
)$(INITDDIR
)/StartupParameters.plist
; \
121 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
; \
122 $(INSTALL_DATA
) init
/Localizable.strings
$(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
/Localizable.strings
; \
123 elif
test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
124 echo Installing LaunchDaemons configuration file...
; \
125 $(INSTALL_DATA
) init
/org.cups.cupsd.plist
$(BUILDROOT
)$(DEFAULT_LAUNCHD_CONF
); \
127 echo Installing RC script...
; \
128 $(INSTALL_SCRIPT
) init
/cups.sh
$(BUILDROOT
)$(INITDDIR
)/cups
; \
131 if
test "x$(DBUSDIR)" != x
; then \
132 echo Installing cups.conf in
$(DBUSDIR
)...
;\
133 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(DBUSDIR
); \
134 $(INSTALL_DATA
) packaging
/cups-dbus.conf
$(BUILDROOT
)$(DBUSDIR
)/cups.conf
; \
136 if
test "x$(XINETD)" != x
; then \
137 echo Installing xinetd configuration file for cups-lpd...
; \
138 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)$(XINETD
); \
139 $(INSTALL_DATA
) init
/cups-lpd
$(BUILDROOT
)$(XINETD
)/cups-lpd
; \
141 if
test -d
/usr
/share
/applications
; then \
142 echo Installing desktop icons...
; \
143 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)/usr
/share
/applications
; \
144 $(INSTALL_DATA
) desktop
/cups.desktop
$(BUILDROOT
)/usr
/share
/applications
; \
145 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)/usr
/share
/icons
/hicolor
/16x16
/apps
; \
146 $(INSTALL_DATA
) desktop
/cups-16.png
$(BUILDROOT
)/usr
/share
/icons
/hicolor
/16x16
/apps
/cups.png
; \
147 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)/usr
/share
/icons
/hicolor
/32x32
/apps
; \
148 $(INSTALL_DATA
) desktop
/cups-32.png
$(BUILDROOT
)/usr
/share
/icons
/hicolor
/32x32
/apps
/cups.png
; \
149 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)/usr
/share
/icons
/hicolor
/64x64
/apps
; \
150 $(INSTALL_DATA
) desktop
/cups-64.png
$(BUILDROOT
)/usr
/share
/icons
/hicolor
/64x64
/apps
/cups.png
; \
151 $(INSTALL_DIR
) -m
755 $(BUILDROOT
)/usr
/share
/icons
/hicolor
/128x128
/apps
; \
152 $(INSTALL_DATA
) desktop
/cups-128.png
$(BUILDROOT
)/usr
/share
/icons
/hicolor
/128x128
/apps
/cups.png
; \
157 # Install source and header files...
161 gnutar
--dereference
--exclude
=.svn
-cf
- . | gnutar
-C
$(SRCROOT
) -xf
-
164 (cd cups
; $(MAKE
) $(MFLAGS
) installhdrs
) || exit
1;\
165 (cd
filter ; $(MAKE
) $(MFLAGS
) installhdrs
) || exit
1;
169 # Uninstall object and target files...
173 for
dir in
$(DIRS
); do\
174 echo Uninstalling in
$$dir...
;\
175 (cd
$$dir; $(MAKE
) $(MFLAGS
) uninstall) || exit
1;\
177 echo Uninstalling cups-config script...
178 $(RM
) $(BINDIR
)/cups-config
180 echo Uninstalling startup script...
181 if
test "x$(INITDIR)" != x
; then \
182 $(RM
) $(BUILDROOT
)$(INITDIR
)/init.d
/cups
; \
183 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/init.d
; \
184 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc0.d
/K00cups
; \
185 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc0.d
; \
186 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc2.d
/S99cups
; \
187 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc2.d
; \
188 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc3.d
/S99cups
; \
189 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc3.d
; \
190 $(RM
) $(BUILDROOT
)$(INITDIR
)/rc5.d
/S99cups
; \
191 $(RMDIR
) $(BUILDROOT
)$(INITDIR
)/rc5.d
; \
193 if
test "x$(INITDIR)" = x
-a
"x$(INITDDIR)" != x
; then \
194 if
test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
195 $(RM
) $(BUILDROOT
)$(INITDDIR
)/PrintingServices
; \
196 $(RM
) $(BUILDROOT
)$(INITDDIR
)/StartupParameters.plist
; \
197 $(RM
) $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
/Localizable.strings
; \
198 $(RMDIR
) $(BUILDROOT
)$(INITDDIR
)/Resources
/English.lproj
; \
199 elif
test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
200 $(RM
) $(BUILDROOT
)$(DEFAULT_LAUNCHD_CONF
); \
202 $(INSTALL_SCRIPT
) init
/cups.sh
$(BUILDROOT
)$(INITDDIR
)/cups
; \
204 $(RMDIR
) $(BUILDROOT
)$(INITDDIR
); \
206 if
test "x$(DBUSDIR)" != x
; then \
207 echo Uninstalling cups.conf in
$(DBUSDIR
)...
;\
208 $(RM
) $(BUILDROOT
)$(DBUSDIR
)/cups.conf
; \
209 $(RMDIR
) $(BUILDROOT
)$(DBUSDIR
); \
211 $(RM
) $(BUILDROOT
)/etc
/xinetd.d
/cups-lpd
212 $(RM
) $(BUILDROOT
)/usr
/share
/applications
/cups.desktop
213 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/16x16
/apps
/cups.png
214 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/32x32
/apps
/cups.png
215 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/64x64
/apps
/cups.png
216 $(RM
) $(BUILDROOT
)/usr
/share
/icons
/hicolor
/128x128
/apps
/cups.png
220 # Run the test suite...
224 echo Running CUPS
test suite...
225 cd
test; .
/run-stp-tests.sh
229 # Make software distributions using EPM (http://www.easysw.com/epm/)...
234 aix bsd deb depot inst osx pkg rpm setld slackware swinstall tardist
:
235 epm
$(EPMFLAGS
) -f
$@ cups packaging
/cups.list
238 epm
$(EPMFLAGS
) cups packaging
/cups.list
242 # End of "$Id: Makefile 5547 2006-05-19 12:44:29Z mike $".