Add the source code for /usr/src/usr.bin from the Net/2 tape
[unix-history] / usr / src / include / Makefile
CommitLineData
855c970d
WJ
1# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
2#
b84ee940
RG
3# PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
4# -------------------- ----- ----------------------
5# CURRENT PATCH LEVEL: 1 00123
6# -------------------- ----- ----------------------
7#
8# 04 Apr 93 Rodney W. Grimes Removed added netccitt and vm
9#
855c970d
WJ
10# Doing a make install builds /usr/include
11#
12# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
13# links.
14#
15all clean cleandir depend lint tags:
16
17# Missing: mp.h
18
19FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
20 fstab.h fts.h glob.h grp.h kvm.h limits.h locale.h math.h memory.h \
21 ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h regexp.h \
22 resolv.h setjmp.h sgtty.h stab.h stdarg.h stddef.h stdio.h \
23 stdlib.h string.h strings.h struct.h sysexits.h time.h ttyent.h \
24 tzfile.h unistd.h utime.h utmp.h varargs.h vis.h
25
26MFILES= float.h frame.h
27LFILES= errno.h fcntl.h signal.h syslog.h termios.h
28
29DIRS=arpa protocols
b84ee940 30LDIRS= net netccitt netimp netinet netiso netns nfs sys ufs vm
855c970d
WJ
31
32NOOBJ= noobj
33
34# Define SHARED to indicate whether you want symbolic links to the system
35# source (``symlinks''), or a separate copy (``copies''); (latter useful
36# in environments where it's not possible to keep /sys publicly readable)
37# SHARED= copies
38SHARED= symlinks
39
40install: ${SHARED}
41 @echo installing ${FILES}
42 @-for i in ${FILES}; do \
43 cmp -s $$i ${DESTDIR}/usr/include/$$i || \
44 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
45 ${DESTDIR}/usr/include/$$i; \
46 done
47 @echo installing ${DIRS}
48 @-for i in ${DIRS}; do \
49 if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
50 then \
51 mkdir ${DESTDIR}/usr/include/$$i; \
52 fi; \
53 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
54 chmod 755 ${DESTDIR}/usr/include/$$i; \
55 (cd $$i; for j in *.[ih]; do \
56 cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
57 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
58 ${DESTDIR}/usr/include/$$i/$$j; \
59 done); \
60 done
61 @echo installing ${LFILES}
62 @-for i in ${LFILES}; do \
63 rm -f ${DESTDIR}/usr/include/$$i; \
64 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
65 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
66 done
67 @echo installing ${MFILES}
68 @-for i in ${MFILES}; do \
69 rm -f ${DESTDIR}/usr/include/$$i; \
70 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
71 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
72 done
73
74copies:
75 @echo copies: ${LDIRS}
76 @-for i in ${LDIRS}; do \
77 rm -rf ${DESTDIR}/usr/include/$$i; \
78 cd /sys; \
79 tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
80 done
81 rm -f ${DESTDIR}/usr/include/machine
82 mkdir ${DESTDIR}/usr/include/machine
83 cd /sys/${MACHINE}/include; \
84 tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \
85
86symlinks:
87 @echo symlinks: ${LDIRS}
88 @for i in ${LDIRS}; do \
89 rm -rf ${DESTDIR}/usr/include/$$i; \
90 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
91 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
92 done
93 rm -f ${DESTDIR}/usr/include/machine
94 ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
95 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine
96
97.include <bsd.prog.mk>