Home | History | Annotate | Line # | Download | only in include
Makefile revision 1.22
      1 #	from: @(#)Makefile	5.45.1.1 (Berkeley) 5/6/91
      2 #	$Id: Makefile,v 1.22 1993/08/15 23:31:16 mycroft Exp $
      3 
      4 # Doing a make install builds /usr/include
      5 #
      6 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
      7 # links.
      8 
      9 SUBDIR= rpcsvc
     10 
     11 # Missing: mp.h
     12 
     13 FILES=	a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
     14 	err.h fnmatch.h fstab.h fts.h glob.h grp.h kvm.h limits.h locale.h \
     15 	math.h memory.h mpool.h ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h \
     16 	regexp.h 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 malloc.h
     19 
     20 MFILES=	float.h frame.h
     21 LFILES=	errno.h fcntl.h signal.h syslog.h termios.h
     22 
     23 DIRS=	arpa protocols rpc
     24 LDIRS=	net netinet netccitt netiso netns nfs sys ufs vm 
     25 
     26 NOOBJ=	noobj
     27 
     28 # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
     29 .if !defined(SYS_INCLUDE)
     30 SYS_INCLUDE=	copies
     31 .endif
     32 
     33 afterinstall: ${SYS_INCLUDE}
     34 
     35 realinstall:
     36 	@echo installing ${FILES}
     37 	@-for i in ${FILES}; do \
     38 		cmp -s $$i ${DESTDIR}/usr/include/$$i || \
     39 		    install -c -m 644 $$i ${DESTDIR}/usr/include/$$i; \
     40 	done
     41 	@echo installing ${DIRS}
     42 	@-for i in ${DIRS}; do \
     43 		if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
     44 		then \
     45 			mkdir ${DESTDIR}/usr/include/$$i; \
     46 		fi; \
     47 		(cd $$i; for j in *.[ih]; do \
     48 			cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
     49 			install -c -m 644 $$j ${DESTDIR}/usr/include/$$i/$$j; \
     50 		done); \
     51 	done
     52 	@echo installing ${LFILES}
     53 	@-for i in ${LFILES}; do \
     54 		rm -f ${DESTDIR}/usr/include/$$i; \
     55 		ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
     56 	done
     57 	@echo installing ${MFILES}
     58 	@-for i in ${MFILES}; do \
     59 		rm -f ${DESTDIR}/usr/include/$$i; \
     60 		ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
     61 	done
     62 	@chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include
     63 	@chmod -R a-w ${DESTDIR}/usr/include
     64 
     65 beforeinstall:
     66 	@if [ ! -d ${DESTDIR}/usr/include ]; then \
     67                 /bin/rm -f ${DESTDIR}/usr/include ; \
     68                 mkdir -p ${DESTDIR}/usr/include ; \
     69         else \
     70                 true ; \
     71         fi
     72 
     73 copies:
     74 	@echo copies: ${LDIRS}
     75 	@-for i in ${LDIRS}; do \
     76 		rm -rf ${DESTDIR}/usr/include/$$i; \
     77 		cd ../sys; \
     78 		tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
     79 	done
     80 	rm -rf ${DESTDIR}/usr/include/machine
     81 	mkdir ${DESTDIR}/usr/include/machine
     82 	cd ../sys/arch/${MACHINE}/include; \
     83 	tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \
     84 
     85 symlinks:
     86 	@echo symlinks: ${LDIRS}
     87 	@for i in ${LDIRS}; do \
     88 		rm -rf ${DESTDIR}/usr/include/$$i; \
     89 		ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
     90 	done
     91 	rm -rf ${DESTDIR}/usr/include/machine
     92 	ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
     93 
     94 .include <bsd.prog.mk>
     95