Our binaries are tagged with a "version", which is the number of git commits in our repo.

I have a notfile rule called 'tag-file' which removes any previously installed binaries and installs the binary with the latest version tag.

notfile . : @tag-file : install-target : ;
actions tag-file
{
    $(TOP)/utils/bash/rm_tagged_output.sh $(>) short
    cp $(>) $(>).$(SHORT_TAG) 
}

I copy the above snippet into every executable jamfile (My bjamfu is not good enough to figure out how to get around this duplication everywhere, but that's not the issue here)

I've suddenly had bjam fail for only 1 instance of this tag-file action. 

error: target { Jamfile</home/steve/src/vc/cay/strategies/athena/gui>%Jamfile</home/steve/src/vc/cay/strategies/athena/gui>.tag-file-. { common%common.copy-athena_gui.EXE { gcc%gcc.link-athena_gui.EXE { gcc%gcc.compile.c++-main.o.OBJ { main.cpp.CPP } } { ... } } } } } has no type

This is the Jamfile which is failing:

constant EXE : athena_gui ;

exe $(EXE)
:   [ glob *.cpp *.cc *.h *.qrc ]
    /cay/algo_gui/app//app
    /cay/strategies//athena/msg/
;

install install-target : $(EXE) : <location>. ;

notfile . : @tag-file : install-target : ;
actions tag-file
{
    $(TOP)/utils/bash/rm_tagged_output.sh $(>) short
    cp $(>) $(>).$(SHORT_TAG) 
}


I have literally the exact same Jamfile with a different library and exe-name, and it works there:

constant EXE : uranus_gui ;

exe $(EXE)
:   [ glob *.cpp *.cc *.h *.qrc ]
    /cay/algo_gui/app//app
    /cay/strategies//uranus/msg/
;

install install-target : $(EXE) : <location>. ;

notfile . : @tag-file : install-target : ;
actions tag-file
{
    $(TOP)/utils/bash/rm_tagged_output.sh $(>) short
    cp $(>) $(>).$(SHORT_TAG) 
}

When I run bjam with the 'athena_gui` tag-file action commented out, you can see the tag-file action being run for other targets elsewhere:

$ bjam

...patience...
...patience...
...found 17490 targets...
...updating 3 targets...
Jamfile</home/steve/src/vc/cay/strategies/eos/gui>.tag-file <lstrategies!eos!gui/gcc-4.9.2/debug/link-static/threading-multi>
Jamfile</home/steve/src/vc/cay/strategies/uranus/gui>.tag-file <lstrategies!uranus!gui/gcc-4.9.2/debug/link-static/threading-multi>
Jamfile</home/steve/src/vc/cay/venus/athena>.tag-file <lvenus!athena/gcc-4.9.2/debug/link-static/threading-multi>
...updated 3 targets...

So why does it work for some targets, not not for this particular target? What is causing the "target has no type" error, and how can I fix it?