read dump from raw device, not block; minor cleanups
[unix-history] / usr / src / include / Makefile.install
CommitLineData
c73cc458 1#
6d0684e1
KB
2# Copyright (c) 1983, 1986 The Regents of the University of California.
3# All rights reserved.
c73cc458 4#
6d0684e1
KB
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley. The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17# @(#)Makefile.install 5.5 (Berkeley) %G%
c73cc458 18#
04f86cad
MK
19# Makefile for /usr/include, used to convert system include subdirectories
20# between symbolic links and copies of kernel headers.
21# May also be used to update copies from kernel header files.
c73cc458
MK
22#
23# The ``rm -rf''s used below are safe because rm doesn't
24# follow symbolic links.
25#
26DESTDIR=
1f7d65ee
MK
27MACHDEP.vax= vaxif vaxmba vaxuba
28MACHDEP.tahoe= tahoeif tahoevba
29NETDIRS= net netimp netinet netns
30SYSDIRS= ${NETDIRS} ${MACHINE}
c73cc458
MK
31SYS=/sys
32
33all:
34 @echo "\"make symlinks\", \"make copies\", or \"make update\" only"
35 @false
36
1f7d65ee 37symlinks: symlinks.${MACHINE}
c73cc458
MK
38 for i in ${SYSDIRS}; do \
39 rm -rf $$i; \
40 ln -s ${SYS}/$$i $$i; \
41 done
1f7d65ee 42 rm -rf sys machine
c73cc458 43 ln -s ${SYS}/h sys
1f7d65ee 44 ln -s ${MACHINE} machine
c73cc458 45
1f7d65ee
MK
46symlinks.vax:
47 for i in ${MACHDEP.vax}; do \
48 rm -rf $$i; \
49 ln -s ${SYS}/$$i $$i; \
50 done
51
52symlinks.tahoe:
53 for i in ${MACHDEP.tahoe}; do \
54 rm -rf $$i; \
55 ln -s ${SYS}/$$i $$i; \
56 done
57
58copies: copies.${MACHINE}
c73cc458
MK
59 -for i in ${SYSDIRS}; do \
60 rm -rf $$i; \
61 (cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
62 done
63 rm -rf sys;
64 mkdir sys;
65 chmod 775 sys;
66 -(cd ${SYS}/h; tar cf - *.h) | (cd sys; tar xpfB -)
1f7d65ee
MK
67 rm -f machine
68 ln -s ${MACHINE} machine
69
70copies.vax:
71 -for i in ${MACHDEP.vax}; do \
72 rm -rf $$i; \
73 (cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
74 done
c73cc458 75
1f7d65ee
MK
76copies.tahoe:
77 -for i in ${MACHDEP.tahoe}; do \
78 rm -rf $$i; \
79 (cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
80 done
81
82update: update.${MACHINE}
c73cc458
MK
83 -for i in ${SYSDIRS}; do \
84 if [ ! -d $$i ]; \
85 then \
86 mkdir $$i; \
87 fi; \
88 for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
89 cmp -s ${SYS}/$$i/$$j $$i/$$j || \
90 install -c -m 444 ${SYS}/$$i/$$j $$i/$$j; \
91 done; \
92 done
93 for j in `cd ${SYS}/h; echo *.[ih]`; do \
94 cmp -s ${SYS}/h/$$j sys/$$j || \
95 { echo "install -c -m 444 ${SYS}/h/$$j sys/$$j"; \
96 install -c -m 444 ${SYS}/h/$$j sys/$$j; } \
97 done;
1f7d65ee
MK
98 rm -f machine
99 ln -s ${MACHINE} machine
100
101update.vax:
102 -for i in ${MACHDEP.vax}; do \
103 if [ ! -d $$i ]; \
104 then \
105 mkdir $$i; \
106 fi; \
107 for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
108 cmp -s ${SYS}/$$i/$$j $$i/$$j || \
109 install -c -m 444 ${SYS}/$$i/$$j $$i/$$j; \
110 done; \
111 done
112
113update.tahoe:
114 -for i in ${MACHDEP.tahoe}; do \
115 if [ ! -d $$i ]; \
116 then \
117 mkdir $$i; \
118 fi; \
119 for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
120 cmp -s ${SYS}/$$i/$$j $$i/$$j || \
121 install -c -m 444 ${SYS}/$$i/$$j $$i/$$j; \
122 done; \
123 done