Go to Post And like Woodie told us in his talk, all the bad stuff we anguished over will be replaced by the memories of the achievements and good time we had this year. - Wayne C. [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2015, 22:22
EdWard3637's Avatar
EdWard3637 EdWard3637 is offline
Registered User
AKA: Eric Ward
FRC #3637 (Daleks)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Flemington, NJ
Posts: 10
EdWard3637 is an unknown quantity at this point
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" />
</target>

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.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2015, 19:56
EdWard3637's Avatar
EdWard3637 EdWard3637 is offline
Registered User
AKA: Eric Ward
FRC #3637 (Daleks)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Flemington, NJ
Posts: 10
EdWard3637 is an unknown quantity at this point
Re: Custom Make Targets in Eclipse

In my further troubleshooting, I've found that eclipse is a total dick.
This bug was the cause https://bugs.eclipse.org/bugs/show_bug.cgi?id=304774

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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi