This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.1'.
[unix-history] / include / Makefile
CommitLineData
15637ed4
RG
1# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
2#
2949bf6a 3# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
15637ed4
RG
4# links.
5#
05209711
C
6all depend lint tags:
7
8SUBDIR= rpcsvc
15637ed4
RG
9
10# Missing: mp.h
11
12FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
56181c4b 13 err.h f2c.h fnmatch.h fstab.h fts.h glob.h grp.h kvm.h limits.h \
a555e91d 14 link.h locale.h math.h memory.h mpool.h ndbm.h netdb.h nlist.h \
d56740ab 15 paths.h pwd.h queue.h ranlib.h regex.h resolv.h setjmp.h \
a555e91d 16 sgtty.h stab.h stdarg.h stddef.h stdio.h stdlib.h string.h strings.h \
c0eaae76 17 struct.h sysexits.h time.h ttyent.h tzfile.h unistd.h utime.h utmp.h \
a555e91d 18 varargs.h vis.h
15637ed4 19
fb95bc90 20MFILES= float.h floatingpoint.h frame.h
f0f4e3ed 21LFILES= errno.h fcntl.h signal.h syslog.h syscall.h termios.h
15637ed4
RG
22
23DIRS=arpa protocols
4bbb4028 24LDIRS= net netccitt netinet netiso netns nfs scsi sys ufs vm
9241bfd5 25# removed netimp depricated?
15637ed4
RG
26
27NOOBJ= noobj
28
29# Define SHARED to indicate whether you want symbolic links to the system
30# source (``symlinks''), or a separate copy (``copies''); (latter useful
31# in environments where it's not possible to keep /sys publicly readable)
32# SHARED= copies
17ea84d8 33SHARED?= symlinks
15637ed4 34
05209711 35realinstall: ${SHARED}
15637ed4
RG
36 @echo installing ${FILES}
37 @-for i in ${FILES}; do \
38 cmp -s $$i ${DESTDIR}/usr/include/$$i || \
39 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
40 ${DESTDIR}/usr/include/$$i; \
41 done
42 @echo installing ${DIRS}
43 @-for i in ${DIRS}; do \
44 if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
45 then \
46 mkdir ${DESTDIR}/usr/include/$$i; \
47 fi; \
48 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
49 chmod 755 ${DESTDIR}/usr/include/$$i; \
50 (cd $$i; for j in *.[ih]; do \
51 cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
52 install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
53 ${DESTDIR}/usr/include/$$i/$$j; \
54 done); \
55 done
56 @echo installing ${LFILES}
57 @-for i in ${LFILES}; do \
58 rm -f ${DESTDIR}/usr/include/$$i; \
59 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
60 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
61 done
62 @echo installing ${MFILES}
63 @-for i in ${MFILES}; do \
64 rm -f ${DESTDIR}/usr/include/$$i; \
65 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
66 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
67 done
68
69copies:
70 @echo copies: ${LDIRS}
71 @-for i in ${LDIRS}; do \
72 rm -rf ${DESTDIR}/usr/include/$$i; \
c2714ef5 73 cd ../sys; \
15637ed4 74 tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
17ea84d8
RG
75 chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
76 chmod -R 444 ${DESTDIR}/usr/include/$$i; \
77 chmod 755 ${DESTDIR}/usr/include/$$i; \
15637ed4 78 done
dfb74133 79 rm -rf ${DESTDIR}/usr/include/machine
15637ed4 80 mkdir ${DESTDIR}/usr/include/machine
c2714ef5 81 cd ../sys/${MACHINE}/include; \
17ea84d8
RG
82 tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -);
83 chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine;
84 chmod -R 444 ${DESTDIR}/usr/include/machine;
85 chmod 755 ${DESTDIR}/usr/include/machine;
15637ed4
RG
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
12d36c59 94 rm -rf ${DESTDIR}/usr/include/machine
15637ed4
RG
95 ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
96 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine
97
98.include <bsd.prog.mk>