date and time created 86/05/11 15:35:41 by karels
[unix-history] / usr / src / include / Makefile.install
#
# Copyright (c) 1983,1986 Regents of the University of California.
# All rights reserved. The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
#
# @(#)Makefile.install 5.1 (Berkeley) %G%
#
# Doing a make install builds /usr/include
#
# Define SHARED to indicate whether you want
# symbolic links to the system source (``symlinks''),
# or a separate copy (``copies'').
# (latter useful in environments where it's
# not possible to keep /sys publicly readable)
#
# The ``rm -rf''s used below are safe because rm doesn't
# follow symbolic links.
#
DESTDIR=
MACHINE=vax
MACHDEP=${MACHINE} vaxif vaxmba vaxuba
NETDIRS=net netimp netinet netns
SYSDIRS=${NETDIRS} stand ${MACHDEP}
SYS=/sys
all:
@echo "\"make symlinks\", \"make copies\", or \"make update\" only"
@false
symlinks:
for i in ${SYSDIRS}; do \
rm -rf $$i; \
ln -s ${SYS}/$$i $$i; \
done
rm -rf sys
ln -s ${SYS}/h sys
copies:
-for i in ${SYSDIRS}; do \
rm -rf $$i; \
(cd ${SYS}; tar cf - $$i/*.h) | tar xpfB -; \
done
rm -rf sys;
mkdir sys;
chmod 775 sys;
-(cd ${SYS}/h; tar cf - *.h) | (cd sys; tar xpfB -)
update:
-for i in ${SYSDIRS}; do \
if [ ! -d $$i ]; \
then \
mkdir $$i; \
fi; \
for j in `cd ${SYS}/$$i; echo *.[ih]`; do \
cmp -s ${SYS}/$$i/$$j $$i/$$j || \
install -c -m 444 ${SYS}/$$i/$$j $$i/$$j; \
done; \
done
for j in `cd ${SYS}/h; echo *.[ih]`; do \
cmp -s ${SYS}/h/$$j sys/$$j || \
{ echo "install -c -m 444 ${SYS}/h/$$j sys/$$j"; \
install -c -m 444 ${SYS}/h/$$j sys/$$j; } \
done;