Q:

Other targets don't update the target specific variable for a base target

Using the flowing make file:
ODIR = obj
_OBJ = hello.out
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
dir_guard=@mkdir -p $(@D)

echoit: $(OBJ)
    @echo $(BAR)

target: ODIR=obj/debug
target: OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
target: echoit

$(ODIR)/hello.out:
    $(dir_guard)
    touch $@

clean:
    rm -rd obj

When I call
make target

I get a file in obj/hello.out not obj/debug/hello.out as I expected.  Any Ideas what I'm missing.

A:

$(OBJ) in the echoit rule is expanded when the makefile is first parsed by make; target-specific variables are for use in recipes, not rules, as the manual points out

As with automatic variables, these values are only available within the context of a target’s recipe (and in other target-specific assignments).

I'm not exactly sure what you are trying to accomplish here, but it appears you were looking for something like
target: $(_OBJ:%=obj/debug/%)

