Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2008 23:02:20 +0200
From:      Nick Hibma <nick@anywi.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/126747: bsd.dep.mk does not remove .depend on cleandepend if CTAGS is not set or set to something other than ctags or gtags.
Message-ID:  <1219438940.453155.5430.nullmailer@van-laarhoven.org>
Resent-Message-ID: <200808222110.m7MLA2I8088086@freefall.freebsd.org>

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

>Number:         126747
>Category:       bin
>Synopsis:       bsd.dep.mk does not remove .depend on cleandepend if CTAGS is not set or set to something other than ctags or gtags.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 22 21:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Nick Hibma
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD hind.van-laarhoven.org 7.0-STABLE FreeBSD 7.0-STABLE #3: Thu Aug 14 21:10:55 CEST 2008 toor@hind.van-laarhoven.org:/usr/src/sys/i386/compile/HIND i386


>Description:
	cleandepend in /usr/share/mk/bsd.dep.mk depends on the CTAGS variable in a strange way.
	It does not remove the .depend file unless CTAGS is set to a value it understands.
>How-To-Repeat:

	make CTAGS=exctags depend
	make CTAGS=exctags cleandepend
	make CTAGS=exctags depend

Notice how the second time round the depend does not execute any commands.

>Fix:
Change in /usr/share/mk/bsd.dep.mk

	.if !target(cleandepend)
	cleandepend:
	.if defined(SRCS)
	.if ${CTAGS:T} == "ctags"
		rm -f ${DEPENDFILE} tags
	.elif ${CTAGS:T} == "gtags"
		rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS
	.if defined(HTML)
		rm -rf HTML
	.endif
	.endif
	.endif
	.endif

to

	.if !target(cleandepend)
	cleandepend:
	.if defined(SRCS)
	.if ${CTAGS:T} == "gtags"
		rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS
	.if defined(HTML)
		rm -rf HTML
	.endif
	.else
		rm -f ${DEPENDFILE} tags
	.endif
	.endif
	.endif

which deletes .depend and the tags file in all cases.
>Release-Note:
>Audit-Trail:
>Unformatted:



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