Home | History | Annotate | Line # | Download | only in include
Makefile revision 1.5
      1 #	@(#)Makefile	5.45.1.1 (Berkeley) 5/6/91
      2 #
      3 # Doing a make install builds /usr/include
      4 #
      5 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
      6 # links.
      7 #
      8 all clean cleandir depend lint tags:
      9 
     10 # Missing: mp.h
     11 
     12 FILES=	a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
     13 	fstab.h fts.h glob.h grp.h kvm.h limits.h locale.h math.h memory.h \
     14 	ndbm.h netdb.h nlist.h paths.h pwd.h ranlib.h regexp.h \
     15 	resolv.h setjmp.h sgtty.h stab.h stdarg.h stddef.h stdio.h \
     16 	stdlib.h string.h strings.h struct.h sysexits.h time.h ttyent.h \
     17 	tzfile.h unistd.h utime.h utmp.h varargs.h vis.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
     23 # Missing: netimp netiso netns
     24 LDIRS=	net netinet nfs sys ufs vm
     25 
     26 NOOBJ=	noobj
     27 
     28 # Define SHARED to indicate whether you want symbolic links to the system
     29 # source (``symlinks''), or a separate copy (``copies''); (latter useful
     30 # in environments where it's not possible to keep /sys publicly readable)
     31 SHARED= 	copies
     32 #SHARED= 	symlinks
     33 
     34 install: ${SHARED}
     35 	@echo installing ${FILES}
     36 	@-for i in ${FILES}; do \
     37 		cmp -s $$i ${DESTDIR}/usr/include/$$i || \
     38 		    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
     39 		    ${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 		chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
     48 		chmod 755 ${DESTDIR}/usr/include/$$i; \
     49 		(cd $$i; for j in *.[ih]; do \
     50 			cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
     51 			install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
     52 			    ${DESTDIR}/usr/include/$$i/$$j; \
     53 		done); \
     54 	done
     55 	@echo installing ${LFILES}
     56 	@-for i in ${LFILES}; do \
     57 		rm -f ${DESTDIR}/usr/include/$$i; \
     58 		ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
     59 		chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
     60 	done
     61 	@echo installing ${MFILES}
     62 	@-for i in ${MFILES}; do \
     63 		rm -f ${DESTDIR}/usr/include/$$i; \
     64 		ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
     65 		chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
     66 	done
     67 
     68 copies:
     69 	@echo copies: ${LDIRS}
     70 	@-for i in ${LDIRS}; do \
     71 		rm -rf ${DESTDIR}/usr/include/$$i; \
     72 		cd ../sys.386bsd; \
     73 		tar cf - $$i/*.h | (cd ${DESTDIR}/usr/include; tar xpfB -); \
     74 	done
     75 	rm -rf ${DESTDIR}/usr/include/machine
     76 	mkdir ${DESTDIR}/usr/include/machine
     77 	cd ../sys.386bsd/${MACHINE}/include; \
     78 	tar cf - *.h | (cd ${DESTDIR}/usr/include/machine; tar xpfB -); \
     79 
     80 symlinks:
     81 	@echo symlinks: ${LDIRS}
     82 	@for i in ${LDIRS}; do \
     83 		rm -rf ${DESTDIR}/usr/include/$$i; \
     84 		ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
     85 		chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
     86 	done
     87 	rm -rf ${DESTDIR}/usr/include/machine
     88 	ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
     89 	chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/machine
     90 
     91 .include <bsd.prog.mk>
     92