You have defined rule (which is basically a function in jam-speak)
that calls the 'obj' rule. The obj rule is called with 'test_obj' as
the name, and create main target called 'test_obj'. There's no target
called 'test' declared.

Just calling a function does not automatically creates a main target.
There are just two ways to create a main target:

- Call the targets.main-target-alternative
- Call some existing rule that creates main target. That will
will eventually call targets.main-target-alternative