xref: /original-bsd/include/Makefile.install (revision d5354517)
1#	@(#)Makefile.install	5.7 (Berkeley) 05/12/90
2#
3# Makefile for /usr/include, used to convert system include subdirectories
4# between symbolic links and copies of kernel headers.  May also be used to
5# update copies from kernel header files.
6#
7# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
8# links.
9#
10
11SYS=/sys
12DIRS=	sys net netimp netinet netns ${MACHINE}
13.if (${MACHINE} == "tahoe")
14DIRS+=	tahoeif tahoevba
15.elif (${MACHINE} == "vax")
16DIRS+=	vaxif vaxmba vaxuba
17.endif
18
19all:
20	@echo "\"make symlinks\", \"make copies\", or \"make update\" only"
21	@false
22
23copies:
24	rm -rf machine
25	ln -s ${MACHINE} machine
26	-for i in ${DIRS}; do \
27		rm -rf $$i; \
28		(cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
29	done
30
31symlinks:
32	rm -rf machine
33	ln -s ${MACHINE} machine
34	for i in ${DIRS}; do \
35		rm -rf $$i; \
36		ln -s ${SYS}/$$i $$i; \
37	done
38
39update:
40	rm -rf machine
41	ln -s ${MACHINE} machine
42	-for i in ${DIRS}; do \
43		if [ ! -d $$i ]; \
44		then \
45			mkdir $$i; \
46		fi; \
47		for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
48			cmp -s ${SYS}/$$i/$$j $$i/$$j || \
49			install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
50			    ${SYS}/$$i/$$j $$i/$$j; \
51		done; \
52	done
53
54clean cleandir depend lint tags:
55