Makefile revision 1.51
11.51Sjtc# $NetBSD: Makefile,v 1.51 1995/01/15 21:58:40 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.42ScgdFILES= a.out.h ar.h assert.h bitstring.h bm.h ctype.h db.h dirent.h disktab.h \ 131.41Sjtc err.h fnmatch.h fstab.h fts.h glob.h grp.h kvm.h langinfo.h limits.h \ 141.49Schristos locale.h math.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h \ 151.49Schristos nl_types.h paths.h pwd.h ranlib.h regex.h regexp.h resolv.h \ 161.47Scgd search.h setjmp.h sgtty.h signal.h stab.h stddef.h \ 171.28Sjtc stdio.h stdlib.h string.h strings.h struct.h sysexits.h time.h \ 181.38Scgd ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h malloc.h \ 191.28Sjtc link.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.22Smycroftrealinstall: 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.8Scgdbeforeinstall: 651.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 ${DESTDIR}/usr/include 661.8Scgd 671.1Scgdcopies: 681.1Scgd @echo copies: ${LDIRS} 691.1Scgd @-for i in ${LDIRS}; do \ 701.40Scgd rm -rf ${DESTDIR}/usr/include/$$i; \ 711.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 721.50Sjtc ${DESTDIR}/usr/include/$$i ; \ 731.1Scgd done 741.43Smycroft cd ../sys; \ 751.46Smycroft pax -rw -pa -L \ 761.46Smycroft `find ${LDIRS} -type f -name '*.h' '!' -path 'netiso/xebec/*' \ 771.46Smycroft -print` ${DESTDIR}/usr/include 781.3Scgd rm -rf ${DESTDIR}/usr/include/machine 791.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 801.50Sjtc ${DESTDIR}/usr/include/machine 811.44Sjtc pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \ 821.44Sjtc ../sys/arch/${MACHINE}/include/*.h \ 831.44Sjtc ${DESTDIR}/usr/include/machine 841.31Scgd rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 851.35Scgd if test ${MACHINE} != ${MACHINE_ARCH} -a \ 861.44Sjtc -d ../sys/arch/${MACHINE_ARCH}/include; then \ 871.50Sjtc install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 881.44Sjtc ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 891.44Sjtc pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \ 901.44Sjtc ../sys/arch/${MACHINE_ARCH}/include/*.h \ 911.44Sjtc ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 921.31Scgd else \ 931.44Sjtc ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 941.31Scgd fi 951.1Scgd 961.1Scgdsymlinks: 971.1Scgd @echo symlinks: ${LDIRS} 981.13Sproven @for i in ${LDIRS}; do \ 991.13Sproven rm -rf ${DESTDIR}/usr/include/$$i; \ 1001.13Sproven ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 1011.13Sproven done 1021.13Sproven rm -rf ${DESTDIR}/usr/include/machine 1031.16Scgd ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 1041.31Scgd rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 1051.35Scgd if test ${MACHINE} != ${MACHINE_ARCH} -a \ 1061.35Scgd -d ../sys/arch/${MACHINE_ARCH}/include ; then \ 1071.31Scgd ln -s /sys/arch/${MACHINE_ARCH}/include \ 1081.31Scgd ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 1091.31Scgd else \ 1101.31Scgd ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 1111.31Scgd fi 1121.14Sproven 1131.14Sproven.include <bsd.prog.mk> 1141.23Smycroft 1151.23Smycroftrealinstall: ${SYS_INCLUDE} 116