ubik: log important messages at default log level
[openafs.git] / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7 #
8 # Portions Copyright (c) 2003 Apple Computer, Inc.
9
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12
13 ENABLE_KERNEL_MODULE=@ENABLE_KERNEL_MODULE@
14 DOXYGEN=@DOXYGEN@
15
16 # To compile AFS from scratch in the src tree run "make".
17 #   This recursively calls "make install ..." and does not depend on the
18 #   existence of any non-standard programs.
19 # To compile for the kernel type "make blibafs".  This assumes install,
20 #   rxgen, compile_et and others already exist and runs it with
21 #   "-argument kinstall".
22
23 COMPILE_PART1  = cd src && cd
24 COMPILE_PART2A = && $(MAKE)
25 COMPILE_PART2B = all
26 COMPILE_PART2  = ${COMPILE_PART2A} ${COMPILE_PART2B}
27 COMPILE_CLEAN  = ${COMPILE_PART2A} clean
28 COMPILE_DEPINSTALL  = ${COMPILE_PART2A} depinstall
29 COMPILE_GENERATED  = ${COMPILE_PART2A} generated
30
31 all: force
32         $(MAKE) build
33
34 all_nolibafs: force
35         $(MAKE) build TARGET=finale_nolibafs
36
37 only_libafs: force
38         $(MAKE) build TARGET=libafs
39
40 only_libafs_tree: force
41         $(MAKE) build TARGET=libafs_tree
42
43 buildtools: force
44         $(MAKE) build TARGET=build_tools COMPILE_PART2B=buildtools
45
46 cscope:
47         ( cd src ; cscope -b -R )
48
49 generated: force buildtools
50         +${COMPILE_PART1} afs ${COMPILE_GENERATED}
51         +${COMPILE_PART1} auth ${COMPILE_GENERATED}
52         +${COMPILE_PART1} bozo ${COMPILE_GENERATED}
53         +${COMPILE_PART1} bubasics ${COMPILE_GENERATED}
54         +${COMPILE_PART1} bucoord ${COMPILE_GENERATED}
55         +${COMPILE_PART1} budb ${COMPILE_GENERATED}
56         +${COMPILE_PART1} cmd ${COMPILE_GENERATED}
57         +${COMPILE_PART1} fsint ${COMPILE_GENERATED}
58         +${COMPILE_PART1} kauth ${COMPILE_GENERATED}
59         +${COMPILE_PART1} ptserver ${COMPILE_GENERATED}
60         +${COMPILE_PART1} rxgk ${COMPILE_GENERATED}
61         +${COMPILE_PART1} rxkad ${COMPILE_GENERATED}
62         +${COMPILE_PART1} rxstat ${COMPILE_GENERATED}
63         +${COMPILE_PART1} sys ${COMPILE_GENERATED}
64         +${COMPILE_PART1} ubik ${COMPILE_GENERATED}
65         +${COMPILE_PART1} update ${COMPILE_GENERATED}
66         +${COMPILE_PART1} vlserver ${COMPILE_GENERATED}
67         +${COMPILE_PART1} volser ${COMPILE_GENERATED}
68         +${COMPILE_PART1} config ${COMPILE_PART2A} generated_clean
69         +${COMPILE_PART1} roken ${COMPILE_PART2A} clean
70         +${COMPILE_PART1} crypto/hcrypto ${COMPILE_PART2A} clean
71         +${COMPILE_PART1} opr ${COMPILE_PART2A} clean
72
73 install: all install_dirs
74         $(MAKE) build COMPILE_PART2B=install
75
76 install_nolibafs: all_nolibafs install_dirs
77         $(MAKE) build TARGET=finale_nolibafs COMPILE_PART2B=install
78
79 install_only_libafs: only_libafs install_dirs
80         $(MAKE) build TARGET=libafs COMPILE_PART2B=install
81
82 dest: all dest_dirs
83         $(MAKE) build COMPILE_PART2B=dest
84         -${INSTALL_DATA} ${srcdir}/LICENSE ${DEST}/LICENSE
85
86 dest_nolibafs: all_nolibafs dest_dirs
87         $(MAKE) build TARGET=finale_nolibafs COMPILE_PART2B=dest
88         -${INSTALL_DATA} ${srcdir}/LICENSE ${DEST}/LICENSE
89
90 dest_only_libafs: only_libafs dest_dirs
91         $(MAKE) build TARGET=libafs COMPILE_PART2B=dest
92         -${INSTALL_DATA} ${srcdir}/LICENSE ${DEST}/LICENSE
93
94 packages: dest
95         @case ${SYS_NAME} in \
96         *_darwin_1[2-4] | *_darwin_[6-9]0 | *_darwin_1[0-3]0 ) \
97                 ${COMPILE_PART1} packaging/MacOS && bash ./buildpkg.sh ${DEST} ;; \
98         *_darwin_* ) \
99                 ${COMPILE_PART1} packaging/MacOS && bash ./pkgbuild.sh ${DEST} ;; \
100         hp_ux110 ) \
101                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.00 ;; \
102         hp_ux11i ) \
103                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.11 ;; \
104         ia64_hpux1122 ) \
105                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.22 ;; \
106         ia64_hpux1123 | hp_ux1123) \
107                 ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.23 ;; \
108         *) \
109                 echo Not building packages for ${SYS_NAME} ;; \
110         esac
111
112 ${TOP_INCDIR}/afs ${TOP_INCDIR}/rx ${TOP_INCDIR}/hcrypto ${TOP_INCDIR}/opr ${TOP_LIBDIR} ${TOP_JLIBDIR}:
113         mkdir -p $@
114
115 install_dirs: force
116         mkdir -p ${DESTDIR}${bindir}
117         mkdir -p ${DESTDIR}${sbindir}
118         mkdir -p ${DESTDIR}${libexecdir}/openafs
119         mkdir -p ${DESTDIR}${libdir}/afs
120         mkdir -p ${DESTDIR}${includedir}/afs
121         mkdir -p ${DESTDIR}${includedir}/rx
122         mkdir -p ${DESTDIR}${afskerneldir}
123         mkdir -p ${DESTDIR}${afssrvbindir}
124         mkdir -p ${DESTDIR}${afssrvsbindir}
125         mkdir -p ${DESTDIR}${afssrvlibexecdir}
126         mkdir -p ${DESTDIR}${afsdatadir}/C
127
128 dest_dirs: force
129         mkdir -p ${DEST}/bin
130         mkdir -p ${DEST}/etc
131         mkdir -p ${DEST}/lib/afs
132         mkdir -p ${DEST}/include/afs
133         mkdir -p ${DEST}/include/rx
134         mkdir -p ${DEST}/root.client/usr/vice/etc/C
135         mkdir -p ${DEST}/root.server/etc
136         mkdir -p ${DEST}/root.server/usr/afs/bin
137
138 prelude: ${TOP_INCDIR}/afs ${TOP_INCDIR}/rx ${TOP_INCDIR}/hcrypto \
139         ${TOP_INCDIR}/opr ${TOP_LIBDIR}
140
141 project: cmd comerr
142
143 tests: all
144         +${COMPILE_PART1} tests ${COMPILE_PART2}
145
146 config: prelude
147         +${COMPILE_PART1} config ${COMPILE_PART2}
148
149 procmgmt: $(DIR_roken) config
150         +${COMPILE_PART1} procmgmt ${COMPILE_PART2}
151
152 opr: config hcrypto $(DIR_roken)
153         +${COMPILE_PART1} opr ${COMPILE_PART2}
154
155 util: opr $(DIR_roken) procmgmt hcrypto lwp
156         +${COMPILE_PART1} util ${COMPILE_PART2}
157
158 libafscp: util afs volser vlserver rx auth fsint
159         +${COMPILE_PART1} libafscp ${COMPILE_PART2}
160
161 audit: util rx rxkad fsint
162         +${COMPILE_PART1} audit ${COMPILE_PART2} #TODO
163
164 comerr: util $(DIR_roken)
165         +${COMPILE_PART1} comerr ${COMPILE_PART2}
166
167 cmd: comerr
168         +@case ${SYS_NAME} in \
169         sgi_6* | sun*_5[789] | sun*_51[01] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \
170                 ${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \
171         *) \
172                 ${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \
173         esac
174
175 hcrypto: config $(DIR_roken)
176         +${COMPILE_PART1} crypto/hcrypto ${COMPILE_PART2}
177
178 rfc3961: config hcrypto
179         +${COMPILE_PART1} crypto/rfc3961 ${COMPILE_PART2}
180
181 lwp: opr $(DIR_roken) lwp_depinstall
182         +${COMPILE_PART1} lwp ${COMPILE_PART2}
183
184 roken: config
185         +${COMPILE_PART1} roken ${COMPILE_PART2}
186
187 rxgen: $(DIR_roken) config
188         +${COMPILE_PART1} rxgen ${COMPILE_PART2}
189
190 rx: config lwp rxgen rx_depinstall util
191         +${COMPILE_PART1} rx ${COMPILE_PART2}
192
193 rxstat: rx rxstat_depinstall
194         +${COMPILE_PART1} rxstat ${COMPILE_PART2}
195
196 rxtests: rxdebug
197 rxdebug: rx sys
198         +${COMPILE_PART1} rxdebug ${COMPILE_PART2}
199
200 fsint: cmd comerr rxgen rx lwp fsint_depinstall
201         +${COMPILE_PART1} fsint ${COMPILE_PART2}
202
203 export2: project
204
205 export:
206         @case ${SYS_NAME} in \
207         rs_aix*) \
208                 ${MAKE} export_build ; \
209         esac
210
211 export_build: fsint
212         +${COMPILE_PART1} export ${COMPILE_PART2}
213
214 afs: config export comerr afs_depinstall
215         +${COMPILE_PART1} afs ${COMPILE_PART2}
216
217 sys: cmd comerr afs hcrypto rx rxstat fsint sys_depinstall
218         +${COMPILE_PART1} sys ${COMPILE_PART2}
219
220 rxgk: cmd comerr hcrypto rx rxgk_depinstall
221         +${COMPILE_PART1} rxgk ${COMPILE_PART2}
222
223 rxkad: cmd comerr hcrypto rfc3961 rx rxkad_depinstall
224         +${COMPILE_PART1} rxkad ${COMPILE_PART2}
225
226 auth: cmd comerr hcrypto lwp rx rxkad audit sys auth_depinstall
227         +${COMPILE_PART1} auth ${COMPILE_PART2}
228
229 ubik: cmd comerr auth ubik_depinstall sys
230         +${COMPILE_PART1} ubik ${COMPILE_PART2}
231
232 tubik: ubik libafsrpc libafsauthent
233         +case ${SYS_NAME} in \
234         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
235                 ${COMPILE_PART1} tubik ${COMPILE_PART2} ;; \
236         *) \
237                 echo Not building MT ubik for ${SYS_NAME} ;; \
238         esac
239
240 ubiktests: ubik
241
242 ptserver: cmd comerr ubik cmd comerr auth audit ptserver_depinstall
243         +${COMPILE_PART1} ptserver ${COMPILE_PART2}
244
245 tptserver: cmd comerr ptserver tubik libafsrpc libafsauthent
246         +case ${SYS_NAME} in \
247         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
248                 ${COMPILE_PART1} tptserver ${COMPILE_PART2} ;; \
249         *) \
250                 echo Not building MT ptserver for ${SYS_NAME} ;; \
251         esac
252
253 kauth: cmd comerr ubik cmd auth comerr ptserver audit libacl kauth_depinstall \
254         sys_depinstall
255         +${COMPILE_PART1} kauth ${COMPILE_PART2}
256
257 libacl: cmd comerr ptserver libacl_depinstall
258         +${COMPILE_PART1} libacl ${COMPILE_PART2}
259
260 dir: cmd comerr libacl dir_depinstall
261         +${COMPILE_PART1} dir ${COMPILE_PART2}
262
263 vol: cmd comerr dir afs $(DIR_roken)
264         +${COMPILE_PART1} vol ${COMPILE_PART2}
265
266 tsalvaged: vol libafsrpc libafsauthent cmd util
267         +case ${SYS_NAME} in \
268                 alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[fn]bsd*|*_darwin_*) \
269                         ${COMPILE_PART1} tsalvaged ${COMPILE_PART2} ;; \
270                 *_darwin_*) \
271                         ${COMPILE_PART1} tsalvaged  ${COMPILE_PART2} ;; \
272                 *) \
273                         echo Not building MT tsalvaged for ${SYS_NAME} ;; \
274         esac
275
276
277 vlserver: cmd comerr vol audit vlserver_depinstall
278         +${COMPILE_PART1} vlserver ${COMPILE_PART2}
279
280 tvlserver: cmd comerr vol audit tubik libafsrpc libafsauthent \
281         tvlserver_depinstall
282         +case ${SYS_NAME} in \
283         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
284                 ${COMPILE_PART1} tvlserver ${COMPILE_PART2} ;; \
285         *) \
286                 echo Not building MT tvlserver for ${SYS_NAME} ;; \
287         esac
288
289
290 viced: cmd comerr vlserver tvlserver libafsrpc libafsauthent audit
291         +${COMPILE_PART1} viced ${COMPILE_PART2}
292
293 dviced: cmd comerr viced vlserver tvlserver libafsrpc libafsauthent
294         +case ${SYS_NAME} in \
295         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
296                 ${COMPILE_PART1} dviced ${COMPILE_PART2} ;; \
297         *) \
298                 echo Not building DAFS viced for ${SYS_NAME} ;; \
299         esac
300
301 volser: cmd comerr usd kauth vlserver audit
302         +${COMPILE_PART1} volser ${COMPILE_PART2}
303
304 tvolser: project viced usd libafsrpc libafsauthent volser
305         +@case ${SYS_NAME} in                                           \
306         *_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*)   \
307                 ${COMPILE_PART1} tvolser ${COMPILE_PART2} ;;            \
308         *)                                                              \
309                 echo Not building MT volser for ${SYS_NAME} ;;          \
310         esac
311
312 dvolser: project viced usd libafsrpc libafsauthent volser
313         +@case ${SYS_NAME} in                                           \
314         *_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*)   \
315                 ${COMPILE_PART1} dvolser ${COMPILE_PART2} ;;            \
316         *)                                                              \
317                 echo Not building DAFS volser for ${SYS_NAME} ;;          \
318         esac
319
320 rxosdsrc: rxgen
321         +${COMPILE_PART1} rxosd ${COMPILE_PART2A} source
322
323 venus: cmd comerr volser ptserver libafscp libafsauthent
324         +${COMPILE_PART1} venus ${COMPILE_PART2}
325 venustests: venus
326         +${COMPILE_PART1} venus/test ${COMPILE_PART2}
327
328 afsd: cmd comerr sys kauth libafsauthent @CLIENT_UAFS_DEP@
329         +${COMPILE_PART1} afsd ${COMPILE_PART2}
330
331 gtx: cmd comerr auth kauth
332         +set -x; \
333         if test "@LIB_curses@"; then \
334                 ${COMPILE_PART1} gtx ${COMPILE_PART2} ; \
335         else \
336                 echo Not building gtx, because no curses-headers found. ; \
337         fi
338
339 fsprobe: cmd comerr util fsint volser
340         +${COMPILE_PART1} fsprobe ${COMPILE_PART2}
341
342 scout: cmd comerr gtx fsprobe
343         +if test "@LIB_curses@"; then \
344                 ${COMPILE_PART1} scout ${COMPILE_PART2} ; \
345         else \
346                 echo Not building scout, because no curses-headers found. ; \
347         fi
348
349 uss: hcrypto kauth cmd comerr rx vlserver vol volser
350         +${COMPILE_PART1} uss ${COMPILE_PART2}
351
352 bozo: cmd comerr audit auth kauth volser
353         +${COMPILE_PART1} bozo ${COMPILE_PART2}
354
355 vfsck:  vol
356         +set -x; \
357         case ${SYS_NAME} in \
358         sgi_* | *linux* | rs_aix* | *_darwin* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* ) \
359                 echo skip vfsck for ${SYS_NAME} ;; \
360          * ) \
361                 ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
362         esac
363
364 pam: auth libafsauthent
365         +set -x; \
366         if test "@HAVE_PAM@" = "yes"; then \
367                 ${COMPILE_PART1} pam ${COMPILE_PART2} ; \
368         else \
369                 echo Skipping pam for ${SYS_NAME} ; \
370         fi
371
372 tsm41: cmd comerr kauth rxkad
373         +set -x; \
374         case ${SYS_NAME} in \
375         rs_aix* ) \
376                 ${COMPILE_PART1} tsm41 ${COMPILE_PART2} ;; \
377         * ) \
378                 echo Skipping tsm41 for ${SYS_NAME} ;; \
379         esac
380
381 aklog: auth comerr ptserver libafsauthent
382         +set -x; \
383         if test "@BUILD_KRB5@" = "yes"; then \
384                 ${COMPILE_PART1} aklog ${COMPILE_PART2} ; \
385         else \
386                 echo Skipping aklog for ${SYS_NAME} ; \
387         fi
388
389 authtools: pam tsm41 platform aklog
390
391 platform: config cmd vol
392         +${COMPILE_PART1} platform ${COMPILE_PART2}
393
394 tools: config audit volser vlserver
395         +${COMPILE_PART1} tools ${COMPILE_PART2}
396
397 man-pages: config
398         +if test -d "doc/man-pages" ; then \
399                 cd doc/man-pages ${COMPILE_PART2} ; \
400         fi
401
402 #
403 # _depinstall targets - only build and install headers/sources that are
404 #                       needed by libafs/libuafs
405 #
406 # encode dependencies within the _depinstall targets as required
407 #
408 lwp_depinstall: config
409         +${COMPILE_PART1} lwp ${COMPILE_DEPINSTALL}
410
411 rx_depinstall: config
412         +${COMPILE_PART1} rx ${COMPILE_DEPINSTALL}
413
414 rxgk_depinstall: config comerr
415         +${COMPILE_PART1} rxgk ${COMPILE_DEPINSTALL}
416
417 rxkad_depinstall: config comerr
418         +${COMPILE_PART1} rxkad ${COMPILE_DEPINSTALL}
419
420 ubik_depinstall: config comerr rxgen
421         +${COMPILE_PART1} ubik ${COMPILE_DEPINSTALL}
422
423 vlserver_depinstall: config rxgen ubik_depinstall auth_depinstall
424         +${COMPILE_PART1} vlserver ${COMPILE_DEPINSTALL}
425
426 tvlserver_depinstall: config rxgen ubik_depinstall auth_depinstall
427         +${COMPILE_PART1} tvlserver ${COMPILE_DEPINSTALL}
428
429 auth_depinstall: config rxgen comerr
430         +${COMPILE_PART1} auth ${COMPILE_DEPINSTALL}
431
432 fsint_depinstall: config rxgen
433         +${COMPILE_PART1} fsint ${COMPILE_DEPINSTALL}
434
435 rxstat_depinstall: config rxgen
436         +${COMPILE_PART1} rxstat ${COMPILE_DEPINSTALL}
437
438 libacl_depinstall: config
439         +${COMPILE_PART1} libacl ${COMPILE_DEPINSTALL}
440
441 afs_depinstall: config comerr
442         +${COMPILE_PART1} afs ${COMPILE_DEPINSTALL}
443
444 dir_depinstall: config
445         +${COMPILE_PART1} dir ${COMPILE_DEPINSTALL}
446
447 sys_depinstall: config rxgen
448         +${COMPILE_PART1} sys ${COMPILE_DEPINSTALL}
449
450 kauth_depinstall: config rxgen comerr
451         +${COMPILE_PART1} kauth ${COMPILE_DEPINSTALL}
452
453 ptserver_depinstall: config rxgen comerr
454         +${COMPILE_PART1} ptserver ${COMPILE_DEPINSTALL}
455
456 ${DEST}/bin/dedebug: dedebug
457         ${INSTALL} $? $@
458
459
460 #
461 # libafs build targets
462 #
463 libafs: config export rfc3961 hcrypto lwp_depinstall \
464         rx_depinstall vlserver_depinstall tvlserver_depinstall \
465         rxkad_depinstall fsint_depinstall \
466         libacl_depinstall afs_depinstall dir_depinstall \
467         rxstat_depinstall sys_depinstall auth_depinstall \
468         rxosdsrc
469         ${CONFIGTOOL} src/libafs/MakefileProto.${MKAFS_OSTYPE} src/libafs/Makefile ${SYS_NAME}
470         +${COMPILE_PART1} libafs ${COMPILE_PART2}
471
472 libafs_tree: export lwp_depinstall rx_depinstall vlserver_depinstall \
473                 tvlserver_depinstall rxkad_depinstall fsint_depinstall \
474                 libacl_depinstall afs_depinstall dir_depinstall \
475                 rxstat_depinstall sys_depinstall auth_depinstall
476         ${TOP_SRCDIR}/config/make_libafs_tree.pl \
477                 -sn $(SYS_NAME) \
478                 -os $(MKAFS_OSTYPE) \
479                 -t @TOP_OBJDIR@/libafs_tree \
480                 -o @TOP_OBJDIR@ \
481                 -p @srcdir@
482
483 #
484 # libuafs build targets
485 #
486
487 libuafs_setup: config export
488         ${CONFIGTOOL} src/libuafs/MakefileProto.${MKAFS_OSTYPE} src/libuafs/Makefile ${SYS_NAME}
489
490 libuafs: libuafs_setup vlserver_depinstall tvlserver_depinstall rx_depinstall \
491                 fsint_depinstall auth_depinstall dir_depinstall \
492                 libacl_depinstall rxkad_depinstall ubik_depinstall \
493                 afs_depinstall kauth_depinstall ptserver_depinstall \
494                 rxstat_depinstall lwp_depinstall sys_depinstall cmd hcrypto
495         +set -x; \
496         case ${SYS_NAME} in \
497         hp_ux102* | *_obsd* | *_nbsd*| hp_ux11i | hp_ux112* | ia64_hpux112*) \
498                 echo Skipping libuafs for ${SYS_NAME} ;; \
499         * ) \
500                 ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
501         esac
502
503 afsweb: kauth
504         +${COMPILE_PART1} afsweb ${COMPILE_PART2}
505
506 update: cmd comerr auth sys
507         +${COMPILE_PART1} update ${COMPILE_PART2}
508
509 log: cmd comerr auth sys
510         +${COMPILE_PART1} log ${COMPILE_PART2}
511
512 bu_utils: cmd comerr usd
513         +${COMPILE_PART1} bu_utils ${COMPILE_PART2}
514
515 usd: cmd comerr
516         +${COMPILE_PART1} usd ${COMPILE_PART2}
517
518 bubasics: cmd comerr comerr rx
519         +${COMPILE_PART1} bubasics ${COMPILE_PART2}
520
521 butm: cmd comerr bubasics usd uss
522         +${COMPILE_PART1} butm ${COMPILE_PART2}
523
524 butc: cmd comerr bubasics butm budb bucoord cmd rxgen rx
525         +${COMPILE_PART1} butc ${COMPILE_PART2}
526
527 tbutc: cmd comerr bubasics butm budb bucoord cmd butc libadmin
528         +case ${SYS_NAME} in \
529         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*_darwin_*) \
530                 ${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \
531         *) \
532                 echo Not building MT butc for ${SYS_NAME} ;; \
533         esac
534
535 budb: cmd comerr bubasics uss
536         +${COMPILE_PART1} budb ${COMPILE_PART2}
537
538 tbudb: budb tubik
539         +case ${SYS_NAME} in \
540         alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
541                 ${COMPILE_PART1} tbudb ${COMPILE_PART2} ;; \
542         *) \
543                 echo Not building MT budb for ${SYS_NAME} ;; \
544         esac
545
546 bucoord: cmd comerr bubasics budb volser butm
547         +${COMPILE_PART1} bucoord ${COMPILE_PART2}
548
549 xstat: cmd comerr fsint viced
550         +${COMPILE_PART1} xstat ${COMPILE_PART2}
551
552 afsmonitor: cmd comerr gtx xstat
553         +set -x; \
554         if test "@LIB_curses@"; then \
555                 ${COMPILE_PART1} afsmonitor ${COMPILE_PART2} ; \
556         else \
557                 echo Not building afsmonitor, because no curses-headers found. ; \
558         fi
559
560 tests: rxtests ubiktests rpctestlib viced
561
562 # pthread based user space RX library
563 libafsrpc: comerr fsint hcrypto lwp rx rxkad rxstat sys util
564         +case ${SYS_NAME} in \
565         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
566         ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
567         *_darwin_[1-6][0-9]) \
568                 echo Not building MT libafsrpc for ${SYS_NAME} ;; \
569         *_darwin_*) \
570                 ${COMPILE_PART1} libafsrpc  ${COMPILE_PART2} ;; \
571         *) \
572                 echo Not building MT libafsrpc for ${SYS_NAME} ;; \
573         esac
574
575 libafsauthent: audit auth kauth ubik util sys ptserver volser vlserver libafsrpc
576         +case ${SYS_NAME} in \
577         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
578         ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
579         *_darwin_[1-6][0-9]) \
580                 echo Not building MT libafsauthent for ${SYS_NAME} ;; \
581         *_darwin_*) \
582                 ${COMPILE_PART1} libafsauthent  ${COMPILE_PART2} ;; \
583         *) \
584                 echo Not building MT libafsauthent for ${SYS_NAME} ;; \
585         esac
586
587 kopenafs: config sys
588         +${COMPILE_PART1} kopenafs ${COMPILE_PART2}
589
590 libadmin_real:
591         +${COMPILE_PART1} libadmin ${COMPILE_PART2}
592         +${COMPILE_PART1} libadmin/adminutil ${COMPILE_PART2}
593         +${COMPILE_PART1} libadmin/vos ${COMPILE_PART2}
594         +${COMPILE_PART1} libadmin/client ${COMPILE_PART2}
595         +${COMPILE_PART1} libadmin/kas ${COMPILE_PART2}
596         +${COMPILE_PART1} libadmin/pts ${COMPILE_PART2}
597         +${COMPILE_PART1} libadmin/bos ${COMPILE_PART2}
598         +${COMPILE_PART1} libadmin/cfg ${COMPILE_PART2}
599         +${COMPILE_PART1} libadmin/test ${COMPILE_PART2}
600         +${COMPILE_PART1} libadmin/samples ${COMPILE_PART2}
601
602 libadmin: libafsauthent bozo bubasics
603         +case ${SYS_NAME} in \
604         alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
605                         $(MAKE) libadmin_real ;; \
606         *_darwin_[1-6][0-9]) \
607                 echo Not building MT libadmin for ${SYS_NAME} ;; \
608         *_darwin_*) \
609                         $(MAKE) libadmin_real ;; \
610         *) \
611                 echo Not building MT libadmin for ${SYS_NAME} ;; \
612         esac
613
614 libjafs: libadmin
615         +case ${SYS_NAME} in \
616         alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux110) \
617         ${COMPILE_PART1} JAVA/libjafs  ${COMPILE_PART2} ;; \
618         *) \
619                 echo Not building MT libjafs for ${SYS_NAME} ;; \
620         esac
621
622 libjafsadm: libjafs
623
624 jafs: libjafs
625
626 jafsadm: libjafsadm
627
628 build_tools: config comerr rxgen
629         +${COMPILE_PART1} util ${COMPILE_PART2A} buildtools_clean
630
631 finale: project cmd comerr afsd butc tbutc tbudb @ENABLE_KERNEL_MODULE@ \
632         libuafs audit kauth log ptserver tptserver scout bu_utils ubik uss \
633         bozo @VFSCK@ volser tvolser tsalvaged dviced dvolser libafscp \
634         venus venustests update xstat afsmonitor rxdebug libafsrpc rfc3961 \
635         hcrypto libafsauthent libadmin man-pages tools platform kopenafs \
636         authtools $(DIR_roken)
637         +${COMPILE_PART1} finale ${COMPILE_PART2}
638
639 finale_nolibafs: project cmd comerr afsd butc tbutc tbudb libuafs audit kauth \
640         log ptserver tptserver scout bu_utils ubik tubik uss bozo @VFSCK@ \
641         volser tvolser tsalvaged dviced dvolser libafscp venus venustests \
642         update xstat afsmonitor rxdebug libafsrpc rfc3961 hcrypto \
643         libafsauthent libadmin man-pages tools platform kopenafs \
644         authtools $(DIR_roken)
645         +${COMPILE_PART1} finale ${COMPILE_PART2}
646
647 rpctestlib: util fsint rx opr libafsrpc libafsauthent
648         +${TEST_PART1} rpctestlib  ${COMPILE_PART2}
649
650 check test: finale
651         cd tests && $(MAKE) check
652
653 force:
654
655 TARGET=finale
656 build: force
657         $(MAKE) $(TARGET) DEST=$(DEST) COMPILE_PART2B=$(COMPILE_PART2B) DESTDIR=$(DESTDIR)
658
659 kupdate: updatekdir libafs_setup libuafs_setup
660
661 blibafs:
662         $(MAKE) libafs
663
664 blibuafs:
665         $(MAKE) libuafs
666
667 bwebafs: sys
668         $(MAKE) libuafs
669
670 clean:
671         $(MAKE) clean2
672
673 clean2:
674         -${COMPILE_PART1} config ${COMPILE_CLEAN}
675         -${COMPILE_PART1} procmgmt ${COMPILE_CLEAN}
676         -${COMPILE_PART1} util ${COMPILE_CLEAN}
677         -${COMPILE_PART1} opr ${COMPILE_CLEAN}
678         -${COMPILE_PART1} libafscp ${COMPILE_CLEAN}
679         -${COMPILE_PART1} audit ${COMPILE_CLEAN}
680         -${COMPILE_PART1} comerr ${COMPILE_CLEAN}
681         -${COMPILE_PART1} cmd ${COMPILE_CLEAN}
682         -${COMPILE_PART1} lwp ${COMPILE_CLEAN}
683         -${COMPILE_PART1} rxgen ${COMPILE_CLEAN}
684         -${COMPILE_PART1} rx ${COMPILE_CLEAN}
685         -${COMPILE_PART1} rxstat ${COMPILE_CLEAN}
686         -${COMPILE_PART1} fsint ${COMPILE_CLEAN}
687         -${COMPILE_PART1} export ${COMPILE_CLEAN}
688         -${COMPILE_PART1} afs ${COMPILE_CLEAN}
689         -${COMPILE_PART1} sys ${COMPILE_CLEAN}
690         -${COMPILE_PART1} rxgk ${COMPILE_CLEAN}
691         -${COMPILE_PART1} rxkad ${COMPILE_CLEAN}
692         -${COMPILE_PART1} auth ${COMPILE_CLEAN}
693         -${COMPILE_PART1} ubik ${COMPILE_CLEAN}
694         -${COMPILE_PART1} tubik ${COMPILE_CLEAN}
695         -${COMPILE_PART1} ptserver ${COMPILE_CLEAN}
696         -${COMPILE_PART1} tptserver ${COMPILE_CLEAN}
697         -${COMPILE_PART1} kauth ${COMPILE_CLEAN}
698         -${COMPILE_PART1} libacl ${COMPILE_CLEAN}
699         -${COMPILE_PART1} dir ${COMPILE_CLEAN}
700         -${COMPILE_PART1} vol ${COMPILE_CLEAN}
701         -${COMPILE_PART1} vlserver ${COMPILE_CLEAN}
702         -${COMPILE_PART1} tvlserver ${COMPILE_CLEAN}
703         -${COMPILE_PART1} viced ${COMPILE_CLEAN}
704         -${COMPILE_PART1} dviced ${COMPILE_CLEAN}
705         -${COMPILE_PART1} volser ${COMPILE_CLEAN}
706         -${COMPILE_PART1} tvolser ${COMPILE_CLEAN}
707         -${COMPILE_PART1} dvolser ${COMPILE_CLEAN}
708         -${COMPILE_PART1} tsalvaged ${COMPILE_CLEAN}
709         -${COMPILE_PART1} venus ${COMPILE_CLEAN}
710         -${COMPILE_PART1} venus/test ${COMPILE_CLEAN}
711         -${COMPILE_PART1} afsd ${COMPILE_CLEAN}
712         -${COMPILE_PART1} gtx ${COMPILE_CLEAN}
713         -${COMPILE_PART1} fsprobe ${COMPILE_CLEAN}
714         -${COMPILE_PART1} scout ${COMPILE_CLEAN}
715         -${COMPILE_PART1} uss ${COMPILE_CLEAN}
716         -${COMPILE_PART1} bozo ${COMPILE_CLEAN}
717         -${COMPILE_PART1} vfsck ${COMPILE_CLEAN}
718         -${COMPILE_PART1} tsm41 ${COMPILE_CLEAN}
719         -${COMPILE_PART1} sia ${COMPILE_CLEAN}
720         -${COMPILE_PART1} aklog ${COMPILE_CLEAN}
721         -${COMPILE_PART1} pam ${COMPILE_CLEAN}
722         -${COMPILE_PART1} afsweb ${COMPILE_CLEAN}
723         -${COMPILE_PART1} update ${COMPILE_CLEAN}
724         -${COMPILE_PART1} log ${COMPILE_CLEAN}
725         -${COMPILE_PART1} bu_utils ${COMPILE_CLEAN}
726         -${COMPILE_PART1} usd ${COMPILE_CLEAN}
727         -${COMPILE_PART1} bubasics ${COMPILE_CLEAN}
728         -${COMPILE_PART1} butm ${COMPILE_CLEAN}
729         -${COMPILE_PART1} butc ${COMPILE_CLEAN}
730         -${COMPILE_PART1} tbutc ${COMPILE_CLEAN}
731         -${COMPILE_PART1} budb ${COMPILE_CLEAN}
732         -${COMPILE_PART1} tbudb ${COMPILE_CLEAN}
733         -${COMPILE_PART1} bucoord ${COMPILE_CLEAN}
734         -${COMPILE_PART1} xstat ${COMPILE_CLEAN}
735         -${COMPILE_PART1} afsmonitor ${COMPILE_CLEAN}
736         -${COMPILE_PART1} rxdebug ${COMPILE_CLEAN}
737         -${COMPILE_PART1} libafsrpc ${COMPILE_CLEAN}
738         -${COMPILE_PART1} libafsauthent ${COMPILE_CLEAN}
739         -${COMPILE_PART1} kopenafs ${COMPILE_CLEAN}
740         -${COMPILE_PART1} tools ${COMPILE_CLEAN}
741         -${COMPILE_PART1} platform ${COMPILE_CLEAN}
742         -${COMPILE_PART1} libadmin ${COMPILE_CLEAN}
743         -${COMPILE_PART1} libadmin/adminutil ${COMPILE_CLEAN}
744         -${COMPILE_PART1} libadmin/client ${COMPILE_CLEAN}
745         -${COMPILE_PART1} libadmin/vos ${COMPILE_CLEAN}
746         -${COMPILE_PART1} libadmin/kas ${COMPILE_CLEAN}
747         -${COMPILE_PART1} libadmin/pts ${COMPILE_CLEAN}
748         -${COMPILE_PART1} libadmin/bos ${COMPILE_CLEAN}
749         -${COMPILE_PART1} libadmin/cfg ${COMPILE_CLEAN}
750         -${COMPILE_PART1} libadmin/test ${COMPILE_CLEAN}
751         -${COMPILE_PART1} libadmin/samples ${COMPILE_CLEAN}
752         -${COMPILE_PART1} JAVA/libjafs ${COMPILE_CLEAN}
753         -${COMPILE_PART1} finale ${COMPILE_CLEAN}
754         -${COMPILE_PART1} libafs ${COMPILE_CLEAN}
755         -${COMPILE_PART1} libuafs ${COMPILE_CLEAN}
756         -${COMPILE_PART1} rxosd ${COMPILE_CLEAN}
757         -${COMPILE_PART1} tests ${COMPILE_CLEAN}
758         -${COMPILE_PART1} crypto/hcrypto ${COMPILE_CLEAN}
759         -${COMPILE_PART1} roken ${COMPILE_CLEAN}
760         -${COMPILE_PART1} crypto/rfc3961 ${COMPILE_CLEAN}
761         -(cd src; /bin/rm cscope.out)
762         -(cd src/libafs; /bin/rm -rf afs afsint config rx)
763         -(cd src/libuafs; /bin/rm -rf afs afsint config rx)
764         -(cd tests ${COMPILE_CLEAN})
765         -/bin/rm -rf ${TOP_INCDIR} ${TOP_LIBDIR} ${TOP_JLIBDIR}
766         -/bin/rm -rf libafs_tree ${SYS_NAME}
767
768 dist:
769         mkdir -p packages
770         ./build-tools/make-release --dir=packages HEAD
771
772 srpm:
773         (cd packages && ../src/packaging/RedHat/makesrpm.pl *-src.tar.bz2 *-doc.tar.bz2)
774
775 dox:
776         if test "x$(DOXYGEN)" != "x"; then \
777             mkdir -p doc/doxygen/output && $(DOXYGEN) doc/doxygen/Doxyfile; \
778         fi
779
780 distclean: clean
781         /bin/rm -rf lib include packages
782         /bin/rm -f config.log config.cache config.status \
783         src/config/afsconfig.h src/config/stamp-h1 \
784         src/libafs/Makefile \
785         src/libuafs/Makefile \
786         Makefile \
787         src/afs/Makefile \
788         src/afsd/Makefile \
789         src/afsmonitor/Makefile \
790         src/afsweb/Makefile \
791         src/aklog/Makefile \
792         src/audit/Makefile \
793         src/auth/Makefile \
794         src/auth/test/Makefile \
795         src/bozo/Makefile \
796         src/bozo/test/Makefile \
797         src/bu_utils/Makefile \
798         src/bubasics/Makefile \
799         src/bucoord/Makefile \
800         src/budb/Makefile \
801         src/tbudb/Makefile \
802         src/butc/Makefile \
803         src/butm/Makefile \
804         src/cmd/Makefile \
805         src/cmd/test/Makefile \
806         src/comerr/Makefile \
807         src/comerr/test/Makefile \
808         src/config/Makefile \
809         src/config/Makefile.config \
810         src/config/Makefile.libtool \
811         src/config/Makefile.lwp \
812         src/config/Makefile.lwptool \
813         src/config/Makefile.pthread \
814         src/config/Makefile.version \
815         src/config/Makefile.version-CML \
816         src/config/Makefile.version-NOCML \
817         src/config/shlib-build \
818         src/config/shlib-install \
819         src/crypto/hcrypto/Makefile \
820         src/crypto/rfc3961/Makefile \
821         src/dir/Makefile \
822         src/dir/test/Makefile \
823         src/dviced/Makefile \
824         src/dvolser/Makefile \
825         src/export/Makefile \
826         src/finale/Makefile \
827         src/fsint/Makefile \
828         src/fsprobe/Makefile \
829         src/gtx/Makefile \
830         src/JAVA/libjafs/Makefile \
831         src/kauth/Makefile \
832         src/kauth/test/Makefile \
833         src/kopenafs/Makefile \
834         src/libacl/Makefile \
835         src/libacl/test/Makefile \
836         src/libadmin/Makefile \
837         src/libadmin/adminutil/Makefile \
838         src/libadmin/bos/Makefile \
839         src/libadmin/cfg/Makefile \
840         src/libadmin/cfg/test/Makefile \
841         src/libadmin/client/Makefile \
842         src/libadmin/kas/Makefile \
843         src/libadmin/pts/Makefile \
844         src/libadmin/samples/Makefile \
845         src/libadmin/test/Makefile \
846         src/libadmin/vos/Makefile \
847         src/libafs/Makefile.common \
848         src/libafs/MakefileProto.${MKAFS_OSTYPE} \
849         ${DARWIN_PLIST} \
850         src/libafsauthent/Makefile \
851         src/libafsrpc/Makefile \
852         src/libuafs/Makefile.common \
853         src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
854         src/log/Makefile \
855         src/log/test/Makefile \
856         src/lwp/Makefile \
857         src/lwp/test/Makefile \
858         src/opr/Makefile \
859         src/packaging/MacOS/OpenAFS-debug.Description.plist \
860         src/packaging/MacOS/OpenAFS-debug.Info.plist \
861         src/packaging/MacOS/OpenAFS.Description.plist \
862         src/packaging/MacOS/OpenAFS.Info.plist \
863         src/packaging/MacOS/OpenAFS.info \
864         src/packaging/MacOS/buildpkg.sh \
865         src/packaging/RedHat/openafs.spec \
866         src/pam/Makefile \
867         src/platform/Makefile \
868         src/platform/${MKAFS_OSTYPE}/Makefile \
869         src/platform/DARWIN/growlagent/Makefile \
870         src/procmgmt/Makefile \
871         src/procmgmt/test/Makefile \
872         src/ptserver/Makefile \
873         src/tptserver/Makefile \
874         src/roken/Makefile \
875         src/rx/Makefile \
876         src/rx/bulk.example/Makefile \
877         src/rx/bulktest/Makefile \
878         src/rx/multi.example/Makefile \
879         src/rx/simple.example/Makefile \
880         src/rx/test/Makefile \
881         src/rxdebug/Makefile \
882         src/rxgen/Makefile \
883         src/rxgk/Makefile \
884         src/rxkad/Makefile \
885         src/rxkad/test/Makefile \
886         src/rxosd/Makefile \
887         src/rxstat/Makefile \
888         src/scout/Makefile \
889         src/sys/Makefile \
890         src/tbutc/Makefile \
891         src/tests/Makefile \
892         src/tests/run-tests \
893         src/tests/auth/Makefile \
894         src/tools/Makefile \
895         src/tools/dumpscan/Makefile \
896         src/tools/rxperf/Makefile \
897         src/tsalvaged/Makefile \
898         src/tsm41/Makefile \
899         src/tvolser/Makefile \
900         src/ubik/Makefile \
901         src/tubik/Makefile \
902         src/update/Makefile \
903         src/usd/Makefile \
904         src/usd/test/Makefile \
905         src/uss/Makefile \
906         src/util/Makefile \
907         src/util/test/Makefile \
908         src/libafscp/Makefile \
909         src/venus/Makefile \
910         src/venus/test/Makefile \
911         src/vfsck/Makefile \
912         src/viced/Makefile \
913         src/vlserver/Makefile \
914         src/tvlserver/Makefile \
915         src/vol/Makefile \
916         src/vol/test/Makefile \
917         src/volser/Makefile \
918         src/xstat/Makefile  \
919         tests/Makefile \
920         tests/rpctestlib/Makefile \
921         tests/tap/Makefile \
922         tests/auth/Makefile \
923         tests/cmd/Makefile \
924         tests/common/Makefile \
925         tests/rx/Makefile \
926         tests/opr/Makefile \
927         tests/util/Makefile \
928         tests/volser/Makefile \
929         src/helper-splint.sh \
930         doc/xml/AdminGuide/Makefile \
931         doc/xml/QuickStartUnix/Makefile \
932         doc/xml/UserGuide/Makefile \
933         doc/xml/AdminRef/Makefile
934         if test -d doc/man-pages ; then \
935             /bin/rm -f doc/man-pages/Makefile doc/man-pages/install-man ; \
936         fi
937         if test -d doc/doxygen ; then \
938             /bin/rm -f doc/doxygen/Doxyfile ; \
939         fi
940
941 pristine: distclean
942         /bin/rm -f src/config/afsconfig.h.in configure configure-libafs \
943         aclocal.m4 \
944         libtool \
945         build-tools/ltmain.sh \
946         src/cf/libtool.m4 \
947         src/cf/ltoptions.m4 \
948         src/cf/ltsugar.m4 \
949         src/cf/ltversion.m4 \
950         src/cf/lt~obsolete.m4
951         if test -d doc/xml ; then \
952             /bin/rm -f doc/xml/mobi-fixup.xsl ; \
953         fi
954         if test -d doc/man-pages ; then \
955             /bin/rm -rf doc/man-pages/man1 \
956                 doc/man-pages/man3 \
957                 doc/man-pages/man5 \
958                 doc/man-pages/man8 ; \
959         fi
960         for i in doc/man-pages/pod*/*.pod.in; do \
961             /bin/rm -f $${i%.in}; \
962         done
963
964 maintainer-clean: pristine