Date: Wed, 01 Oct 2003 03:04:24 +0200 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/57438: [PATCH] bsd.port.subdir.mk: fix INDEX build Message-ID: <3F7A2818.1030104@fillmore-labs.com> Resent-Message-ID: <200310010110.h911AGUZ085526@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 57438 >Category: ports >Synopsis: [PATCH] bsd.port.subdir.mk: fix INDEX build >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 30 18:10:16 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Oliver Eikemeier >Release: FreeBSD 4.9-PRERELEASE i386 >Organization: Fillmore Labs - http://www.fillmore-labs.com >Environment: System: FreeBSD nuuk.fillmore-labs.com 4.9-PRERELEASE >Description: INDEX building fails with ports like `clean' because bsd.port.subdir.mk defines targets with the exact subdirectory names, leading to various problems if they conflict with otherwise defined targets. The patch prepends a `_' to every make target. >How-To-Repeat: Don't! See: http://lists.freebsd.org/pipermail/freebsd-ports/2003-September/005010.html >Fix: --- bsd.port.subdir.mk.patch begins here --- diff -u -r1.49 bsd.port.subdir.mk --- bsd.port.subdir.mk 6 Jul 2003 23:57:41 -0000 1.49 +++ bsd.port.subdir.mk 30 Sep 2003 20:59:38 -0000 @@ -99,7 +99,7 @@ .for __target in ${TARGETS} .if !target(${__target}) .if defined(SUBDIR) && !empty(SUBDIR) -${__target}: ${SUBDIR:S/$/.${__target}/} +${__target}: ${SUBDIR:S/^/_/:S/$/.${__target}/} .else ${__target}: .endif @@ -109,18 +109,18 @@ .if defined(SUBDIR) && !empty(SUBDIR) .for __target in ${TARGETS} checksubdirs readmes -${SUBDIR:S/$/.${__target}/}: _SUBDIRUSE +${SUBDIR:S/^/_/:S/$/.${__target}/}: _SUBDIRUSE .endfor _SUBDIRUSE: .USE - @OK=""; sub=${.TARGET:R}; \ + @OK=""; sub=${.TARGET:S/^_//:R}; \ for dud in $$DUDS; do \ if [ $${dud} = $$sub ]; then \ OK="false"; \ ${ECHO_MSG} "===> ${DIRPRFX}$$sub skipped"; \ fi; \ done; \ - if test -d ${.CURDIR}/${.TARGET:R}.${MACHINE_ARCH}; then \ + if test -d ${.CURDIR}/$${sub}.${MACHINE_ARCH}; then \ edir=$${sub}.${MACHINE_ARCH}; \ elif test -d ${.CURDIR}/$${sub}; then \ edir=$${sub}; \ @@ -135,7 +135,7 @@ DIRPRFX=${DIRPRFX}$$edir/; \ fi -.for _subdir in ${SUBDIR} +.for _subdir in ${SUBDIR:S/^/_/} ${_subdir}:: ${_subdir:S/$/.all/} .endfor @@ -150,14 +150,14 @@ .endif install: afterinstall afterinstall: realinstall -realinstall: beforeinstall ${SUBDIR:S/$/.realinstall/} +realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} .endif IGNOREDIR= CVS Mk Templates Tools distfiles packages pkg .if !target(checksubdirs) .if defined(PORTSTOP) -checksubdirs: checksubdir ${SUBDIR:S/$/.checksubdirs/} +checksubdirs: checksubdir ${SUBDIR:S/^/_/:S/$/.checksubdirs/} .else checksubdirs: checksubdir .endif @@ -187,7 +187,7 @@ .endif .if !target(readmes) -readmes: readme ${SUBDIR:S/$/.readmes/} +readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/} .endif .if !target(readme) --- bsd.port.subdir.mk.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F7A2818.1030104>