Makefile revision 1.7
1# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 2# 3# Doing a make install builds /usr/include 4# 5# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 6# links. 7# 8 9SUBDIR= rpcsvc 10 11# Missing: mp.h 12 13FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ 14 fstab.h fts.h glob.h grp.h kvm.h limits.h locale.h math.h memory.h \ 15 ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h regexp.h \ 16 resolv.h setjmp.h sgtty.h stab.h stdarg.h stddef.h stdio.h \ 17 stdlib.h string.h strings.h struct.h sysexits.h time.h ttyent.h \ 18 tzfile.h unistd.h utime.h utmp.h varargs.h vis.h 19 20MFILES= float.h frame.h 21LFILES= errno.h fcntl.h signal.h syslog.h termios.h 22 23DIRS=arpa protocols 24# Missing: netimp netiso netns 25LDIRS= net netinet nfs sys ufs vm 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) 32SHARED= copies 33#SHARED= symlinks 34 35install: _PROGSUBDIR ${SHARED} 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; \ 73 cd ../sys.386bsd; \ 74 tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \ 75 done 76 rm -rf ${DESTDIR}/usr/include/machine 77 mkdir ${DESTDIR}/usr/include/machine 78 cd ../sys.386bsd/${MACHINE}/include; \ 79 tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \ 80 81symlinks: 82 @echo symlinks: ${LDIRS} 83 @for i in ${LDIRS}; do \ 84 rm -rf ${DESTDIR}/usr/include/$$i; \ 85 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 86 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \ 87 done 88 rm -rf ${DESTDIR}/usr/include/machine 89 ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine 90 chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine 91 92.include <bsd.prog.mk> 93