Go to Post The sponsor had a $2000 sheet of aircraft aluminum in their scrap bin? Do they also blow stacks of dollar bills off their loading dock with a giant fan? - Richard Wallace [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 05-06-2010, 11:46
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
WindRiver & Git - Makefile

Hi all,

Been playing with using C++ to program the robot instead of LabVIEW and I've been using Git as my VCS.

Things are working fine except for the Makefile. I haven't programmed in C++ for years so I'm not sure if this is how things are done or what. I noticed the makefile has a lot of exact paths (C:/Users/Tanner/blah/blah) which doesn't work too well in a VCS unless everyone has my computer (doubtful) and they don't want to compile.

So what I'm asking is there a way to modify the Makefile so it can play a bit more nicely with Git?

-Tanner
Reply With Quote
  #2   Spotlight this post!  
Unread 05-06-2010, 14:31
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: WindRiver & Git - Makefile

Why are you putting the makefiles under version control? If you are using WindRiver you don't even need to know what makefiles are.
Just put the actual code under control.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 05-06-2010, 14:51
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by byteit101 View Post
Why are you putting the makefiles under version control? If you are using WindRiver you don't even need to know what makefiles are.
Just put the actual code under control.
Because otherwise I get:
Code:
C:\windriver\vxworks-6.3\host\x86-win32\bin\make.exe: *** No targets specified and no makefile found.  Stop.
Hm?

-Tanner
Reply With Quote
  #4   Spotlight this post!  
Unread 05-06-2010, 15:10
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: WindRiver & Git - Makefile

what if you create a project on each machine that will be using the versioning to create the makefiles, then import the versioned files into the project?
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #5   Spotlight this post!  
Unread 05-06-2010, 16:47
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by Tanner View Post
Because otherwise I get:
Code:
C:\windriver\vxworks-6.3\host\x86-win32\bin\make.exe: *** No targets specified and no makefile found.  Stop.
Hm?

-Tanner
does WR do this to you for every new project? I haven't seen this myself, and it shouldn't do it at all unless you messed with it.
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 06-06-2010 at 11:44. Reason: Bad wording
Reply With Quote
  #6   Spotlight this post!  
Unread 06-06-2010, 13:43
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by byteit101 View Post
does WR do this to you for every new project? I haven't seen this myself, and it shouldn't do it at all unless you messed with it.
No, WindRiver handles it and I never see this unless I take it away.

I'm confused how WindRiver is going to compile fine without the makefiles. Maybe I'm importing the project wrongly into WindRiver, but I'm not seeing how it can be done otherwise.

Quote:
Originally Posted by Radical Pi View Post
what if you create a project on each machine that will be using the versioning to create the makefiles, then import the versioned files into the project?
This probably one way of doing things, though it might be a bit interesting to manage when a file is added/deleted in the repository. WindRiver might not notice it.

How do people using SVN manage the makefile?

-Tanner
Reply With Quote
  #7   Spotlight this post!  
Unread 06-06-2010, 13:53
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by Tanner View Post
How do people using SVN manage the makefile
SVN is built into Wind River (or it's an eclipse extension - I don't remember) so everything is handled automatically
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #8   Spotlight this post!  
Unread 06-06-2010, 13:54
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by Tanner View Post
I'm confused how WindRiver is going to compile fine without the makefiles. Maybe I'm importing the project wrongly into WindRiver, but I'm not seeing how it can be done otherwise.
How are you importing it?
Quote:
Originally Posted by Tanner View Post
How do people using SVN manage the makefile?
I don't, I just use the subclipse plugin and it takes care of it all. the only files that I dont see in the project that it svn's are .cproject .project .wrmakefile and .wrproject
EDIT: found EGit, a git plugin for eclipse/windriver: http://www.eclipse.org/egit/download/ I would import from the git source when it is installed
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 06-06-2010 at 13:57. Reason: found git plugin
Reply With Quote
  #9   Spotlight this post!  
Unread 08-06-2010, 08:17
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by byteit101 View Post
How are you importing it?
Well, I couldn't figure much out how to get WindRiver to detect a project existed (outside of playing the project folder in the Wordspace directory), but the File -> Import seemed to work. I'm not sure on the specifics (at work right now), but that's pretty much it.

Quote:
Originally Posted by byteit101 View Post
I don't, I just use the subclipse plugin and it takes care of it all. the only files that I dont see in the project that it svn's are .cproject .project .wrmakefile and .wrproject
EDIT: found EGit, a git plugin for eclipse/windriver: http://www.eclipse.org/egit/download/ I would import from the git source when it is installed
Hm, that's strange. I wonder what magic it does.

I'll have to try the EGit when I get home. Might give me better results.

-Tanner
Reply With Quote
  #10   Spotlight this post!  
Unread 08-06-2010, 13:53
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: WindRiver & Git - Makefile

I don't have the computer with me right now that I use for FIRST development, so I don't know the specific instructions, but I'll try from memory.

We use SVN to host just our code. No makefiles, no project files, just .cpp & .h. Each developer then creates a project using one of the sample projects as a base, cleans out all the default code files, renames the project, etc. Then we import (I believe that's the correct menu option, but I'm not certain) the directory that contains all our SVN code. Our code is then buildable. When someone adds or removes a file, it's necessary to refresh the file browser tree.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-06-2010, 00:17
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is online now
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: WindRiver & Git - Makefile

I've done it on SVN with just .h and .cpp files. Here is a procedure I wrote a couple of years ago for the guys on my team (I updated it a bit, but there may be mistakes).

We use TortoiseSVN, hence the Windows Explorer right-click-menu bit.

Quote:
  • Run Wind River Workbench 3.0.
  • Go to File->New->Example...
  • Select VxWorks Downloadable Kernel Module Sample Project and click Next
  • Select FRC Default Program and click Finish
  • Right-click on BuiltinDefaultCode in the Project Explorer and select Rename.
  • Enter the desired project name.
  • In the [project name] project in the Project Explorer, delete BuildinDefaultCode.cpp and sample.txt.
  • In Windows Explorer, navigate to C:\WindRiver\workspace\.
  • Right-click on the [project name] folder and select SVN Checkout...
  • Enter [svn path] as the repository URL.
  • Enter 'C:\WindRiver\workspace\[project name]' as the checkout directory.
  • Click OK; when the 'folder not empty' warning pops up, click Yes.
  • Right-click in the Project Explorer and select Refresh.
  • Right-click the [project name] project, and go to Build Options->Clean Project. The project should now be set up.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com
Reply With Quote
  #12   Spotlight this post!  
Unread 09-06-2010, 16:21
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: WindRiver & Git - Makefile

Actually, there is an option to create a project from an SVN repo. I think it's Import->SVN. It's what we use, and it works well
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #13   Spotlight this post!  
Unread 09-06-2010, 18:26
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by Radical Pi View Post
Actually, there is an option to create a project from an SVN repo. I think it's Import->SVN. It's what we use, and it works well
Almost, Import>SVN>Checkout Projects From SVN
or you could use
New>Project>SVN>Checkout Projects From SVN

We used this also
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #14   Spotlight this post!  
Unread 13-06-2010, 17:14
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: WindRiver & Git - Makefile

Quote:
Originally Posted by Pat Fairbank View Post
I've done it on SVN with just .h and .cpp files. Here is a procedure I wrote a couple of years ago for the guys on my team (I updated it a bit, but there may be mistakes).

We use TortoiseSVN, hence the Windows Explorer right-click-menu bit.
This method seems to work fine when using Git. I'll do a write up in a bit once I'm done converting my repo to make sure it really works.

Thanks all.

Edit: Though it doesn't work too well with branches (cause when you go back to the same branch, they won't exist anymore thus WindRiver whines). Not sure if there is a way to get git to not delete those files.

-Tanner

Last edited by Tanner : 13-06-2010 at 18:08.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
C and LabView version control with Git Nibbles NI LabVIEW 31 17-01-2010 19:22
Git on Windows vs Git on Unix/Linux kamocat Programming 5 10-01-2010 00:25
Running the Motors Backward in WindRiver & cRIO Freezes kyungjin C/C++ 15 08-02-2009 14:24
git for source code management? d235j Programming 2 08-01-2009 22:59
Using Eclipse IDE & makefile as MPLAB replacement RoboPhantom Programming 0 27-02-2005 19:05


All times are GMT -5. The time now is 13:36.

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