svn commit: r289391 - head/share/mk
Bryan Drewery
bdrewery at FreeBSD.org
Thu Oct 15 22:49:58 UTC 2015
Author: bdrewery
Date: Thu Oct 15 22:49:56 2015
New Revision: 289391
URL: https://svnweb.freebsd.org/changeset/base/289391
Log:
Make installing to a non-existent directory an error.
Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'. For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.
Now it will error that the file/directory does not exist rather than hide
the issue.
Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.
This is a mitigation of the problem. The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
Modified:
head/share/mk/bsd.confs.mk
head/share/mk/bsd.files.mk
head/share/mk/bsd.incs.mk
head/share/mk/bsd.info.mk
head/share/mk/bsd.lib.mk
head/share/mk/bsd.man.mk
head/share/mk/bsd.prog.mk
Modified: head/share/mk/bsd.confs.mk
==============================================================================
--- head/share/mk/bsd.confs.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.confs.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -69,7 +69,7 @@ _${group}INS: ${_${group}CONFS}
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
- ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
Modified: head/share/mk/bsd.files.mk
==============================================================================
--- head/share/mk/bsd.files.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.files.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -75,7 +75,7 @@ _${group}INS: ${_${group}FILES}
${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
- -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
Modified: head/share/mk/bsd.incs.mk
==============================================================================
--- head/share/mk/bsd.incs.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.incs.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -70,7 +70,7 @@ _${group}INS: ${_${group}INCS}
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
- ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
Modified: head/share/mk/bsd.info.mk
==============================================================================
--- head/share/mk/bsd.info.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.info.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -177,11 +177,11 @@ CLEANFILES+= ${INFO:S/$/.info.*.html/} $
install: ${INSTALLINFODIRS}
.if !empty(IFILES:N*.html)
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
- ${IFILES:N*.html} ${DESTDIR}${INFODIR}
+ ${IFILES:N*.html} ${DESTDIR}${INFODIR}/
.endif
.if !empty(FORMATS:Mhtml)
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
- ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}
+ ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}/
.endif
.else
# The indirection in the following is to avoid the null install rule
Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.lib.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -339,23 +339,23 @@ realinstall: _libinstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/
.endif
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(SHLIB_NAME)
${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
- ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}
+ ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
+ ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
${_INSTALLFLAGS} \
- ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}
+ ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/
.endif
.if defined(SHLIB_LINK)
.if commands(${SHLIB_LINK:R}.ld)
@@ -378,11 +378,11 @@ _libinstall:
.endif # SHIB_NAME
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
+ ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/
.endif
.endif # !defined(INTERNALLIB)
Modified: head/share/mk/bsd.man.mk
==============================================================================
--- head/share/mk/bsd.man.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.man.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -187,7 +187,7 @@ _maninstall: ${MAN}
.endfor
.else
.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}
- @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}; \
+ @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \
${ECHO} ${MINSTALL} ${_page} $${d}; \
${MINSTALL} $${page} $${d};
.endfor
@@ -201,7 +201,7 @@ _maninstall: ${MAN}
.else
.for __page in ${MAN}
${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \
- ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}
+ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \
${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/}
Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk Thu Oct 15 21:21:41 2015 (r289390)
+++ head/share/mk/bsd.prog.mk Thu Oct 15 22:49:56 2015 (r289391)
@@ -205,7 +205,7 @@ _proginstall:
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
+ ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
${INSTALL} -T debug -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug
More information about the svn-src-all
mailing list