Skip to content

Commit 5278b8e

Browse files
riastradhriastradh
riastradh
authored and
riastradh
committed
Makefile: Run postinstall -d /', not postinstall -d //'.
This happens when doing `build.sh install=/'. The message is less confusing and it makes postinstall's job simpler for detecting when it's installing to / rather than somewhere else.
1 parent 70ddceb commit 5278b8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.337 2023/06/11 10:43:51 lukem Exp $
1+
# $NetBSD: Makefile,v 1.338 2023/09/08 12:01:56 riastradh Exp $
22

33
#
44
# This is the top-level makefile for building NetBSD. For an outline of
@@ -190,23 +190,23 @@ _POSTINSTALL_X11=-x ${X11SRCDIR:Q}
190190

191191
postinstall-check: .PHONY
192192
@echo " === Post installation checks ==="
193-
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi
193+
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR:C/^\/$//}/ check; if [ $$? -gt 1 ]; then exit 1; fi
194194
@echo " ================================"
195195

196196
postinstall-fix: .NOTMAIN .PHONY
197197
@echo " === Post installation fixes ==="
198-
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix
198+
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR:C/^\/$//}/ fix
199199
@echo " ==============================="
200200

201201
postinstall-fix-obsolete: .NOTMAIN .PHONY
202202
@echo " === Removing obsolete files ==="
203-
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete
203+
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete
204204
@echo " ==============================="
205205

206206
postinstall-fix-obsolete_stand: .NOTMAIN .PHONY
207207
@echo " === Removing obsolete files ==="
208-
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand
209-
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR}/ fix obsolete_stand_debug
208+
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete_stand
209+
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} ${_POSTINSTALL_X11} -d ${DESTDIR:C/^\/$//}/ fix obsolete_stand_debug
210210
@echo " ==============================="
211211

212212

0 commit comments

Comments
 (0)