Makefile revision 1839
11833Swollman# From: @(#)Makefile 8.2 (Berkeley) 1/4/94 21839Swollman# $Id: Makefile,v 1.5 1994/08/04 19:04:38 wollman Exp $ 31539Srgrimes# 41539Srgrimes# Doing a make install builds /usr/include 51539Srgrimes# 61539Srgrimes# The ``rm -rf''s used below are safe because rm doesn't follow symbolic 71539Srgrimes# links. 81539Srgrimes# 91539Srgrimesall clean cleandir depend lint tags: 101539Srgrimes 111833SwollmanSUBDIR= rpcsvc 121604Srgrimes# XXX MISSING: mp.h 131539SrgrimesFILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ 141615Srgrimes err.h fnmatch.h fstab.h fts.h glob.h grp.h kvm.h limits.h link.h \ 151615Srgrimes locale.h \ 161570Srgrimes math.h memory.h mpool.h ndbm.h netdb.h nlist.h paths.h pwd.h \ 171539Srgrimes ranlib.h regex.h regexp.h resolv.h rune.h runetype.h setjmp.h \ 181539Srgrimes sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h string.h strings.h \ 191539Srgrimes struct.h sysexits.h tar.h time.h ttyent.h tzfile.h unistd.h utime.h \ 201539Srgrimes utmp.h vis.h 211539Srgrimes 221833SwollmanMFILES= float.h floatingpoint.h frame.h stdarg.h varargs.h 231539SrgrimesLFILES= errno.h fcntl.h syslog.h termios.h 241539Srgrimes 251839SwollmanDIRS= arpa protocols rpc 261570SrgrimesLDIRS= net netccitt netinet netiso netns nfs sys vm 271570SrgrimesLUDIR= ufs 281570SrgrimesUDIRS= ufs/ffs ufs/lfs ufs/mfs ufs/ufs 291539Srgrimes 301539SrgrimesNOOBJ= noobj 311539Srgrimes 321539Srgrimes# Define SHARED to indicate whether you want symbolic links to the system 331539Srgrimes# source (``symlinks''), or a separate copy (``copies''); (latter useful 341539Srgrimes# in environments where it's not possible to keep /sys publicly readable) 351539Srgrimes# SHARED= copies 361570SrgrimesSHARED?= symlinks 371539Srgrimes 381539Srgrimesinstall: ${SHARED} 391539Srgrimes @echo installing ${FILES} 401539Srgrimes @-for i in ${FILES}; do \ 411539Srgrimes cmp -s $$i ${DESTDIR}/usr/include/$$i > /dev/null 2>&1 || \ 421539Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \ 431539Srgrimes ${DESTDIR}/usr/include/$$i; \ 441539Srgrimes done 451539Srgrimes @echo installing ${DIRS} 461539Srgrimes @-for i in ${DIRS}; do \ 471539Srgrimes if [ ! -d ${DESTDIR}/usr/include/$$i ]; \ 481539Srgrimes then \ 491539Srgrimes mkdir ${DESTDIR}/usr/include/$$i; \ 501539Srgrimes fi; \ 511539Srgrimes chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \ 521539Srgrimes chmod 755 ${DESTDIR}/usr/include/$$i; \ 531539Srgrimes (cd $$i; for j in *.[ih]; do \ 541539Srgrimes cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j > \ 551539Srgrimes /dev/null 2>&1 || \ 561539Srgrimes install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \ 571539Srgrimes ${DESTDIR}/usr/include/$$i/$$j; \ 581539Srgrimes done); \ 591539Srgrimes done 601539Srgrimes @echo installing ${LFILES} 611539Srgrimes @-for i in ${LFILES}; do \ 621539Srgrimes rm -f ${DESTDIR}/usr/include/$$i; \ 631539Srgrimes ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 641539Srgrimes chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \ 651539Srgrimes done 661539Srgrimes @echo installing ${MFILES} 671539Srgrimes @-for i in ${MFILES}; do \ 681539Srgrimes rm -f ${DESTDIR}/usr/include/$$i; \ 691539Srgrimes ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 701539Srgrimes chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \ 711539Srgrimes done 721539Srgrimes 731539Srgrimescopies: 741570Srgrimes rm -rf ${DESTDIR}/usr/include/${LUDIR} 751570Srgrimes @-for i in ${LDIRS} ${UDIRS}; do \ 761570Srgrimes echo ${SHARED} $$i; \ 771570Srgrimes rm -rf ${DESTDIR}/usr/include/$$i; \ 781570Srgrimes cd ../sys; \ 791570Srgrimes tar cf - $$i/*.h | \ 801570Srgrimes (cd ${DESTDIR}/usr/include; tar xpfB -); \ 811570Srgrimes chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i;\ 821570Srgrimes chmod -R 444 ${DESTDIR}/usr/include/$$i; \ 831570Srgrimes chmod 755 ${DESTDIR}/usr/include/$$i; \ 841539Srgrimes done 851570Srgrimes rm -rf ${DESTDIR}/usr/include/machine 861539Srgrimes mkdir ${DESTDIR}/usr/include/machine 871570Srgrimes cd ../sys/${MACHINE}/include && \ 881570Srgrimes tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); 891570Srgrimes chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine; 901570Srgrimes chmod -R 444 ${DESTDIR}/usr/include/machine; 911570Srgrimes chmod 755 ${DESTDIR}/usr/include/machine; 921539Srgrimes 931539Srgrimessymlinks: 941570Srgrimes @for i in ${LDIRS} ${LUDIR}; do \ 951570Srgrimes echo ${SHARED} $$i; \ 961570Srgrimes rm -rf ${DESTDIR}/usr/include/$$i; \ 971570Srgrimes ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 981570Srgrimes chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \ 991539Srgrimes done 1001570Srgrimes rm -rf ${DESTDIR}/usr/include/machine 1011570Srgrimes ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine 1021539Srgrimes 1031539Srgrimes.include <bsd.prog.mk> 104