B2G icon indicating copy to clipboard operation
B2G copied to clipboard

make clean-gecko has some serious problems

Open joneschrisg opened this issue 13 years ago • 1 comments

  • If GECKO_PATH has trailing whitespace, e,g, "~/mozilla-central ", then

    rm -rf $(GECKO_OBJDIR)/objdir-prof-gonk

will blow away the source directory. Yow. As suggested by Thinker, this change fixes that particular issue

rm -rf $(strip $(GECKO_PATH))/objdir-prof-gonk

  • if GECKO_PATH has any internal whitespace by accident, e.g., "~/mozilla stuff/gecko", then make clean-gecko will blow away the longest prefix without internal whitespace. It's unlikely that other commands would work when that's the case, but we should protect against it anyway.

joneschrisg avatar Jan 17 '12 21:01 joneschrisg

rm -rf "$(GECKO_PATH)/objdir-prof-gonk" is another solution. But, users always can find a new way to be foolish. (ex: put qoutes in the string) Except, we check the variable and escape special characters.

ThinkerYzu avatar Jan 28 '12 15:01 ThinkerYzu