Makefile revision 1.49
11.49Schristos# $NetBSD: Makefile,v 1.49 1994/12/03 00:00:57 christos 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.34Scgd install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/$$i; \ 421.1Scgd (cd $$i; for j in *.[ih]; do \ 431.1Scgd cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \ 441.34Scgd install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \ 451.1Scgd done); \ 461.1Scgd done 471.1Scgd @echo installing ${LFILES} 481.1Scgd @-for i in ${LFILES}; do \ 491.1Scgd rm -f ${DESTDIR}/usr/include/$$i; \ 501.1Scgd ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 511.1Scgd done 521.1Scgd @echo installing ${MFILES} 531.1Scgd @-for i in ${MFILES}; do \ 541.1Scgd rm -f ${DESTDIR}/usr/include/$$i; \ 551.1Scgd ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 561.1Scgd done 571.34Scgd chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include 581.34Scgd find ${DESTDIR}/usr/include -type f | \ 591.45Scgd xargs chmod a=r 601.45Scgd find ${DESTDIR}/usr/include -type d | \ 611.45Scgd xargs chmod u=rwx,go=rx 621.1Scgd 631.8Scgdbeforeinstall: 641.33Scgd install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include 651.8Scgd 661.1Scgdcopies: 671.1Scgd @echo copies: ${LDIRS} 681.1Scgd @-for i in ${LDIRS}; do \ 691.40Scgd rm -rf ${DESTDIR}/usr/include/$$i; \ 701.40Scgd install -d -o bin -g bin -m 755 ${DESTDIR}/usr/include/$$i ; \ 711.1Scgd done 721.43Smycroft cd ../sys; \ 731.46Smycroft pax -rw -pa -L \ 741.46Smycroft `find ${LDIRS} -type f -name '*.h' '!' -path 'netiso/xebec/*' \ 751.46Smycroft -print` ${DESTDIR}/usr/include 761.3Scgd rm -rf ${DESTDIR}/usr/include/machine 771.34Scgd install -d -o bin -g bin -m 755 ${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.34Scgd install -d -o bin -g bin -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.14Sproven.include <bsd.prog.mk> 1111.23Smycroft 1121.23Smycroftrealinstall: ${SYS_INCLUDE} 113