git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: don't run rm without any files

From
MKMatt Kraai <kraai@ftbfs.org>
Date
Feb 13, 2013, 17:00 UTC
Message-ID
<20130213170028.GA410@ftbfs.org>
In-Reply-To
<7vtxpg9mxq.fsf@alter.siamese.dyndns.org>
On Wed, Feb 13, 2013 at 08:51:45AM -0800, Junio C Hamano wrote:
Show 24 quoted lines
> Matt Kraai <kraai@ftbfs.org> writes:
> 
> > From: Matt Kraai <matt.kraai@amo.abbott.com>
> >
> > "rm -f -r" fails on QNX when not passed any files to remove.
> 
> I do not think it is limited to QNX.
> 
> > the clean target, since dep_dirs is empty.
> 
> And dep_dirs being empty under some circumstance shouldn't be
> limited to QNX, either.
> 
> I think your change does no harm, may be a good change if dep_dirs
> goes empty, but the justification is lacking.  What caused your
> dep_dirs to become empty in the first place?
> 
> I am scratching my head because I see
> 
>     OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
> 	$(XDIFF_OBJS) \
> 	$(VCSSVN_OBJS) \
> 	git.o
>     dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))

I don't set COMPUTE_HEADER_DEPENDENCIES, so it defaults to "auto". The automatic detection determines that the compiler doesn't support it, so it's then set to "no". CHECK_HEADER_DEPENDENCIES isn't set either, so about 20 lines below the dep_dirs assignment you quoted, dep_dirs is cleared:

 ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes)
 ifndef CHECK_HEADER_DEPENDENCIES
 dep_dirs =
 ...
Should I submit an updated patch with a different commit message?
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “Makefile: don't run rm without any files”
  1. Makefile: don't run rm without any filesMatt Kraai, Feb 13, 2013
  2. Junio C HamanoFeb 13, 2013
  3. Matt KraaiFeb 13, 2013
  4. Junio C HamanoFeb 13, 2013
  5. Jonathan NiederFeb 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.