Home | History | Annotate | Line # | Download | only in include
Makefile revision 1.28
      1 #	from: @(#)Makefile	5.45.1.1 (Berkeley) 5/6/91
      2 #	$Id: Makefile,v 1.28 1993/10/21 20:53:13 jtc 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 # Missing: mp.h
     10 
     11 FILES=	a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
     12 	err.h fnmatch.h fstab.h fts.h glob.h grp.h kvm.h limits.h locale.h \
     13 	math.h memory.h mpool.h ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h \
     14 	regexp.h resolv.h search.h setjmp.h sgtty.h stab.h stdarg.h stddef.h \
     15 	stdio.h stdlib.h string.h strings.h struct.h sysexits.h time.h \
     16 	ttyent.h tzfile.h unistd.h utime.h utmp.h varargs.h vis.h malloc.h \
     17 	link.h
     18 
     19 MFILES=	float.h frame.h
     20 LFILES=	errno.h fcntl.h signal.h syslog.h termios.h
     21 
     22 DIRS=	arpa protocols rpc rpcsvc
     23 LDIRS=	net netinet netccitt netiso netns nfs sys ufs vm 
     24 
     25 NOOBJ=	noobj
     26 
     27 # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
     28 .if !defined(SYS_INCLUDE)
     29 SYS_INCLUDE=	copies
     30 .endif
     31 
     32 realinstall:
     33 	@echo installing ${FILES}
     34 	@-for i in ${FILES}; do \
     35 		cmp -s $$i ${DESTDIR}/usr/include/$$i || \
     36 		    install -c -m 644 $$i ${DESTDIR}/usr/include/$$i; \
     37 	done
     38 	@echo installing ${DIRS}
     39 	@-for i in ${DIRS}; do \
     40 		if [ ! -d ${DESTDIR}/usr/include/$$i ]; \
     41 		then \
     42 			mkdir ${DESTDIR}/usr/include/$$i; \
     43 		fi; \
     44 		(cd $$i; for j in *.[ih]; do \
     45 			cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
     46 			install -c -m 644 $$j ${DESTDIR}/usr/include/$$i/$$j; \
     47 		done); \
     48 	done
     49 	@echo installing ${LFILES}
     50 	@-for i in ${LFILES}; do \
     51 		rm -f ${DESTDIR}/usr/include/$$i; \
     52 		ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
     53 	done
     54 	@echo installing ${MFILES}
     55 	@-for i in ${MFILES}; do \
     56 		rm -f ${DESTDIR}/usr/include/$$i; \
     57 		ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
     58 	done
     59 	@chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
     60 	@chmod -R a-w ${DESTDIR}/usr/include
     61 
     62 beforeinstall:
     63 	@install -d -o root -g wheel -m 755 ${DESTDIR}/usr/include
     64 
     65 copies:
     66 	@echo copies: ${LDIRS}
     67 	@-for i in ${LDIRS}; do \
     68 		rm -rf ${DESTDIR}/usr/include/$$i; \
     69 		cd ../sys; \
     70 		tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
     71 	done
     72 	rm -rf ${DESTDIR}/usr/include/machine
     73 	mkdir ${DESTDIR}/usr/include/machine
     74 	cd ../sys/arch/${MACHINE}/include; \
     75 	tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \
     76 
     77 symlinks:
     78 	@echo symlinks: ${LDIRS}
     79 	@for i in ${LDIRS}; do \
     80 		rm -rf ${DESTDIR}/usr/include/$$i; \
     81 		ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
     82 	done
     83 	rm -rf ${DESTDIR}/usr/include/machine
     84 	ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
     85 
     86 .include <bsd.prog.mk>
     87 
     88 realinstall: ${SYS_INCLUDE}
     89