Makefile, complex targets and dependencies



I need to have for complex rules and targets, at least I think they are
comples, to avoid copying the same thing over and over.
Here's a sample of what I have and tried.
gmake 3.79 HPUX
__BEGIN__
define stuff
@echo $(1); sleep 10
endef


PROJ := proj1 proj2 proj3 proj4 proj5 proj6 proj7
BB := bb1 bb2 bb3 bb4 bb5 bb6 bb7

all : $(PROJ)

$(filter proj1,$(PROJ)) : proj1

$(PROJ) : $(addprefix %_ , $(BB))
$(call stuff,$@)
# this is line 24 by hitting arrow down
$(addprefix %_ , $(BB)) :
$(call stuff,$@)
__END__

I need every project to depend on <proj>_<bb>
Then <proj>_<bb> to do a call Using this would eliminate from having
to write 49 rules to make sure that every proj has every bb.

When I execute the above I get :
Makefile:24: *** mixed implicit and normal rules. Stop.

.