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