2e141a648b4a070f678413d2f97cea67d6a3e107
[openafs.git] / src / tests / Makefile.in
1 srcdir          = @srcdir@
2 include @TOP_OBJDIR@/src/config/Makefile.config
3 INSTALL = @INSTALL@
4 INSTALL_DATA = @INSTALL_DATA@
5 INSTALL_PROGRAM = @INSTALL_PROGRAM@
6 INSTALL_SCRIPT = @INSTALL_SCRIPT@
7
8 SHELL           = /bin/sh
9
10 CFLAGS          = ${DBG} ${OPTMZ} -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
11 LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
12
13 INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
14 INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
15
16 LIBS=\
17         libdumpscan.a \
18         libxfiles.a \
19         ${TOP_LIBDIR}/libauth.a \
20         ${TOP_LIBDIR}/libaudit.a \
21         ${TOP_LIBDIR}/libvolser.a \
22         ${TOP_LIBDIR}/libvldb.a \
23         ${TOP_LIBDIR}/libubik.a \
24         ${TOP_LIBDIR}/librxkad.a \
25         ${TOP_LIBDIR}/libsys.a \
26         ${TOP_LIBDIR}/librx.a \
27         ${TOP_LIBDIR}/liblwp.a \
28         ${TOP_LIBDIR}/util.a \
29         ${TOP_LIBDIR}/libcom_err.a \
30         ${XLIBS}
31
32 OBJS_afsdump_scan    = afsdump_scan.o repair.o
33 OBJS_afsdump_xsed    = afsdump_xsed.o repair.o
34 OBJS_libxfiles.a     = xfiles.o xf_errs.o xf_printf.o int64.o \
35                        xf_files.o xf_rxcall.o xf_profile.o
36 OBJS_libdumpscan.a   = primitive.o util.o dumpscan_errs.o parsetag.o \
37                        parsedump.o parsevol.o parsevnode.o dump.o \
38                        directory.o pathname.o backuphdr.o stagehdr.o
39
40 TARGETS = libxfiles.a libdumpscan.a \
41           afsdump_scan afsdump_dirlist afsdump_extract dumptool
42
43 all: run-tests OpenAFS/Dirpath.pm libxfiles.a libdumpscan.a $(TEST_PROGRAMS)\
44         afsdump_scan afsdump_dirlist afsdump_extract dumptool OpenAFS/Dirpath.sh
45         @chmod +x run-tests
46
47 afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan)
48         $(CC) $(CFLAGS) $(LDFLAGS) -o afsdump_scan $(OBJS_afsdump_scan) $(LIBS)
49
50 afsdump_xsed: libxfiles.a libdumpscan.a $(OBJS_afsdump_xsed)
51         $(CC) $(CFLAGS) $(LDFLAGS) -o afsdump_xsed $(OBJS_afsdump_xsed) $(LIBS)
52
53 afsdump_dirlist: libxfiles.a libdumpscan.a afsdump_dirlist.o
54         $(CC) $(CFLAGS) $(LDFLAGS) -o afsdump_dirlist afsdump_dirlist.o $(LIBS)
55
56 afsdump_extract: libxfiles.a libdumpscan.a afsdump_extract.o
57         $(CC) $(CFLAGS) $(LDFLAGS) -o afsdump_extract afsdump_extract.o $(LIBS)
58
59 null-search: libxfiles.a libdumpscan.a null-search.c
60         $(CC) $(CFLAGS) $(LDFLAGS) -o null-search null-search.c $(LIBS)
61
62 dumptool: dumptool.c
63         $(CC) $(CFLAGS) $(LDFLAGS) -o dumptool dumptool.c
64
65 libxfiles.a: $(OBJS_libxfiles.a)
66         -rm -f libxfiles.a
67         $(AR) r libxfiles.a $(OBJS_libxfiles.a)
68         $(RANLIB) libxfiles.a
69
70 libdumpscan.a: $(OBJS_libdumpscan.a)
71         -rm -f libdumpscan.a
72         $(AR) r libdumpscan.a $(OBJS_libdumpscan.a)
73         $(RANLIB) libdumpscan.a
74
75 xf_errs.c xf_errs.h: xf_errs.et
76         $(COMPILE_ET) xf_errs.et
77
78 dumpscan_errs.c dumpscan_errs.h: dumpscan_errs.et
79         $(COMPILE_ET) dumpscan_errs.et
80
81 util.o xfiles.o xf_files.o: xf_errs.h
82 backuphdr.o directory.o parsedump.o parsetag.o: dumpscan_errs.h
83 parsevnode.o parsevol.o pathname.o stagehdr.o:  dumpscan_errs.h
84 util.o:                                         dumpscan_errs.h
85
86 # repair addresses the same storage as two different types of structs at the
87 # same time.
88 repair.o: repair.c dumpscan_errs.h
89         $(CCOBJ) $(CFLAGS) @CFLAGS_NOSTRICT@ -c ${srcdir}/repair.c
90
91 ${TOP_LIBDIR}/libxfiles.a: libxfiles.a
92         ${INSTALL_DATA} $? $@
93
94 ${TOP_LIBDIR}/libdumpscan.a: libdumpscan.a
95         ${INSTALL_DATA} $? $@
96
97 SYS_LIBS        = ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a
98
99 AUTH_LIBS       = ${TOP_LIBDIR}/libauth.a ${SYS_LIBS}
100
101 INT_LIBS        = ${TOP_LIBDIR}/libafsint.a ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/util.a 
102
103 TEST_PROGRAMS = write-ro-file hello-world read-vs-mmap read-vs-mmap2     \
104                 mmap-and-read large-dir large-dir2 large-dir3 mountpoint \
105                 test-setgroups test-setpag hardlink1 hardlink2 mkdir2    \
106                 create-files create-symlinks create-dirs dup2-and-unlog  \
107                 readdir-vs-lstat read-write create-remove mkdir3         \
108                 symlink echo-n test-parallel1 test-parallel2 create-stat \
109                 kill-softly kill-softer rm-rf exit-wo-close              \
110                 mmap-vs-read mmap-vs-read2 strange-characters-c pine     \
111                 append-over-page write-ucc utime-dir mmap-shared-write   \
112                 rename5 rename-under-feet write-closed write-closed2     \
113                 truncate fchmod make-page utime-file rename6             \
114                 write3 still-there-p write-large afscp hardlink4         \
115                 intr-read asu truncate-files mmap-cat blocks-new-file    \
116                 fsx write-rand
117
118 TEST_OBJS     = write-ro-file.o read-vs-mmap.o read-vs-mmap2.o             \
119                 mmap-and-read.o large-dir.o large-dir2.o large-dir3.o      \
120                 test-setgroups.o test-setpag.o hardlink1.o hardlink2.o     \
121                 mkdir2.o create-files.o create-symlinks.o create-dirs.o    \
122                 dup2-and-unlog.o readdir-vs-lstat.o read-write.o           \
123                 create-remove.o symlink.o echo-n.o test-parallel1.o        \
124                 test-parallel1.o mkdir3.o rename6.o                        \
125                 create-stat.o kill-softly.o kill-softer.o rm-rf.o          \
126                 exit-wo-close.o mmap-vs-read.o mmap-vs-read2.o             \
127                 strange-characters-c.o pine.o append-over-page.o           \
128                 write-ucc.o utime-dir.o mmap-shared-write.o rename5.o      \
129                 rename-under-feet.o write-closed.o write-closed2.o         \
130                 truncate.o fchmod.o make-page.o utime-file.o               \
131                 write3.o still-there-p.o write-large.o hardlink4.o         \
132                 intr-read.o asu.o truncate-files.o mmap-cat.o              \
133                 blocks-new-file.o fsx.o afscp.o afscp_callback.o           \
134                 write-rand.o
135
136 TEST_SRCS     = write-ro-file.c read-vs-mmap.c read-vs-mmap2.c             \
137                 mmap-and-read.c large-dir.c large-dir2.c large-dir3.c      \
138                 test-setgroups.c test-setpag.c hardlink1.c hardlink2.c     \
139                 mkdir2.c create-files.c create-symlinks.c create-dirs.c    \
140                 dup2-and-unlog.c readdir-vs-lstat.c read-write.c           \
141                 create-remove.c symlink.c echo-n.c test-parallel1.c        \
142                 test-parallel2.c mkdir3.c rename6.c                        \
143                 create-stat.c kill-softly.c kill-softer.c rm-rf.c          \
144                 exit-wo-close.c mmap-vs-read.c mmap-vs-read2.c             \
145                 strange-characters-c.c pine.c append-over-page.c           \
146                 write-ucc.c utime-dir.c mmap-shared-write.c rename5.c      \
147                 rename-under-feet.c write-closed.c write-closed2.c         \
148                 truncate.c fchmod.c make-page.c utime-file.c               \
149                 write3.c still-there-p.c write-large.c hardlink4.c         \
150                 intr-read.c asu.c truncate-files.c mmap-cat.c              \
151                 blocks-new-file.c fsx.c afscp.c afscp_callback.c           \
152                 write-rand.c
153
154 EXTRA_OBJS = err.o errx.o warn.o warnx.o vwarn.o vwarnx.o verr.o verrx.o warnerr.o snprintf.o 
155
156 fsx: fsx.o $(EXTRA_OBJS)
157         $(CC) $(LDFLAGS) -o $@ fsx.o $(EXTRA_OBJS) $(LIBS)
158
159 write-rand: write-rand.o $(EXTRA_OBJS)
160         $(CC) $(LDFLAGS) -o $@ write-rand.o $(EXTRA_OBJS) $(LIBS)
161
162 write-ro-file: write-ro-file.o $(EXTRA_OBJS)
163         $(CC) $(LDFLAGS) -o $@ write-ro-file.o $(EXTRA_OBJS) $(LIBS)
164
165 write-large: write-large.o $(EXTRA_OBJS)
166         $(CC) $(LDFLAGS) -o $@ write-large.o $(EXTRA_OBJS) $(LIBS)
167
168 read-vs-mmap: read-vs-mmap.o $(EXTRA_OBJS)
169         $(CC) $(LDFLAGS) -o $@ read-vs-mmap.o $(EXTRA_OBJS) $(LIBS)
170
171 read-vs-mmap2: read-vs-mmap2.o $(EXTRA_OBJS)
172         $(CC) $(LDFLAGS) -o $@ read-vs-mmap2.o $(EXTRA_OBJS) $(LIBS)
173
174 mmap-vs-read: mmap-vs-read.o $(EXTRA_OBJS)
175         $(CC) $(LDFLAGS) -o $@ mmap-vs-read.o $(EXTRA_OBJS) $(LIBS)
176
177 mmap-vs-read2: mmap-vs-read2.o $(EXTRA_OBJS)
178         $(CC) $(LDFLAGS) -o $@ mmap-vs-read2.o $(EXTRA_OBJS) $(LIBS)
179
180 read-write: read-write.o $(EXTRA_OBJS)
181         $(CC) $(LDFLAGS) -o $@ read-write.o $(EXTRA_OBJS) $(LIBS)
182
183 mmap-and-read: mmap-and-read.o $(EXTRA_OBJS)
184         $(CC) $(LDFLAGS) -o $@ mmap-and-read.o $(EXTRA_OBJS) $(LIBS)
185
186 large-dir: large-dir.o $(EXTRA_OBJS)
187         $(CC) $(LDFLAGS) -o $@ large-dir.o $(EXTRA_OBJS) $(LIBS)
188
189 large-dir2: large-dir2.o $(EXTRA_OBJS)
190         $(CC) $(LDFLAGS) -o $@ large-dir2.o $(EXTRA_OBJS) $(LIBS)
191
192 large-dir3: large-dir3.o $(EXTRA_OBJS)
193         $(CC) $(LDFLAGS) -o $@ large-dir3.o $(EXTRA_OBJS) $(LIBS)
194
195 fchmod: fchmod.o $(EXTRA_OBJS)
196         $(CC) $(LDFLAGS) -o $@ fchmod.o $(EXTRA_OBJS) $(LIBS)
197
198 truncate: truncate.o $(EXTRA_OBJS)
199         $(CC) $(LDFLAGS) -o $@ truncate.o $(EXTRA_OBJS) $(LIBS)
200
201 make-page: make-page.o $(EXTRA_OBJS)
202         $(CC) $(LDFLAGS) -o $@ make-page.o $(EXTRA_OBJS) $(LIBS)
203
204 still-there-p: still-there-p.o $(EXTRA_OBJS)
205         $(CC) $(LDFLAGS) -o $@ still-there-p.o $(EXTRA_OBJS) $(LIBS)
206
207 intr-read: intr-read.o $(EXTRA_OBJS)
208         $(CC) $(LDFLAGS) -o $@ intr-read.o $(EXTRA_OBJS) $(LIBS)
209
210 blocks-new-file: blocks-new-file.o $(EXTRA_OBJS)
211         $(CC) $(LDFLAGS) -o $@ blocks-new-file.o $(EXTRA_OBJS) $(LIBS)
212
213 asu: asu.o $(EXTRA_OBJS)
214         $(CC) $(LDFLAGS) -o $@ asu.o $(EXTRA_OBJS) $(LIBS)
215
216 test-setgroups: test-setgroups.o $(EXTRA_OBJS)
217         $(CC) $(LDFLAGS) -o $@ test-setgroups.o $(EXTRA_OBJS) $(SYS_LIBS) $(LIBS)
218
219 test-setpag: test-setpag.o $(EXTRA_OBJS)
220         $(CC) $(LDFLAGS) -o $@ test-setpag.o $(EXTRA_OBJS) $(SYS_LIBS) $(LIBS)
221
222 hardlink1: hardlink1.o $(EXTRA_OBJS)
223         $(CC) $(LDFLAGS) -o $@ hardlink1.o $(EXTRA_OBJS) $(LIBS)
224
225 hardlink2: hardlink2.o $(EXTRA_OBJS)
226         $(CC) $(LDFLAGS) -o $@ hardlink2.o $(EXTRA_OBJS) $(LIBS)
227
228 hardlink4: hardlink4.o $(EXTRA_OBJS)
229         $(CC) $(LDFLAGS) -o $@ hardlink4.o $(EXTRA_OBJS) $(LIBS)
230
231 mkdir2: mkdir2.o $(EXTRA_OBJS)
232         $(CC) $(LDFLAGS) -o $@ mkdir2.o $(EXTRA_OBJS) $(LIBS)
233
234 mkdir3: mkdir3.o $(EXTRA_OBJS)
235         $(CC) $(LDFLAGS) -o $@ mkdir3.o $(EXTRA_OBJS) $(LIBS)
236
237 create-files: create-files.o $(EXTRA_OBJS)
238         $(CC) $(LDFLAGS) -o $@ create-files.o $(EXTRA_OBJS) $(LIBS)
239
240 create-symlinks: create-symlinks.o $(EXTRA_OBJS)
241         $(CC) $(LDFLAGS) -o $@ create-symlinks.o $(EXTRA_OBJS) $(LIBS)
242
243 create-dirs: create-dirs.o $(EXTRA_OBJS)
244         $(CC) $(LDFLAGS) -o $@ create-dirs.o $(EXTRA_OBJS) $(LIBS)
245
246 create-remove: create-remove.o $(EXTRA_OBJS)
247         $(CC) $(LDFLAGS) -o $@ create-remove.o $(EXTRA_OBJS) $(LIBS)
248
249 dup2-and-unlog: dup2-and-unlog.o $(EXTRA_OBJS)
250         $(CC) $(LDFLAGS) -o $@ dup2-and-unlog.o  $(EXTRA_OBJS) $(AUTH_LIBS) $(LIBS)
251
252 readdir-vs-lstat: readdir-vs-lstat.o $(EXTRA_OBJS)
253         $(CC) $(LDFLAGS) -o $@ readdir-vs-lstat.o $(EXTRA_OBJS) $(LIBS)
254
255 symlink: symlink.o $(EXTRA_OBJS)
256         $(CC) $(LDFLAGS) -o $@ symlink.o $(EXTRA_OBJS) $(LIBS)
257
258 echo-n: echo-n.o $(EXTRA_OBJS)
259         $(CC) $(LDFLAGS) -o $@ echo-n.o $(EXTRA_OBJS)
260
261 test-parallel1: test-parallel1.o $(EXTRA_OBJS)
262         $(CC) $(LDFLAGS) -o $@ test-parallel1.o $(EXTRA_OBJS) $(LIBS)
263
264 test-parallel2: test-parallel2.o $(EXTRA_OBJS)
265         $(CC) $(LDFLAGS) -o $@ test-parallel2.o $(EXTRA_OBJS) $(LIBS)
266
267 create-stat: create-stat.o fs_lib.o $(EXTRA_OBJS)
268         $(CC) $(LDFLAGS) -o $@ create-stat.o fs_lib.o $(EXTRA_OBJS) $(SYS_LIBS) $(LIBS)
269
270 kill-softly: kill-softly.o $(EXTRA_OBJS)
271         $(CC) $(LDFLAGS) -o $@ kill-softly.o $(EXTRA_OBJS) $(LIBS)
272
273 kill-softer: kill-softer.o $(EXTRA_OBJS)
274         $(CC) $(LDFLAGS) -o $@ kill-softer.o $(EXTRA_OBJS) $(LIBS)
275
276 rm-rf: rm-rf.o fs_lib.o $(EXTRA_OBJS)
277         $(CC) $(LDFLAGS) -o $@ rm-rf.o fs_lib.o $(EXTRA_OBJS) $(SYS_LIBS) $(LIBS)
278
279 exit-wo-close: exit-wo-close.o $(EXTRA_OBJS)
280         $(CC) $(LDFLAGS) -o $@ exit-wo-close.o $(EXTRA_OBJS) $(LIBS)
281
282 strange-characters-c: strange-characters-c.o $(EXTRA_OBJS)
283         $(CC) $(LDFLAGS) -o $@ strange-characters-c.o $(EXTRA_OBJS) $(LIBS)
284
285 pine: pine.o $(EXTRA_OBJS)
286         $(CC) $(LDFLAGS) -o $@ pine.o $(EXTRA_OBJS) $(LIBS)
287
288 append-over-page: append-over-page.o $(EXTRA_OBJS)
289         $(CC) $(LDFLAGS) -o $@ append-over-page.o $(EXTRA_OBJS) $(LIBS)
290
291 write-ucc: write-ucc.o $(EXTRA_OBJS)
292         $(CC) $(LDFLAGS) -o $@ write-ucc.o $(EXTRA_OBJS) $(LIBS)
293
294 utime-dir: utime-dir.o $(EXTRA_OBJS)
295         $(CC) $(LDFLAGS) -o $@ utime-dir.o $(EXTRA_OBJS) $(LIBS)
296
297 utime-file: utime-file.o $(EXTRA_OBJS)
298         $(CC) $(LDFLAGS) -o $@ utime-file.o $(EXTRA_OBJS) $(LIBS)
299
300 mmap-shared-write: mmap-shared-write.o $(EXTRA_OBJS)
301         $(CC) $(LDFLAGS) -o $@ mmap-shared-write.o $(EXTRA_OBJS) $(LIBS)
302
303 rename5: rename5.o $(EXTRA_OBJS)
304         $(CC) $(LDFLAGS) -o $@ rename5.o $(EXTRA_OBJS) $(LIBS)
305
306 rename6: rename6.o $(EXTRA_OBJS)
307         $(CC) $(LDFLAGS) -o $@ rename6.o $(EXTRA_OBJS) $(LIBS)
308
309 write3: write3.o $(EXTRA_OBJS)
310         $(CC) $(LDFLAGS) -o $@ write3.o $(EXTRA_OBJS) $(LIBS)
311
312 rename-under-feet: rename-under-feet.o $(EXTRA_OBJS)
313         $(CC) $(LDFLAGS) -o $@ rename-under-feet.o $(EXTRA_OBJS) $(LIBS)
314
315 write-closed: write-closed.o $(EXTRA_OBJS)
316         $(CC) $(LDFLAGS) -o $@ write-closed.o $(EXTRA_OBJS) $(LIBS)
317
318 write-closed2: write-closed2.o $(EXTRA_OBJS)
319         $(CC) $(LDFLAGS) -o $@ write-closed2.o $(EXTRA_OBJS) $(SYS_LIBS) $(LIBS)
320
321 truncate-files: truncate-files.o $(EXTRA_OBJS)
322         $(CC) $(LDFLAGS) -o $@ truncate-files.o $(EXTRA_OBJS) $(LIBS)
323
324 mmap-cat: mmap-cat.o $(EXTRA_OBJS)
325         $(CC) $(LDFLAGS) -o $@ mmap-cat.o $(EXTRA_OBJS) $(LIBS)
326
327 run-tests: run-tests.in
328         (cd ../..; CONFIG_FILES=src/tests/run-tests CONFIG_HEADERS= $(SHELL) @TOP_OBJDIR@/config.status)
329         @chmod +x run-tests
330
331 #.c.o:
332 #       $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) -I. $(REALCFLAGS) $<
333
334 afscp: afscp.o afscp_callback.o $(EXTRA_OBJS)
335         $(CC) $(LDFLAGS) -o $@ afscp.o afscp_callback.o $(EXTRA_OBJS) $(INT_LIBS) ${XLIBS}
336
337 hello-world:   hello-world.in
338         sed -e "s!%CC%!$(CC)!" $(srcdir)/hello-world.in > $@
339         chmod +x hello-world
340
341 mountpoint:   mountpoint.in
342         sed -e "s!%bindir%!$(bindir)!" $(srcdir)/mountpoint.in > $@
343         chmod +x mountpoint
344
345 dest:
346
347 install:
348
349 uninstall:
350
351 clean:
352         -rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
353         $(TARGETS) run-tests $(TEST_PROGRAMS) OpenAFS/Dirpath.pm OpenAFS/Dirpath.sh
354
355 include ../config/Makefile.version
356
357 TAGS:   $(TEST_SRCS)
358         etags $(TEST_SRCS)
359
360 check: run-tests $(TEST_PROGRAMS)
361         ./run-tests -all
362
363 check-fast: run-tests $(TEST_PROGRAMS)
364         ./run-tests -all -fast
365
366 # Note: The autoconf variables are not fully expanded
367 #       until make is run so we resort to creating the
368 #       configuration at make time.
369 OpenAFS/Dirpath.pm: Makefile
370         @echo "Creating OpenAFS/Dirpath.pm"
371         @echo "# This is -*- perl -*-"                          >$@
372         @echo "# auto-generated by src/tests/Makefile"          >>$@
373         @echo "# DO NOT EDIT"                                   >>$@
374         @echo "package OpenAFS::Dirpath;"                       >>$@
375         @echo "use strict;"                                     >>$@
376         @echo "use vars qw( @ISA @EXPORT \$$openafsdirpath);"   >>$@
377         @echo "@ISA = qw(Exporter);"                            >>$@
378         @echo "require Exporter;"                               >>$@
379         @echo "@EXPORT = qw(\$$openafsdirpath);"                >>$@
380         @echo ""                                                >>$@
381         @echo "\$$openafsdirpath = {"                           >>$@
382         @echo "  'afsconfdir'       => '@afsconfdir@',"         >>$@
383         @echo "  'viceetcdir'       => '@viceetcdir@',"         >>$@
384         @echo "  'afssrvbindir'     => '@afssrvbindir@',"       >>$@
385         @echo "  'afssrvsbindir'    => '@afssrvsbindir@',"      >>$@
386         @echo "  'afssrvlibexecdir' => '@afssrvlibexecdir@',"   >>$@
387         @echo "  'afsdbdir'         => '@afsdbdir@',"           >>$@
388         @echo "  'afslogsdir'       => '@afslogsdir@',"         >>$@
389         @echo "  'afslocaldir'      => '@afslocaldir@',"        >>$@
390         @echo "  'afsbackupdir'     => '@afsbackupdir@',"       >>$@
391         @echo "  'afsbosconfigdir'  => '@afsbosconfigdir@',"    >>$@
392         @echo "  'ostype'           => '@MKAFS_OSTYPE@',"       >>$@
393         @if test "@afsconfdir@" = "/usr/afs/etc" ; then \
394                 echo "  # transarc paths" ;\
395                 echo "  'cachedir'     => '/usr/vice/cache'," ;\
396                 echo "  'afsddir'      => '/usr/vice/etc'," ;\
397                 echo "  'initdir'      => '/usr/vice/etc',"  ;\
398                 echo "  'afskerneldir' => '/usr/vice/etc/modload'," ;\
399                 echo "  'afswsbindir'  => '/usr/afsws/bin'," ;\
400         else \
401                 echo "  # modern paths" ;\
402                 echo "  'cachedir'     => '@localstatedir@/openafs/cache'," ;\
403                 echo "  'afsddir'      => '@afssrvsbindir@'," ;\
404                 echo "  'initdir'      => '@sysconfdir@',"  ;\
405                 echo "  'afskerneldir' => '@afskerneldir@'," ;\
406                 echo "  'afswsbindir'  => '@afssrvbindir@'," ;\
407         fi >>$@
408         @echo "};"                                              >>$@
409         @echo ""                                                >>$@
410         @echo "1;"                                              >>$@
411
412 OpenAFS/Dirpath.sh: Makefile
413         @echo "Creating OpenAFS/Dirpath.sh"                                     
414         @echo "# auto-generated by src/tests/Makefile"            >$@
415         @echo "# source or '.' in this file in shell"              >>$@
416         @echo "# DO NOT EDIT"                                                      >>$@
417         @echo "  AFSCONFDIR=@afsconfdir@"         >>$@
418         @echo "  VICEETCDIR=@viceetcdir@"         >>$@
419         @echo "  AFSSRVBINDIR=@afssrvbindir@"       >>$@
420         @echo "  AFSSRVSBINDIR=@afssrvsbindir@"      >>$@
421         @echo "  AFSSRVLIBEXECDIR=@afssrvlibexecdir@"   >>$@
422         @echo "  AFSDBDIR=@afsdbdir@"           >>$@
423         @echo "  AFSLOGSDIR=@afslogsdir@"         >>$@
424         @echo "  AFSLOCALDIR=@afslocaldir@"        >>$@
425         @echo "  AFSBACKUPDIR=@afsbackupdir@"       >>$@
426         @echo "  AFSBOSCONFIGDIR=@afsbosconfigdir@"    >>$@
427         @echo "  OSTYPE=@MKAFS_OSTYPE@"       >>$@
428         @if test "@afsconfdir@" = "/usr/afs/etc" ;  then \
429                 echo "# transarc paths" ;\
430                 echo "  CACHEDIR=/usr/vice/cache" ;\
431                 echo "  AFSDDIR=/usr/vice/etc" ;\
432                 echo "  INITDIR=/usr/vice/etc" ; \
433                 echo "  AFSKERNELDIR=/usr/vice/etc/modload" ;\
434                 echo "  AFSWSBINDIR=/usr/afsws/bin" ;\
435         else \
436                 echo "# modern paths" ;\
437             echo "  CACHEDIR=@localstatedir@/openafs/cache" ;\
438             echo "  AFSDDIR=@afssrvsbindir@" ;\
439             echo "  INITDIR=@sysconfdir@"  ;\
440             echo "  AFSKERNELDIR=@afskerneldir@" ;\
441             echo "  AFSWSBINDIR=@afssrvbindir@" ;\
442         fi >>$@
443         @echo "export AFSCONFDIR VICEETCDIR AFSSRVBINDIR AFSSRVSBINDIR" >>$@
444         @echo "export AFSSRVLIBEXECDIR AFSDBDIR AFSLOGSDIR AFSLOCALDIR" >>$@
445         @echo "export AFSBACKUPDIR AFSBOSCONFIGDIR OSTYPE CACHEDIR AFSDDIR" >>$@
446         @echo "export INITDIR AFSKERNELDIR AFSWSBINDIR" >>$@
447
448 .PHONY:         all install clean realclean distclean mostlyclean install uninstall check