Date: Mon, 24 Nov 2003 00:31:50 +0100 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/59626: [PATCH] bsd.port.subdir.mk: more informative INDEX breakage Message-ID: <3FC14366.3000907@fillmore-labs.com> Resent-Message-ID: <200311232340.hANNeDkK009524@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 59626 >Category: ports >Synopsis: [PATCH] bsd.port.subdir.mk: more informative INDEX breakage >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 23 15:40:13 PST 2003 >Closed-Date: >Last-Modified: >Originator: Oliver Eikemeier >Release: FreeBSD 5.1-CURRENT i386 >Organization: Fillmore Labs - http://www.fillmore-labs.com >Environment: System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT >Description: The `INDEX build failed' reminder mails are helpful but lack the basic information which port causes the failure, causing a major guesswork based on the most recent updates which port caused the failure. This is a great opportunity to learn about the structure of the FreeBSD ports tree but delays fixing the error, which can sometimes be tedious. >How-To-Repeat: Insert XXX!= /nonexistent in line 7 of arabic/openoffice-1.1/Makefile and do a `make index >/dev/null'. You'll get: /nonexistent: not found "Makefile", line 7: warning: "/nonexistent" returned non-zero status >Fix: This patch collects error output from `make describe' in a temporary file and prefixes that with the ports origin if not empty, so you'll get: ===> arabic/openoffice-1.1 failed: /nonexistent: not found "Makefile", line 7: warning: "/nonexistent" returned non-zero status --- bsd.port.subdir.mk.patch begins here --- diff -u Mk/bsd.port.subdir.mk.orig Mk/bsd.port.subdir.mk --- Mk/bsd.port.subdir.mk.orig 7 Nov 2003 08:51:46 -0000 +++ Mk/bsd.port.subdir.mk 23 Nov 2003 17:01:37 -0000 @@ -83,7 +88,6 @@ TARGETS+= deinstall TARGETS+= depend TARGETS+= depends -TARGETS+= describe TARGETS+= distclean TARGETS+= extract TARGETS+= fetch @@ -108,7 +112,7 @@ .if defined(SUBDIR) && !empty(SUBDIR) -.for __target in ${TARGETS} checksubdirs readmes +.for __target in ${TARGETS} checksubdirs describe readmes ${SUBDIR:S/^/_/:S/$/.${__target}/}: _SUBDIRUSE .endfor @@ -184,6 +188,43 @@ ${ECHO} "Warning: directory $$s in SUBDIR does not exist"; \ fi \ done +.endif + +.if !target(describe) +.if defined(PORTSTOP) +describe: ${SUBDIR:S/^/_/:S/$/.describe/} +.else +describe: + @TMPFILE=`mktemp -q /tmp/describe.XXXXXX` || exit 1; \ + for sub in ${SUBDIR}; do \ + OK=""; \ + for dud in $$DUDS; do \ + if [ $${dud} = $$sub ]; then \ + OK="false"; \ + ${ECHO_MSG} "===> ${DIRPRFX}$$sub skipped"; \ + fi; \ + done; \ + if test -d ${.CURDIR}/$${sub}.${MACHINE_ARCH}; then \ + edir=$${sub}.${MACHINE_ARCH}; \ + elif test -d ${.CURDIR}/$${sub}; then \ + edir=$${sub}; \ + else \ + OK="false"; \ + ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ + fi; \ + if [ "$$OK" = "" ]; then \ + ${ECHO_MSG} "===> ${DIRPRFX}$${edir}"; \ + cd ${.CURDIR}/$${edir}; \ + ${MAKE} -B describe 2>$${TMPFILE}; \ + if [ -s $${TMPFILE} ]; then \ + echo "===> ${DIRPRFX}$${sub} failed:" >&2; \ + cat $${TMPFILE} >&2; \ + echo -n >$${TMPFILE}; \ + fi; \ + fi; \ + done; \ + rm -f $${TMPFILE} +.endif .endif .if !target(readmes) --- bsd.port.subdir.mk.patch ends here --- If this patch finds consent it can probably reworked it to reduce code duplication. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FC14366.3000907>