Removed netimp, so that make copies works without error
[unix-history] / include / Makefile
CommitLineData
15637ed4
RG
1# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
2#
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#
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 \
28e48405 21 mpool.h ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h regexp.h \
15637ed4
RG
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
9241bfd5
RM
30LDIRS= net netccitt netinet netiso netns nfs sys ufs vm
31# removed netimp depricated?
15637ed4
RG
32
33NOOBJ= noobj
34
35# Define SHARED to indicate whether you want symbolic links to the system
36# source (``symlinks''), or a separate copy (``copies''); (latter useful
37# in environments where it's not possible to keep /sys publicly readable)
38# SHARED= copies
39SHARED= symlinks
40
41install: ${SHARED}
42 @echo installing ${FILES}
43 @-for i in ${FILES}; do \
44 cmp -s $$i ${DESTDIR}/usr/include/$$i || \
45 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
46 ${DESTDIR}/usr/include/$$i; \
47 done
48 @echo installing ${DIRS}
49 @-for i in ${DIRS}; do \
50 if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
51 then \
52 mkdir ${DESTDIR}/usr/include/$$i; \
53 fi; \
54 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
55 chmod 755 ${DESTDIR}/usr/include/$$i; \
56 (cd $$i; for j in *.[ih]; do \
57 cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
58 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
59 ${DESTDIR}/usr/include/$$i/$$j; \
60 done); \
61 done
62 @echo installing ${LFILES}
63 @-for i in ${LFILES}; do \
64 rm -f ${DESTDIR}/usr/include/$$i; \
65 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
66 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
67 done
68 @echo installing ${MFILES}
69 @-for i in ${MFILES}; do \
70 rm -f ${DESTDIR}/usr/include/$$i; \
71 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
72 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
73 done
74
75copies:
76 @echo copies: ${LDIRS}
77 @-for i in ${LDIRS}; do \
78 rm -rf ${DESTDIR}/usr/include/$$i; \
79 cd /sys; \
80 tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
81 done
82 rm -f ${DESTDIR}/usr/include/machine
83 mkdir ${DESTDIR}/usr/include/machine
84 cd /sys/${MACHINE}/include; \
85 tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \
86
87symlinks:
88 @echo symlinks: ${LDIRS}
89 @for i in ${LDIRS}; do \
90 rm -rf ${DESTDIR}/usr/include/$$i; \
91 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
92 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
93 done
94 rm -f ${DESTDIR}/usr/include/machine
95 ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
96 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine
97
98.include <bsd.prog.mk>