Makefile revision 1.57
11.57Sjtc# $NetBSD: Makefile,v 1.57 1996/04/25 00:55:44 jtc Exp $ 21.48Scgd 31.48Scgd# @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91 41.21Smycroft 51.1Scgd# Doing a make install builds /usr/include 61.1Scgd# 71.1Scgd# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 81.1Scgd# links. 91.6Scgd 101.1Scgd# Missing: mp.h 111.1Scgd 121.56SjtcFILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \ 131.56Sjtc disktab.h dlfcn.h err.h fnmatch.h fstab.h fts.h glob.h grp.h ieeefp.h \ 141.56Sjtc iso646.h kvm.h langinfo.h limits.h link.h locale.h malloc.h math.h \ 151.56Sjtc memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h paths.h \ 161.56Sjtc pwd.h ranlib.h re_comp.h regex.h regexp.h resolv.h search.h setjmp.h \ 171.56Sjtc sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h string.h strings.h \ 181.56Sjtc struct.h sysexits.h tar.h time.h ttyent.h tzfile.h unistd.h utime.h \ 191.56Sjtc utmp.h vis.h 201.1Scgd 211.47ScgdMFILES= float.h frame.h stdarg.h varargs.h 221.36ScgdLFILES= errno.h fcntl.h syslog.h termios.h 231.1Scgd 241.26ScgdDIRS= arpa protocols rpc rpcsvc 251.30ScgdLDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm 261.1Scgd 271.1ScgdNOOBJ= noobj 281.1Scgd 291.20Sbrezak# Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies 301.31Scgd.include <bsd.own.mk> 311.31ScgdSYS_INCLUDE?= copies 321.1Scgd 331.57Sjtcincludes: 341.1Scgd @echo installing ${FILES} 351.1Scgd @-for i in ${FILES}; do \ 361.1Scgd cmp -s $$i ${DESTDIR}/usr/include/$$i || \ 371.34Scgd install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \ 381.1Scgd done 391.1Scgd @echo installing ${DIRS} 401.1Scgd @-for i in ${DIRS}; do \ 411.51Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 421.50Sjtc ${DESTDIR}/usr/include/$$i; \ 431.1Scgd (cd $$i; for j in *.[ih]; do \ 441.1Scgd cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \ 451.34Scgd install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \ 461.1Scgd done); \ 471.1Scgd done 481.1Scgd @echo installing ${LFILES} 491.1Scgd @-for i in ${LFILES}; do \ 501.1Scgd rm -f ${DESTDIR}/usr/include/$$i; \ 511.1Scgd ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 521.1Scgd done 531.1Scgd @echo installing ${MFILES} 541.1Scgd @-for i in ${MFILES}; do \ 551.1Scgd rm -f ${DESTDIR}/usr/include/$$i; \ 561.1Scgd ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 571.1Scgd done 581.34Scgd chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include 591.34Scgd find ${DESTDIR}/usr/include -type f | \ 601.45Scgd xargs chmod a=r 611.45Scgd find ${DESTDIR}/usr/include -type d | \ 621.45Scgd xargs chmod u=rwx,go=rx 631.1Scgd 641.1Scgdcopies: 651.1Scgd @echo copies: ${LDIRS} 661.1Scgd @-for i in ${LDIRS}; do \ 671.40Scgd rm -rf ${DESTDIR}/usr/include/$$i; \ 681.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 691.50Sjtc ${DESTDIR}/usr/include/$$i ; \ 701.1Scgd done 711.43Smycroft cd ../sys; \ 721.46Smycroft pax -rw -pa -L \ 731.54Smycroft `find ${LDIRS} -follow -type f -name '*.h' '!' -path \ 741.54Smycroft 'netiso/xebec/*' -print` ${DESTDIR}/usr/include 751.3Scgd rm -rf ${DESTDIR}/usr/include/machine 761.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 771.50Sjtc ${DESTDIR}/usr/include/machine 781.44Sjtc pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \ 791.44Sjtc ../sys/arch/${MACHINE}/include/*.h \ 801.44Sjtc ${DESTDIR}/usr/include/machine 811.31Scgd rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 821.35Scgd if test ${MACHINE} != ${MACHINE_ARCH} -a \ 831.44Sjtc -d ../sys/arch/${MACHINE_ARCH}/include; then \ 841.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 851.44Sjtc ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 861.44Sjtc pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \ 871.44Sjtc ../sys/arch/${MACHINE_ARCH}/include/*.h \ 881.44Sjtc ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 891.31Scgd else \ 901.44Sjtc ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 911.31Scgd fi 921.1Scgd 931.1Scgdsymlinks: 941.1Scgd @echo symlinks: ${LDIRS} 951.13Sproven @for i in ${LDIRS}; do \ 961.13Sproven rm -rf ${DESTDIR}/usr/include/$$i; \ 971.13Sproven ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 981.13Sproven done 991.13Sproven rm -rf ${DESTDIR}/usr/include/machine 1001.16Scgd ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 1011.31Scgd rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 1021.35Scgd if test ${MACHINE} != ${MACHINE_ARCH} -a \ 1031.35Scgd -d ../sys/arch/${MACHINE_ARCH}/include ; then \ 1041.31Scgd ln -s /sys/arch/${MACHINE_ARCH}/include \ 1051.31Scgd ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 1061.31Scgd else \ 1071.31Scgd ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 1081.31Scgd fi 1091.14Sproven 1101.57Sjtcincludes: ${SYS_INCLUDE} 1111.57Sjtc 1121.14Sproven.include <bsd.prog.mk> 113