BSD 4_3_Tahoe development
[unix-history] / .ref-BSD-4_3 / usr / include / Makefile
CommitLineData
c73cc458
MK
1#
2# Copyright (c) 1983,1986 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
95f51977 6# @(#)Makefile.install 5.2 (Berkeley) 5/11/86
c73cc458 7#
04f86cad
MK
8# Makefile for /usr/include, used to convert system include subdirectories
9# between symbolic links and copies of kernel headers.
10# May also be used to update copies from kernel header files.
c73cc458
MK
11#
12# The ``rm -rf''s used below are safe because rm doesn't
13# follow symbolic links.
14#
15DESTDIR=
95f51977
C
16MACHINE=vax
17MACHDEP=${MACHINE} vaxif vaxmba vaxuba
c73cc458
MK
18NETDIRS=net netimp netinet netns
19SYSDIRS=${NETDIRS} stand ${MACHDEP}
20SYS=/sys
21
22all:
23 @echo "\"make symlinks\", \"make copies\", or \"make update\" only"
24 @false
25
26symlinks:
27 for i in ${SYSDIRS}; do \
28 rm -rf $$i; \
29 ln -s ${SYS}/$$i $$i; \
30 done
31 rm -rf sys
32 ln -s ${SYS}/h sys
33
34copies:
35 -for i in ${SYSDIRS}; do \
36 rm -rf $$i; \
37 (cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
38 done
39 rm -rf sys;
40 mkdir sys;
41 chmod 775 sys;
42 -(cd ${SYS}/h; tar cf - *.h) | (cd sys; tar xpfB -)
43
44update:
45 -for i in ${SYSDIRS}; do \
46 if [ ! -d $$i ]; \
47 then \
48 mkdir $$i; \
49 fi; \
50 for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
51 cmp -s ${SYS}/$$i/$$j $$i/$$j || \
52 install -c -m 444 ${SYS}/$$i/$$j $$i/$$j; \
53 done; \
54 done
55 for j in `cd ${SYS}/h; echo *.[ih]`; do \
56 cmp -s ${SYS}/h/$$j sys/$$j || \
57 { echo "install -c -m 444 ${SYS}/h/$$j sys/$$j"; \
58 install -c -m 444 ${SYS}/h/$$j sys/$$j; } \
59 done;