mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Added trailing slash to ${CANONICALOBJDIR} in tests for directories,
so that /usr/obj can be a symlink to an existing directory.
This commit is contained in:
parent
c0bb409c43
commit
409ac84cb2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25316
@ -1,4 +1,4 @@
|
||||
# $Id$
|
||||
# $Id: bsd.obj.mk,v 1.19 1997/02/22 13:56:12 peter Exp $
|
||||
#
|
||||
# The include file <bsd.obj.mk> handles creating the 'obj' directory
|
||||
# and cleaning up object files, log files etc.
|
||||
@ -66,9 +66,9 @@ obj:
|
||||
.else
|
||||
.if !defined(OBJLINK)
|
||||
obj: _SUBDIR
|
||||
@if ! test -d ${CANONICALOBJDIR}; then \
|
||||
@if ! test -d ${CANONICALOBJDIR}/; then \
|
||||
mkdir -p ${CANONICALOBJDIR}; \
|
||||
if ! test -d ${CANONICALOBJDIR}; then \
|
||||
if ! test -d ${CANONICALOBJDIR}/; then \
|
||||
${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@ -76,9 +76,9 @@ obj: _SUBDIR
|
||||
fi
|
||||
.else
|
||||
obj: _SUBDIR
|
||||
@if ! test -d ${CANONICALOBJDIR}; then \
|
||||
@if ! test -d ${CANONICALOBJDIR}/; then \
|
||||
mkdir -p ${CANONICALOBJDIR}; \
|
||||
if ! test -d ${CANONICALOBJDIR}; then \
|
||||
if ! test -d ${CANONICALOBJDIR}/; then \
|
||||
${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@ -92,7 +92,7 @@ obj: _SUBDIR
|
||||
|
||||
.if !target(objlink)
|
||||
objlink: _SUBDIR
|
||||
@if test -d ${CANONICALOBJDIR}; then \
|
||||
@if test -d ${CANONICALOBJDIR}/; then \
|
||||
rm -f ${.CURDIR}/obj; \
|
||||
ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
|
||||
else \
|
||||
@ -112,7 +112,7 @@ whereobj:
|
||||
# cleanup
|
||||
#
|
||||
cleanobj:
|
||||
@if [ -d ${CANONICALOBJDIR} ]; then \
|
||||
@if [ -d ${CANONICALOBJDIR}/ ]; then \
|
||||
rm -rf ${CANONICALOBJDIR}; \
|
||||
else \
|
||||
cd ${.CURDIR} && ${MAKE} clean cleandepend; \
|
||||
|
Loading…
Reference in New Issue
Block a user