B2G
B2G copied to clipboard
make clean-gecko has some serious problems
-
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.
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.