Set permissions and ownership all at once. (No more directories mode 0777)

This commit is contained in:
proven 1993-05-05 18:45:25 +00:00
parent 5a4886054c
commit ee9537f648
2 changed files with 22 additions and 17 deletions

View File

@ -20,7 +20,7 @@ FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
MFILES= float.h frame.h
LFILES= errno.h fcntl.h signal.h syslog.h termios.h
DIRS=arpa protocols
DIRS= arpa protocols
LDIRS= net netinet netccitt netiso netns nfs sys ufs vm
NOOBJ= noobj
@ -35,8 +35,7 @@ install: beforeinstall _PROGSUBDIR ${SHARED}
@echo installing ${FILES}
@-for i in ${FILES}; do \
cmp -s $$i ${DESTDIR}/usr/include/$$i || \
install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
${DESTDIR}/usr/include/$$i; \
install -c $$i ${DESTDIR}/usr/include/$$i; \
done
@echo installing ${DIRS}
@-for i in ${DIRS}; do \
@ -45,32 +44,28 @@ install: beforeinstall _PROGSUBDIR ${SHARED}
mkdir ${DESTDIR}/usr/include/$$i; \
fi; \
chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
chmod 755 ${DESTDIR}/usr/include/$$i; \
(cd $$i; for j in *.[ih]; do \
cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
${DESTDIR}/usr/include/$$i/$$j; \
install -c 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
done); \
done
@echo installing ${LFILES}
@-for i in ${LFILES}; do \
rm -f ${DESTDIR}/usr/include/$$i; \
ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
done
@echo installing ${MFILES}
@-for i in ${MFILES}; do \
rm -f ${DESTDIR}/usr/include/$$i; \
ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/$$i; \
done
@chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include
@chmod -R a-w ${DESTDIR}/usr/include
beforeinstall:
@if [ ! -d ${DESTDIR}/usr/include ]; then \
/bin/rm -f ${DESTDIR}/usr/include ; \
mkdir -p ${DESTDIR}/usr/include ; \
chown root.wheel ${DESTDIR}/usr/include ; \
chmod 755 ${DESTDIR}/usr/include ; \
else \
true ; \
fi
@ -89,6 +84,15 @@ copies:
symlinks:
@echo symlinks: ${LDIRS}
@for i in ${LDIRS}; do \
rm -rf ${DESTDIR}/usr/include/$$i; \
ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
done
rm -rf ${DESTDIR}/usr/include/machine
ln -s /sys/${MACHINE}/include ${DESTDIR}/usr/include/machine
.include <bsd.prog.mk>
nks: ${LDIRS}
@for i in ${LDIRS}; do \
rm -rf ${DESTDIR}/usr/include/$$i; \
ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \

View File

@ -1,7 +1,7 @@
#
# @(#)Makefile 2.3 88/08/11 4.0 RPCSRC
#
# $Header: /cvsroot/src/include/rpcsvc/Attic/Makefile,v 1.2 1993/04/26 05:04:58 deraadt Exp $
# $Header: /cvsroot/src/include/rpcsvc/Attic/Makefile,v 1.3 1993/05/05 18:45:34 proven Exp $
#
.SUFFIXES: .x
@ -22,19 +22,20 @@ all: ${HDRS}
install:
@echo "Creating RPC service headers directory"
@/bin/rm -rf ${DESTDIR}/usr/include/rpcsvc
@-mkdir ${DESTDIR}/usr/include/rpcsvc && \
chown bin ${DESTDIR}/usr/include/rpcsvc && \
chmod 755 ${DESTDIR}/usr/include/rpcsvc
@-mkdir ${DESTDIR}/usr/include/rpcsvc
@echo "Installing RPC service header and definition files"
@for i in $(XFILES); do \
(install -c -m 644 ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done
(install -c ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done
@for i in $(HDRS); do \
(install -c -m 644 $$i ${DESTDIR}/usr/include/rpcsvc) done
(install -c $$i ${DESTDIR}/usr/include/rpcsvc) done
@for i in $(HFILES); do \
(install -c -m 644 ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done
(install -c ${.CURDIR}/$$i ${DESTDIR}/usr/include/rpcsvc) done
@chown -R ${BINOWN}.${BINGRP} ${DESTDIR}/usr/include/rpcsvc
@chmod -R a-w ${DESTDIR}/usr/include/rpcsvc
.x.h:
@echo generating $@...
@PWD=`pwd` ; cd ${.CURDIR} ; ${RPCCOM} -h $*.x -o $$PWD/$@
.include <bsd.prog.mk>
prog.mk>