# @(#)Makefile 5.35 (Berkeley) %G%
# Doing a make install builds /usr/include
# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
all clean cleandir depend lint
tags:
SUBDIRS
=arpa pascal protocols
STD
= a.out.h
ar.h assert.h bitstring.h ctype.h curses.h ndbm.h \
dirent.h disktab.h fstab.h fts.h glob.h grp.h kvm.h limits.h \
math.h memory.h mp.h netdb.h nlist.h paths.h pcc.h pwd.h ranlib.h \
regexp.h resolv.h setjmp.h sgtty.h stab.h stdarg.h stddef.h \
stdlib.h stdio.h string.h strings.h struct.h sysexits.h time.h \
ttyent.h tzfile.h utmp.h varargs.h vfont.h vis.h
LSYS
= errno.h fcntl.h signal.h syslog.h termios.h unistd.h
DIRS
= sys net netimp netinet netiso netns ufs nfs
.if
(${MACHINE} == "hp300")
.elif
(${MACHINE} == "tahoe")
DIRS
+= tahoe tahoemath tahoevba tahoeif
.elif
(${MACHINE} == "vax")
DIRS
+= vax vaxmba vaxuba vaxif
# Define SHARED to indicate whether you want symbolic links to the system
# source (``symlinks''), or a separate copy (``copies''); (latter useful
# in environments where it's not possible to keep /sys publicly readable)
cmp
-s
$$i ${DESTDIR}/usr
/include/$$i || \
install -c
-o
${BINOWN} -g
${BINGRP} -m
444 $$i \
${DESTDIR}/usr
/include/$$i; \
@echo installing
${SUBDIRS}
@
-for i in
${SUBDIRS}; do \
if
[ ! -d
${DESTDIR}/usr
/include/$$i ]; \
mkdir
${DESTDIR}/usr
/include/$$i; \
chown
${BINOWN}.
${BINGRP} ${DESTDIR}/usr
/include/$$i; \
chmod
755 ${DESTDIR}/usr
/include/$$i; \
(cd
$$i; for j in
*.
[ih
]; do \
cmp
-s
$$j ${DESTDIR}/usr
/include/$$i/$$j || \
install -c
-o
${BINOWN} -g
${BINGRP} -m
444 $$j \
${DESTDIR}/usr
/include/$$i/$$j; \
install -c
-o
${BINOWN} -g
${BINGRP} -m
444 Makefile.
install \
${DESTDIR}/usr
/include/Makefile
rm -f
${DESTDIR}/usr
/include/machine
ln
-s .
/${MACHINE} ${DESTDIR}/usr
/include/machine
rm -f
${DESTDIR}/usr
/include/$$i; \
ln
-s sys
/$$i ${DESTDIR}/usr
/include/$$i; \
rm -f
${DESTDIR}/usr
/include/$$i; \
ln
-s machine
/$$i ${DESTDIR}/usr
/include/$$i; \
rm -rf
${DESTDIR}/usr
/include/$$i; \
if
[ ! -s
${DESTDIR}/usr
/include/$$i ]; \
ln
-s
/sys
/$$i ${DESTDIR}/usr
/include/$$i; \
echo
${DESTDIR}/usr
/include/$$i not removed
; \
rm -rf
${DESTDIR}/usr
/include/$$i; \
tar cf
- $$i/*.h |
(cd
${DESTDIR}/usr
/include; tar xpfB
-); \