Custom Make Targets in Eclipse

So I wrote a script which aggregates a spreadsheet on our team’s shared drive with electrical port data into a header file which can be accessed at a certain URL.

I want to modify the robot’s build settings so that you can download this header file into the workspace from eclipse using a custom make target. I edited the build.xml, with the following code.

<target name=“port_names”>
<echo> Retrieving Hardware.h </echo>
<get dest="${src.dir}/Hardware.h" src="${URL}" verbose=“on” maxtime=“10” />

When I add this to build.xml it adds a node in the outline “port_names.” When I right click this node and click “Run as > Ant Build” it works. However I cannot figure out how to add Make Targets to the project such that it would do this from the Make Target Browser. Whenever I try creating a make target with the name “port_names” however, it just builds the User Program when I run it.

Has anyone successfully set up custom make commands? I’m also looking to set this up to customize robot deploys.

In my further troubleshooting, I’ve found that eclipse is a total dick.
This bug was the cause

Apparently it has C makefiles for compiling and Ant builds for deploying??? Basically make targets by default call make on the build command you specify.

If you want to write a custom target you need to make a makefile.init file in the working directory.
Alternatively, if you used the xml code and put it in your build.xml like me, you need to specify in the make target to run the build command
ant -f ${ProjDirPath}/build.xml YourTargetHere