support-nested-variables-20011009
[openafs.git] / src / util / 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 DEST=@DEST@
9 TOP_INCDIR=@TOP_INCDIR@
10 TOP_LIBDIR=@TOP_LIBDIR@
11 bindir=@bindir@
12 sbindir=@sbindir@
13 libexecdir=@libexecdir@
14 libdir=@libdir@
15 includedir=@includedir@
16 mandir=@mandir@
17 sysconfdir=@sysconfdir@
18 localstatedir=@localstatedir@
19 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
20 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
21 TOP_SRCDIR=@TOP_SRCDIR@
22 SYS_NAME=@AFS_SYSNAME@
23 prefix=@prefix@
24 exec_prefix=@exec_prefix@
25 afsconfdir=@afsconfdir@
26 viceetcdir=@viceetcdir@
27 afssrvbindir=@afssrvbindir@
28 afssrvsbindir=@afssrvsbindir@
29 afssrvlibexecdir=@afssrvlibexecdir@
30 afsdbdir=@afsdbdir@
31 afslogsdir=@afslogsdir@
32 afslocaldir=@afslocaldir@
33 afsbackupdir=@afsbackupdir@
34 afsbosconfigdir=@afsbosconfigdir@
35
36 SHELL = /bin/sh
37
38 include ../config/Makefile.${SYS_NAME}
39
40 CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I. -I${TOP_INCDIR} ${XCFLAGS}
41 LDFLAGS = ${OPTMZ} ${XLDFLAGS}
42
43 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
44          hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
45          dirpath.o fileutil.o netutils.o flipbase64.o \
46          afs_atomlist.o afs_lhash.o snprintf.o ${REGEX_OBJ}
47
48 all: ukinstall kinstall \
49         ${TOP_INCDIR}/afs/dirpath.h \
50         ${TOP_INCDIR}/afs/pthread_nosigs.h \
51         ${TOP_INCDIR}/afs/assert.h \
52         ${TOP_INCDIR}/afs/errors.h \
53         ${TOP_INCDIR}/afs/vice.h \
54         ${TOP_INCDIR}/afs/remote.h \
55         ${TOP_INCDIR}/afs/ktime.h \
56         ${TOP_INCDIR}/afs/fileutil.h \
57         ${TOP_INCDIR}/afs/netutils.h \
58         ${TOP_INCDIR}/afs/packages.h \
59         ${TOP_INCDIR}/afs/afsutil.h \
60         ${TOP_INCDIR}/afs/pthread_glock.h \
61         ${TOP_INCDIR}/afs/afs_atomlist.h \
62         ${TOP_INCDIR}/afs/afs_lhash.h \
63         ${TOP_INCDIR}/potpourri.h \
64         ${TOP_LIBDIR}/util.a \
65         ${TOP_LIBDIR}/libafsutil.a \
66         sys
67
68 dirpath.h: dirpath.hin Makefile
69         ( sed \
70                 -e "s+@afsconfdir+${afsconfdir}+" \
71                 -e "s+@viceetcdir+${viceetcdir}+" \
72                 -e "s+@afssrvbindir+${afssrvbindir}+" \
73                 -e "s+@afssrvsbindir+${afssrvsbindir}+" \
74                 -e "s+@afssrvlibexecdir+${afssrvlibexecdir}+" \
75                 -e "s+@afsdbdir+${afsdbdir}+" \
76                 -e "s+@afslogsdir+${afslogsdir}+" \
77                 -e "s+@afslocaldir+${afslocaldir}+" \
78                 -e "s+@afsbackupdir+${afsbackupdir}+" \
79                 -e "s+@afsbosconfigdir+${afsbosconfigdir}+" \
80                 dirpath.hin >dirpath.h.tmp && \
81                 mv dirpath.h.tmp dirpath.h )
82
83 util.a: ${objects} AFS_component_version_number.o
84         $(RM) -f util.a
85         $(AR) crv util.a ${objects} AFS_component_version_number.o
86         $(RANLIB) util.a
87
88 volparse.o: volparse.c
89         ${CC} ${CFLAGS} -c volparse.c
90
91 snprintf.o: snprintf.c
92         ${CC} ${CFLAGS} -c snprintf.c
93
94 base64.o: base64.c
95         ${CC} ${CFLAGS} -c base64.c
96
97 hostparse.o: hostparse.c afsutil.h
98         ${CC} ${CFLAGS} -c hostparse.c
99
100 ktime.o: ktime.c
101         ${CC} ${CFLAGS} -c ktime.c
102
103 kreltime.o: kreltime.c
104         ${CC} ${CFLAGS} -c kreltime.c
105
106 get_krbrlm.o: get_krbrlm.c
107         ${CC} ${CFLAGS} -c get_krbrlm.c
108
109 uuid.o: uuid.c
110         ${CC} ${CFLAGS} -c uuid.c
111
112 sys.o: sys.c ${TOP_INCDIR}/afs/param.h AFS_component_version_number.c
113         ${CC} ${CFLAGS} -c sys.c
114
115 sys: sys.o 
116         ${CC} ${LDFLAGS} -o sys sys.o
117
118 isathing.o: isathing.c
119         ${CC} ${CFLAGS} -c isathing.c
120
121 serverLog.o: serverLog.c
122         ${CC} ${CFLAGS} -c serverLog.c
123
124 dirpath.o: dirpath.c dirpath.h
125         ${CC} ${CFLAGS} -c dirpath.c
126
127 fileutil.o: fileutil.c fileutil.h
128         ${CC} ${CFLAGS} -c fileutil.c
129
130 netutils.o: netutils.c netutils.h
131         ${CC} ${CFLAGS} -c netutils.c
132
133 afs_atomlist.o: afs_atomlist.c afs_atomlist.h
134         ${CC} ${CFLAGS} -c afs_atomlist.c
135
136 afs_lhash.o: afs_lhash.c afs_lhash.h afs_atomlist.h
137         ${CC} ${CFLAGS} -c afs_lhash.c
138
139 #
140 # Install targets
141 #
142 KDIR=../libafs/afs
143 UKDIR=../libuafs/afs
144
145 install: \
146         ${DESTDIR}${includedir}/afs/dirpath.h \
147         ${DESTDIR}${includedir}/afs/pthread_nosigs.h \
148         ${DESTDIR}${includedir}/afs/assert.h \
149         ${DESTDIR}${includedir}/afs/errors.h \
150         ${DESTDIR}${includedir}/afs/vice.h \
151         ${DESTDIR}${includedir}/afs/remote.h \
152         ${DESTDIR}${includedir}/afs/ktime.h \
153         ${DESTDIR}${includedir}/afs/fileutil.h \
154         ${DESTDIR}${includedir}/afs/netutils.h \
155         ${DESTDIR}${includedir}/afs/packages.h \
156         ${DESTDIR}${includedir}/afs/afsutil.h \
157         ${DESTDIR}${includedir}/afs/pthread_glock.h \
158         ${DESTDIR}${includedir}/afs/afs_atomlist.h \
159         ${DESTDIR}${includedir}/afs/afs_lhash.h \
160         ${DESTDIR}${includedir}/potpourri.h \
161         ${DESTDIR}${libdir}/afs/util.a \
162         ${DESTDIR}${libdir}/afs/libafsutil.a \
163         ${DESTDIR}${bindir}/sys
164
165 ${TOP_INCDIR}/afs/dirpath.h: dirpath.h
166         ${INSTALL} $? $@
167
168 ${TOP_INCDIR}/afs/pthread_nosigs.h: pthread_nosigs.h
169         ${INSTALL} $? $@
170
171 ${TOP_INCDIR}/afs/assert.h: assert.h
172         ${INSTALL} $? $@
173
174 ${TOP_INCDIR}/afs/errors.h: errors.h
175         ${INSTALL} $? $@
176
177 ${TOP_INCDIR}/afs/vice.h: vice.h
178         ${INSTALL} $? $@
179
180 ${TOP_INCDIR}/afs/remote.h: remote.h
181         ${INSTALL} $? $@
182
183 ${TOP_INCDIR}/afs/ktime.h: ktime.h
184         ${INSTALL} $? $@
185
186 ${TOP_INCDIR}/afs/fileutil.h: fileutil.h
187         ${INSTALL} $? $@
188
189 ${TOP_INCDIR}/afs/netutils.h: netutils.h
190         ${INSTALL} $? $@
191
192 ${TOP_INCDIR}/afs/packages.h: packages.h
193         ${INSTALL} $? $@
194
195 ${TOP_INCDIR}/afs/afsutil.h: afsutil.h
196         ${INSTALL} $? $@
197
198 ${TOP_INCDIR}/afs/pthread_glock.h: pthread_glock.h
199         ${INSTALL} $? $@
200
201 ${TOP_INCDIR}/afs/afs_atomlist.h: afs_atomlist.h
202         ${INSTALL} $? $@
203
204 ${TOP_INCDIR}/afs/afs_lhash.h: afs_lhash.h
205         ${INSTALL} $? $@
206
207 ${TOP_INCDIR}/potpourri.h: potpourri.h
208         ${INSTALL} $? $@
209
210
211 ${TOP_LIBDIR}/util.a: util.a
212         ${INSTALL} $? $@
213
214 ${TOP_LIBDIR}/libafsutil.a: util.a
215         ${INSTALL} $? $@
216
217
218 ${DESTDIR}${includedir}/afs/dirpath.h: dirpath.h
219         ${INSTALL} $? $@
220
221 ${DESTDIR}${includedir}/afs/pthread_nosigs.h: pthread_nosigs.h
222         ${INSTALL} $? $@
223
224 ${DESTDIR}${includedir}/afs/assert.h: assert.h
225         ${INSTALL} $? $@
226
227 ${DESTDIR}${includedir}/afs/errors.h: errors.h
228         ${INSTALL} $? $@
229
230 ${DESTDIR}${includedir}/afs/vice.h: vice.h
231         ${INSTALL} $? $@
232
233 ${DESTDIR}${includedir}/afs/remote.h: remote.h
234         ${INSTALL} $? $@
235
236 ${DESTDIR}${includedir}/afs/ktime.h: ktime.h
237         ${INSTALL} $? $@
238
239 ${DESTDIR}${includedir}/afs/fileutil.h: fileutil.h
240         ${INSTALL} $? $@
241
242 ${DESTDIR}${includedir}/afs/netutils.h: netutils.h
243         ${INSTALL} $? $@
244
245 ${DESTDIR}${includedir}/afs/packages.h: packages.h
246         ${INSTALL} $? $@
247
248 ${DESTDIR}${includedir}/afs/afsutil.h: afsutil.h
249         ${INSTALL} $? $@
250
251 ${DESTDIR}${includedir}/afs/pthread_glock.h: pthread_glock.h
252         ${INSTALL} $? $@
253
254 ${DESTDIR}${includedir}/afs/afs_atomlist.h: afs_atomlist.h
255         ${INSTALL} $? $@
256
257 ${DESTDIR}${includedir}/afs/afs_lhash.h: afs_lhash.h
258         ${INSTALL} $? $@
259
260 ${DESTDIR}${includedir}/potpourri.h: potpourri.h
261         ${INSTALL} $? $@
262
263
264 ${DESTDIR}${libdir}/afs/util.a: util.a
265         ${INSTALL} $? $@
266
267 ${DESTDIR}${libdir}/afs/libafsutil.a: util.a
268         ${INSTALL} $? $@
269
270
271 ${DESTDIR}${bindir}/sys: sys
272         ${INSTALL} $? $@
273
274
275 ${DEST}/include/afs/dirpath.h: dirpath.h
276         ${INSTALL} $? $@
277
278 ${DEST}/include/afs/pthread_nosigs.h: pthread_nosigs.h
279         ${INSTALL} $? $@
280
281 ${DEST}/include/afs/assert.h: assert.h
282         ${INSTALL} $? $@
283
284 ${DEST}/include/afs/errors.h: errors.h
285         ${INSTALL} $? $@
286
287 ${DEST}/include/afs/vice.h: vice.h
288         ${INSTALL} $? $@
289
290 ${DEST}/include/afs/remote.h: remote.h
291         ${INSTALL} $? $@
292
293 ${DEST}/include/afs/ktime.h: ktime.h
294         ${INSTALL} $? $@
295
296 ${DEST}/include/afs/fileutil.h: fileutil.h
297         ${INSTALL} $? $@
298
299 ${DEST}/include/afs/netutils.h: netutils.h
300         ${INSTALL} $? $@
301
302 ${DEST}/include/afs/packages.h: packages.h
303         ${INSTALL} $? $@
304
305 ${DEST}/include/afs/afsutil.h: afsutil.h
306         ${INSTALL} $? $@
307
308 ${DEST}/include/afs/pthread_glock.h: pthread_glock.h
309         ${INSTALL} $? $@
310
311 ${DEST}/include/afs/afs_atomlist.h: afs_atomlist.h
312         ${INSTALL} $? $@
313
314 ${DEST}/include/afs/afs_lhash.h: afs_lhash.h
315         ${INSTALL} $? $@
316
317 ${DEST}/include/potpourri.h: potpourri.h
318         ${INSTALL} $? $@
319
320
321 ${DEST}/lib/afs/util.a: util.a
322         ${INSTALL} $? $@
323
324 ${DEST}/lib/afs/libafsutil.a: util.a
325         ${INSTALL} $? $@
326
327
328 ${DEST}/bin/sys: sys
329         ${INSTALL} $? $@
330
331
332 kinstall: ${KDIR}/vice.h \
333         ${KDIR}/afs_base64.c \
334         ${KDIR}/afs_uuid.c \
335         ${KDIR}/afs_atomlist.c \
336         ${KDIR}/afs_atomlist.h \
337         ${KDIR}/afs_lhash.c \
338         ${KDIR}/afs_lhash.h
339
340 ${KDIR}/vice.h: vice.h
341         ${INSTALL} $? $@
342
343 ${KDIR}/afs_base64.c: base64.c
344         ${INSTALL} $? $@
345
346 ${KDIR}/afs_uuid.c: uuid.c
347         ${INSTALL} $? $@
348
349 ${KDIR}/afs_atomlist.c: afs_atomlist.c
350         ${INSTALL} $? $@
351
352 ${KDIR}/afs_atomlist.h: afs_atomlist.h
353         ${INSTALL} $? $@
354
355 ${KDIR}/afs_lhash.c: afs_lhash.c
356         ${INSTALL} $? $@
357
358 ${KDIR}/afs_lhash.h: afs_lhash.h
359         ${INSTALL} $? $@
360
361 ukinstall: \
362         ${UKDIR}/afs_uuid.c \
363         ${UKDIR}/afs_atomlist.c \
364         ${UKDIR}/afs_atomlist.h \
365         ${UKDIR}/afs_lhash.c \
366         ${UKDIR}/afs_lhash.h \
367         ${UKDIR}/pthread_glock.h \
368         ${UKDIR}/vice.h \
369         ${UKDIR}/errors.h \
370         ${UKDIR}/afsutil.h \
371         ${UKDIR}/dirpath.h \
372         ${UKDIR}/dirpath.c \
373         ${UKDIR}/fileutil.h \
374         ${UKDIR}/fileutil.c \
375         ${UKDIR}/netutils.h \
376         ${UKDIR}/netutils.c \
377         ${UKDIR}/casestrcpy.c \
378         ${UKDIR}/hostparse.c 
379
380 ${UKDIR}/errors.h: errors.h
381         ${INSTALL} $? $@
382
383 ${UKDIR}/afsutil.h: afsutil.h
384         ${INSTALL} $? $@
385
386 ${UKDIR}/dirpath.h: dirpath.h
387         ${INSTALL} $? $@
388
389 ${UKDIR}/dirpath.c: dirpath.c
390         ${INSTALL} $? $@
391
392 ${UKDIR}/fileutil.h: fileutil.h
393         ${INSTALL} $? $@
394
395 ${UKDIR}/fileutil.c: fileutil.c
396         ${INSTALL} $? $@
397
398 ${UKDIR}/netutils.h: netutils.h
399         ${INSTALL} $? $@
400
401 ${UKDIR}/netutils.c: netutils.c
402         ${INSTALL} $? $@
403
404 ${UKDIR}/casestrcpy.c: casestrcpy.c
405         ${INSTALL} $? $@
406
407 ${UKDIR}/hostparse.c: hostparse.c
408         ${INSTALL} $? $@
409
410 ${UKDIR}/pthread_glock.h: pthread_glock.h
411         ${INSTALL} $? $@
412
413 ${UKDIR}/vice.h: vice.h
414         ${INSTALL} $? $@
415
416 ${UKDIR}/afs_uuid.c: uuid.c
417         ${INSTALL} $? $@
418
419 ${UKDIR}/afs_atomlist.c: afs_atomlist.c
420         ${INSTALL} $? $@
421
422 ${UKDIR}/afs_atomlist.h: afs_atomlist.h
423         ${INSTALL} $? $@
424
425 ${UKDIR}/afs_lhash.c: afs_lhash.c
426         ${INSTALL} $? $@
427
428 ${UKDIR}/afs_lhash.h: afs_lhash.h
429         ${INSTALL} $? $@
430
431 #
432 # Misc targets
433 #
434
435 clean:
436         $(RM) -f ${objects} sys dirpath.h
437         $(RM) -f util.a *.o core AFS_component_version_number.c
438
439 test:
440         cd test; $(MAKE)
441
442 include ../config/Makefile.version
443
444 dest: \
445         ${DEST}/include/afs/dirpath.h \
446         ${DEST}/include/afs/pthread_nosigs.h \
447         ${DEST}/include/afs/assert.h \
448         ${DEST}/include/afs/errors.h \
449         ${DEST}/include/afs/vice.h \
450         ${DEST}/include/afs/remote.h \
451         ${DEST}/include/afs/ktime.h \
452         ${DEST}/include/afs/fileutil.h \
453         ${DEST}/include/afs/netutils.h \
454         ${DEST}/include/afs/packages.h \
455         ${DEST}/include/afs/afsutil.h \
456         ${DEST}/include/afs/pthread_glock.h \
457         ${DEST}/include/afs/afs_atomlist.h \
458         ${DEST}/include/afs/afs_lhash.h \
459         ${DEST}/include/potpourri.h \
460         ${DEST}/lib/afs/util.a \
461         ${DEST}/lib/afs/libafsutil.a \
462         ${DEST}/bin/sys
463