freebsd-dev/share/info/Makefile
Ruslan Ermilov 96f1512e70 INFODIR is defined in bsd.own.mk but sys.mk no longer includes
bsd.own.mk as of share/mk/sys.mk,v 1.60.

I did not notice this because I tested with DESTDIR=/foo/5.0,
and the "exists(/foo/5.0)" test apparently succeeded.

Reported by:	fenner
2002-04-18 06:55:32 +00:00

23 lines
651 B
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
NOOBJ= noobj
.include <bsd.prog.mk>
beforeinstall:
.if !exists(${DESTDIR}${INFODIR})
@echo "Warning: the directory ${DESTDIR}${INFODIR} does not exist!"
@echo "Perhaps the variable INFODIR is set incorrectly"
@echo "or your mtree database files are broken."
@echo ""
@echo "As a workaround you can create the directory by hand, e.g.:"
@echo -n "install -d -o ${INFOOWN} -g ${INFOGRP} "
@echo "-m 0755 ${DESTDIR}${INFODIR}"
@exit 3;
.endif
.if !exists(${DESTDIR}${INFODIR}/dir)
${INSTALL} -c -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
dir-tmpl ${DESTDIR}${INFODIR}/dir
.endif