Repeat after me kids: "I will not try to install files into a directory

when I'm not sure whether or not that directory exists."

Today I discovered that rebuilding /usr/include completely from scratch
doesn't work, because the libss Makefile tries to install headers into
/usr/include/ss, which 'make includes' does not create. The result is that
the libss Makefile plants the header files in /usr/include as individual
files called 'ss,' with the second one overwriting the first, and the
third one overwriting the second. So instead of a directory called
/usr/include/ss, you end up with just one file called /usr/include/ss with
only the last header file in it. Check out /usr/include/ss on freefall
and you'll see what I mean.

I've modified the beforeinstall target in the libss Makefile to check
for the presence of the ${DESTDIR}/usr/include/lbss directory and to
create it if it isn't already there. Hopefully I did it right.
This commit is contained in:
Bill Paul 1995-03-15 01:33:05 +00:00
parent e8f1ce6f5a
commit b337d29402

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.4 1995/02/08 21:11:39 bde Exp $
# $Id: Makefile,v 1.5 1995/02/12 02:35:35 phk Exp $
LIB= ss
SRCS= ss_err.c data.c error.c execute_cmd.c help.c invocation.c list_rqs.c \
@ -24,6 +24,10 @@ std_rqs.c: ${.CURDIR}/std_rqs.ct
-test -h std_rqs.ct && rm std_rqs.ct
beforeinstall:
-if [ ! -d ${DESTDIR}/usr/include/ss ]; then \
rm -fr ${DESTDIR}/usr/include/ss && \
mkdir ${DESTDIR}/usr/include/ss; \
fi
-cd ${.CURDIR}; cmp -s ss.h ${DESTDIR}/usr/include/ss/ss.h || \
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ss.h \
${DESTDIR}/usr/include/ss