make-install-support-for-transarc-and-prefix-style-universes-20010907
[openafs.git] / src / afs / 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 prefix=@prefix@
12 exec_prefix=@exec_prefix@
13 bindir=@bindir@
14 sbindir=@sbindir@
15 libexecdir=@libexecdir@
16 libdir=@libdir@
17 includedir=@includedir@
18 mandir=@mandir@
19 afssrvbindir=@afssrvbindir@
20 afssrvsbindir=@afssrvsbindir@
21 afssrvlibexecdir=@afssrvlibexecdir@
22 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
23 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
24 TOP_SRCDIR=@TOP_SRCDIR@
25 SYS_NAME=@AFS_SYSNAME@
26
27 SHELL=/bin/sh
28 KERNELDIR = ../libafs/
29 UKERNELDIR = ../libuafs/
30
31 include ../config/Makefile.${SYS_NAME}
32
33 all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h
34         case ${SYS_NAME} in \
35                 pmax_ul43 | pmax_ul43a) \
36                         ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
37         esac
38         case ${SYS_NAME} in \
39                 *linux* ) \
40                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${TOP_INCDIR}/afs ;;\
41                 * ) \
42                         echo No vfs headers to install for ${SYS_NAME};; \
43         esac
44
45 # NOTE: linux case uses --new as well to work around bug in some versions of
46 # gencat.
47 kinstall: ${KERNELDIR}/afs AFS_component_version_number.c
48         -chmod 666 ${KERNELDIR}afs/*
49         ${COMPILE_ET} -v 2 afs_trace.et
50         ${INSTALL} *.[csh] ${KERNELDIR}afs
51         ${INSTALL} VNOPS/*.[csh] ${KERNELDIR}afs
52         ${INSTALL} ${AFS_OSTYPE}/*.[csh] ${KERNELDIR}afs
53         -$(RM) -f afszcm.cat
54         case ${SYS_NAME} in \
55                 sgi_* ) \
56                         gencat -m afszcm.cat afs_trace.msf ;; \
57                 *_linux* ) \
58                         gencat --new afszcm.cat afs_trace.msf ;; \
59                 ppc_darwin* | i386_fbsd*) \
60                         echo No gencat for ${SYS_NAME} ;; \
61                 * ) \
62                         gencat afszcm.cat afs_trace.msf ;; \
63         esac
64
65 ${KERNELDIR}/afs:
66         mkdir -p $@
67
68 ukinstall: ${UKERNELDIR}/afs AFS_component_version_number.c
69         -chmod 666 ${UKERNELDIR}afs/*
70         ${COMPILE_ET} -v 2 afs_trace.et
71         ${INSTALL} *.[csh] ${UKERNELDIR}afs
72         ${INSTALL} VNOPS/*.[csh] ${UKERNELDIR}afs
73         ${INSTALL} UKERNEL/*.[csh] ${UKERNELDIR}afs
74
75 ${UKERNELDIR}/afs:
76         mkdir -p $@
77
78 install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h
79         case ${SYS_NAME} in \
80                 pmax_ul43 | pmax_ul43a) \
81                         ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
82         esac
83         case ${SYS_NAME} in \
84                 *linux* ) \
85                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${DESTDIR}${includedir}/afs ;;\
86                 * ) \
87                         echo No vfs headers to install for ${SYS_NAME};; \
88         esac
89
90 clean:
91         -$(RM) -f *.o core AFS_component_version_number.c afs_trace.h afs_trace.msf afszcm.cat
92
93 include ../config/Makefile.version
94 ${DEST}/include/afs/afs.h: afs.h
95         ${INSTALL} $? $@
96
97 ${DESTDIR}${includedir}/afs/afs.h: afs.h
98         ${INSTALL} $? $@
99
100
101 ${TOP_INCDIR}/afs/afs.h: afs.h
102         ${INSTALL} $? $@
103
104
105 ${DEST}/include/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
106         ${INSTALL} $? $@
107
108 ${DESTDIR}${includedir}/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
109         ${INSTALL} $? $@
110
111 ${TOP_INCDIR}/afs/osi_inode.h: ${AFS_OSTYPE}/osi_inode.h
112         ${INSTALL} $? $@
113
114
115 ${DEST}/include/afs/afs_stats.h: afs_stats.h
116         ${INSTALL} $? $@
117
118 ${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h
119         ${INSTALL} $? $@
120
121
122 ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h
123         ${INSTALL} $? $@
124
125
126 ${DEST}/include/afs/exporter.h: exporter.h
127         ${INSTALL} $? $@
128
129 ${DESTDIR}${includedir}/afs/exporter.h: exporter.h
130         ${INSTALL} $? $@
131
132
133 ${TOP_INCDIR}/afs/exporter.h: exporter.h
134         ${INSTALL} $? $@
135
136
137 ${DEST}/include/afs/nfsclient.h: nfsclient.h
138         ${INSTALL} $? $@
139
140 ${DESTDIR}${includedir}/afs/nfsclient.h: nfsclient.h
141         ${INSTALL} $? $@
142
143
144 ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h
145         ${INSTALL} $? $@
146
147
148 dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h
149         case ${SYS_NAME} in \
150                 pmax_ul43 | pmax_ul43a) \
151                         ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
152         esac
153         case ${SYS_NAME} in \
154                 next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \
155                         echo skipping afszcm.cat install for ${SYS_NAME} ;; \
156                 * ) \
157                         ${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \
158         esac
159         case ${SYS_NAME} in \
160                 *linux* ) \
161                         ${INSTALL} ${AFS_OSTYPE}/osi_vfs.h ${DEST}/include/afs ;;\
162                 * ) \
163                         echo No vfs headers to install for ${SYS_NAME};; \
164         esac
165