Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2003 00:07:39 +0200 (CEST)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/54422: [PATCH] remove redundant "-p" from "mkdir -p -p" in docproj Makefiles
Message-ID:  <200307122207.h6CM7dAg014259@korben.in.tern>
Resent-Message-ID: <200307122210.h6CMA94k013630@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         54422
>Category:       docs
>Synopsis:       [PATCH] remove redundant "-p" from "mkdir -p -p" in docproj Makefiles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 12 15:10:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lukas Ertl
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Vienna University Computer Center
>Environment:
System: FreeBSD korben 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Jul 12 01:04:24 CEST 2003 le@korben:/usr/obj/usr/src/sys/KORBEN i386


	
>Description:

Since MKDIR is already defined as "/bin/mkdir -p" in share/mk/doc.project.mk
the additional "-p" in several *.mk files is not needed.

>How-To-Repeat:
	
>Fix:

	

--- doc.diff begins here ---
Index: share/mk/doc.docbook.mk
===================================================================
RCS file: /usr/local/bsdcvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.90
diff -u -u -r1.90 doc.docbook.mk
--- share/mk/doc.docbook.mk	5 Jul 2003 10:09:50 -0000	1.90
+++ share/mk/doc.docbook.mk	12 Jul 2003 22:02:12 -0000
@@ -748,7 +748,7 @@
 .else
 install-${_curformat}: ${DOC}.${_curformat}
 .endif
-	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
+	@[ -d ${DESTDIR} ] || ${MKDIR} ${DESTDIR}
 .if ${_cf} == "html-split"
 	${INSTALL_DOCS} $$(${XARGS} < HTML.manifest) ${DESTDIR}
 .else
@@ -766,7 +766,7 @@
 .endif
 .for _curimage in ${IMAGES_LIB}
 	@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \
-		${MKDIR} -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
+		${MKDIR} ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 	${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} \
 			${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 .endfor
@@ -777,11 +777,11 @@
 # Install at first images from /usr/share/images then localized ones
 # cause of a different origin path.
 .for _curimage in ${IMAGES_PNG:M*/*:M*share*}
-	${MKDIR} -p ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
+	${MKDIR} ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
 	${INSTALL_DOCS} ${_curimage} ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
 .endfor
 .for _curimage in ${IMAGES_PNG:M*/*:N*share*}
-	${MKDIR} -p ${DESTDIR}/${_curimage:H}
+	${MKDIR} ${DESTDIR}/${_curimage:H}
 	${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
 .endfor
 .for _curimage in ${IMAGES_PNG:N*/*}
@@ -789,7 +789,7 @@
 .endfor
 .elif ${_cf} == "tex" || ${_cf} == "dvi"
 .for _curimage in ${IMAGES_EPS:M*/*}
-	${MKDIR} -p ${DESTDIR}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR:T}/||}
+	${MKDIR} ${DESTDIR}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR:T}/||}
 	${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR:T}/||}
 .endfor
 .for _curimage in ${IMAGES_EPS:N*/*}
@@ -802,14 +802,14 @@
 .if ${_cf} == "html-split"
 .for _compressext in ${KNOWN_COMPRESS}
 install-${_curformat}.tar.${_compressext}: ${DOC}.${_curformat}.tar.${_compressext}
-	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
+	@[ -d ${DESTDIR} ] || ${MKDIR} ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 .endfor
 .else
 .for _compressext in ${KNOWN_COMPRESS}
 .if !target(install-${_curformat}.${_compressext})
 install-${_curformat}.${_compressext}: ${DOC}.${_curformat}.${_compressext}
-	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
+	@[ -d ${DESTDIR} ] || ${MKDIR} ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 .if ${_cf} == "pdb"
 	${LN} -f ${DESTDIR}/${.ALLSRC} \
Index: share/mk/doc.html.mk
===================================================================
RCS file: /usr/local/bsdcvs/doc/share/mk/doc.html.mk,v
retrieving revision 1.17
diff -u -u -r1.17 doc.html.mk
--- share/mk/doc.html.mk	4 May 2003 11:13:57 -0000	1.17
+++ share/mk/doc.html.mk	12 Jul 2003 22:02:47 -0000
@@ -275,14 +275,14 @@
 _cf=${_curformat}
 .if !target(install-${_cf})
 install-${_curformat}: ${DOC}.${_curformat}
-	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
+	@[ -d ${DESTDIR} ] || ${MKDIR} ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 .if !empty(CSS_SHEET)
 	${INSTALL_DOCS} ${CSS_SHEET} ${DESTDIR}
 .endif
 .for _curimage in ${IMAGES_LIB}
 	@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \
-		${MKDIR} -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
+		${MKDIR} ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 	${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} \
 			${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
 .endfor
@@ -291,7 +291,7 @@
 # the ones that don't contain a directory separator, and install them in the
 # top level.
 .for _curimage in ${IMAGES_PNG:M*/*:M*share*}
-	${MKDIR} -p ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
+	${MKDIR} ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
 	${INSTALL_DOCS} ${_curimage} ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
 .endfor
 .for _curimage in ${IMAGES_PNG:N*/*}
@@ -303,7 +303,7 @@
 
 .for _compressext in ${KNOWN_COMPRESS}
 install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
-	@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
+	@[ -d ${DESTDIR} ] || ${MKDIR} ${DESTDIR}
 	${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
 .endfor
 .endif
Index: share/mk/doc.subdir.mk
===================================================================
RCS file: /usr/local/bsdcvs/doc/share/mk/doc.subdir.mk,v
retrieving revision 1.10
diff -u -u -r1.10 doc.subdir.mk
--- share/mk/doc.subdir.mk	21 May 2003 21:16:10 -0000	1.10
+++ share/mk/doc.subdir.mk	12 Jul 2003 22:03:04 -0000
@@ -138,7 +138,7 @@
 .if !target(obj)
 obj:	_SUBDIRUSE
 	@if ! [ -d ${CANONICALOBJDIR}/ ]; then \
-		${MKDIR} -p ${CANONICALOBJDIR}; \
+		${MKDIR} ${CANONICALOBJDIR}; \
 		if ! [ -d ${CANONICALOBJDIR}/ ]; then \
 			${ECHO_CMD} "Unable to create ${CANONICALOBJDIR}."; \
 			exit 1; \
@@ -202,7 +202,7 @@
 _IMAGESUBDIR: .USE
 .for dir in ${_imagesubdir}
 	@if ! [ -d ${CANONICALOBJDIR}/${dir}/ ]; then \
-		${MKDIR} -p ${CANONICALOBJDIR}/${dir}; \
+		${MKDIR} ${CANONICALOBJDIR}/${dir}; \
 		if ! [ -d ${CANONICALOBJDIR}/${dir}/ ]; then \
 			${ECHO_CMD} "Unable to create ${CANONICALOBJDIR}/${dir}/."; \
 			exit 1; \
--- doc.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307122207.h6CM7dAg014259>