]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/Makefile
Added skey.h to Makefile and reformatted the list a bit.
[FreeBSD/FreeBSD.git] / include / Makefile
1 #       From: @(#)Makefile      8.2 (Berkeley) 1/4/94
2 #       $Id: Makefile,v 1.9 1994/08/10 06:24:42 wollman Exp $
3 #
4 # Doing a make install builds /usr/include
5 #
6 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
7 # links.
8 #
9 all clean cleandir depend lint tags:
10
11 SUBDIR= rpcsvc
12 # XXX MISSING:  mp.h
13 FILES=  a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
14         err.h fnmatch.h fstab.h fts.h glob.h grp.h histedit.h kvm.h \
15         limits.h link.h locale.h math.h memory.h mpool.h ndbm.h \
16         netdb.h nlist.h paths.h pwd.h ranlib.h regex.h regexp.h \
17         resolv.h rune.h runetype.h setjmp.h sgtty.h signal.h skey.h \
18         stab.h stddef.h stdio.h stdlib.h string.h strings.h struct.h \
19         sysexits.h tar.h time.h ttyent.h tzfile.h unistd.h utime.h \
20         utmp.h vis.h
21
22 MFILES= float.h floatingpoint.h frame.h stdarg.h varargs.h
23 LFILES= errno.h fcntl.h syslog.h termios.h
24
25 DIRS=   arpa protocols rpc
26 LDIRS=  net netccitt netinet netiso netns nfs sys vm
27 LUDIR=  ufs
28 UDIRS=  ufs/ffs ufs/lfs ufs/mfs ufs/ufs
29
30 NOOBJ=  noobj
31
32 # Define SHARED to indicate whether you want symbolic links to the system
33 # source (``symlinks''), or a separate copy (``copies''); (latter useful
34 # in environments where it's not possible to keep /sys publicly readable)
35 # SHARED=       copies
36 SHARED?=        symlinks
37
38 beforeinstall: ${SHARED}
39         @echo installing ${FILES}
40         @-for i in ${FILES}; do \
41                 cmp -s $$i ${DESTDIR}/usr/include/$$i > /dev/null 2>&1 || \
42                     install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
43                     ${DESTDIR}/usr/include/$$i; \
44         done
45         @echo creating osreldate.h
46         @rm -f ${DESTDIR}/usr/include/osreldate.h
47         @echo \#'undef __FreeBSD_version' > ${DESTDIR}/usr/include/osreldate.h
48         @echo \#'define __FreeBSD_version '`sysctl -n kern.osreldate` \
49                 >> ${DESTDIR}/usr/include/osreldate.h
50         @echo installing ${DIRS}
51         @-for i in ${DIRS}; do \
52                 if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
53                 then \
54                         mkdir ${DESTDIR}/usr/include/$$i; \
55                 fi; \
56                 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
57                 chmod 755 ${DESTDIR}/usr/include/$$i; \
58                 (cd $$i; for j in *.[ih]; do \
59                         cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j > \
60                             /dev/null 2>&1 || \
61                             install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
62                             ${DESTDIR}/usr/include/$$i/$$j; \
63                 done); \
64         done
65         @echo installing ${LFILES}
66         @-for i in ${LFILES}; do \
67                 rm -f ${DESTDIR}/usr/include/$$i; \
68                 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
69                 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
70         done
71         @echo installing ${MFILES}
72         @-for i in ${MFILES}; do \
73                 rm -f ${DESTDIR}/usr/include/$$i; \
74                 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
75                 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
76         done
77
78 copies:
79         rm -rf ${DESTDIR}/usr/include/${LUDIR}
80         @-for i in ${LDIRS} ${UDIRS}; do                                \
81                 echo ${SHARED} $$i;                                     \
82                 rm -rf ${DESTDIR}/usr/include/$$i;                      \
83                 cd ../sys;                                              \
84                 tar cf - $$i/*.h |                                      \
85                         (cd ${DESTDIR}/usr/include; tar xpfB -);        \
86                 chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i;\
87                 chmod -R 444 ${DESTDIR}/usr/include/$$i;                \
88                 chmod 755 ${DESTDIR}/usr/include/$$i;                   \
89         done
90         rm -rf ${DESTDIR}/usr/include/machine
91         mkdir ${DESTDIR}/usr/include/machine
92         cd ../sys/${MACHINE}/include && \
93             tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -);
94         chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine;
95         chmod -R 444 ${DESTDIR}/usr/include/machine;
96         chmod 755 ${DESTDIR}/usr/include/machine;
97
98 symlinks:
99         @for i in ${LDIRS} ${LUDIR}; do                                 \
100                 echo ${SHARED} $$i;                                     \
101                 rm -rf ${DESTDIR}/usr/include/$$i;                      \
102                 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i;              \
103                 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i;   \
104         done
105         rm -rf ${DESTDIR}/usr/include/machine
106         ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
107
108 .include <bsd.prog.mk>