Author Topic: Exotic Build Environment Support  (Read 7572 times)

Offline Stevo

  • Multiple posting newcomer
  • *
  • Posts: 18
Exotic Build Environment Support
« on: November 01, 2005, 02:46:12 pm »
Hi,

This is my first post, the IDE looks nice, good work guys.

I would really love a build system that was DUMB.  IE, I give the file name of an executable or build script for each of the options in the Build menu (And if i don't give them, they are greyed out).  I think this would be a very useful build option.  I Never use "Managed" make files, and I don't use Make.  I use JAM plus shell scripts.  The problem is, IDE's all seem to assume everyone uses Make, or a managed environment.  Not everyone does.  With a Generic Build option, that can be set to execute scripts for the build options, exotic build environments like mine could be easily supported.

I have tried changing my "make" command to "jam", but i get the error "don't know how to make all" and "Makefile: No such file or directory", and that is because jam doesn't use "all" as an option or target, and it doesn't use a file called "Makefile" (at least with my build environment, and i shouldn't have to change my build environment to suit the IDE).

So I went into the code for C::B, and deleted the adding of "-f Makefile" and "all" to the Make command in the gcc compiler handler.  It now builds using Jam perfectly, and I can step through the errors and warnings produced in the "Build Messages" window.

There are other build systems people use, and Make just isn't suitable for every project, so something like this would allow anyone to "build" their project however they want.

What do you think?

Stevo
« Last Edit: November 01, 2005, 03:00:41 pm by Stevo »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Exotic Build Environment Support
« Reply #1 on: November 01, 2005, 03:48:19 pm »
So, what exactly are the options used by this 'jam'?
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Exotic Build Environment Support
« Reply #2 on: November 01, 2005, 04:57:02 pm »
http://www.perforce.com/jam/jam.html

Frankly, Stevo, you don't need to worry about makefiles or even jamfiles. If you add files to your project, Codeblocks just compiles them. It's all transparent. But it can generate a makefile.

And we hadn't heard about jam until you told us. I don't think it'd be easy to add support for jam - at least not after 1.0 is out.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Exotic Build Environment Support
« Reply #3 on: November 01, 2005, 06:15:13 pm »
And we hadn't heard about jam until you told us.
I had  :)
It promises a lot, but I spent all Saturday afternoon and evening on it and did not manage to get it to work.
However, if you really get it to work, I believe it has to be quite good. I looked at it when the discussion about supporting concurrent compilation came up a few months ago. Apparently, jam supports everything we have been discussing out of the box.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Exotic Build Environment Support
« Reply #4 on: November 01, 2005, 08:16:13 pm »
It's another build system, and there are various forks of jam from different people (freetype, perforce, boost,...).
The best one is boost jam 2. I've used it a litte, but I don't like anymore the build systems that interferes the original build system.
They are good for in-house development, but not for redistributing, because the user is forced to download the build system to build the product.

The other approach (makefile generators) are good for in-house development, but the best for redistributing, like bakefile or cmake, because they use the build system of the user preference (an IDE, another compiler, etc).

Thanks to ABX, we'll probably have cbp project files output from bakefiles :D

Offline Stevo

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Exotic Build Environment Support
« Reply #5 on: November 01, 2005, 11:52:46 pm »
Quote
They are good for in-house development, but not for redistributing,

Yes I would agree with that, My coding is all embedded stuff, I dont re-distribute build environments, except to my own in-house developers, and they all have the same tools, Versions of OS's, etc.  I have all sorts of utilities that create source code from data, inject FPGA Bitstreams into my programs, convert the object output formats from GCC into a file suitable for my target, create compressed (custom style) file systems for my target, Build various flavours of my software, etc. 

But the results are all installed into hardware we design so we arent interested in redistribution for our needs (at least with this embedded stuff).  The point of the post wasnt about Jam per se.  I dont expect any IDE to handle Jam specifically.   Im not even a Jam zealot I just like it better than Make for my embedded stuff.  But I think both suck, Jam just sucks less than Make in my opinion.

What I was really proposing was a "Custom" build option.  For example, the configure dialogue would be something like:

Command to Build               : [/opt/jam/bin/jam -d2 %t   ]
Command to Compile current file: [./build file %f           ]
Command to Clean               : [/opt/jam/bin/jam clean %t ]
Command to Run                 : [./DownloadAndExecuteTarget]
Command to Build & Run         : [                          ]     [X] Just Use Build + Run Command
Command to Rebuild             : [/opt/jam/bin/jam -d2 -a   ]
Command to Clean               : [/opt/jam/bin/jam -d2 clean]
Command to Create Distribtion  : [./Backup                  ]


Then all that would happen is that when someone selected Build, the "Command to Build" is executed, and if %t is in the command it is replaced with the name of the target. Or if "Compile current file" is selected, the Command to Compile current file is executed, and %f is replaced with the file name.  Im sure you get the idea.

In fact, I could live with what C::B does now, if it didnt add "-f Makefile all" to my Make command.  I suppose I could make a script that just tosses those options, but the purpose of the post was to see if it was worth proposing this sort of "optional" build mechanism.  Im even happy to implement it at some point in the future (not yet though, gotta get my current project out the door).

I really like the way C::B doesnt force the "automake/autoconf" madness down the throat of the developer.  I understand its usefullnes for some projects, it just isnt the panacea that the autotools zealots say it is.

As an aside, how close (as in features and stability for a 1 release, as opposed to timeframe) is C::B to release, because ive only used it for a day, but it seems to be a tad unstable (nothing thats a show stopper, ive managed to work around every problem ive got so far) but im curious.

Stevo

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Exotic Build Environment Support
« Reply #6 on: November 02, 2005, 04:00:48 am »
Usually after every release there are a number of uncatched bugs. Look at the sourceforge project page (via the codeblocks homepage), and you'll see about 30 bugs reported for RC2. It's a record! :lol:

Anyway the crashes and most critical bugs are the ones fixed first.

Offline m00

  • Single posting newcomer
  • *
  • Posts: 9
Re: Exotic Build Environment Support
« Reply #7 on: December 28, 2005, 07:26:12 pm »
I second with Stevo's suggest. I want to use Jam too. Look forwarding for after 1.0! ;)

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Exotic Build Environment Support
« Reply #8 on: December 28, 2005, 10:00:56 pm »
In any case I don't see the point in hardcoding

-f Makefile

as that's the default anyway so nothing is gained.

nor

make all
instead of just make

since all should be the first target in the Makefile...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Exotic Build Environment Support
« Reply #9 on: December 28, 2005, 10:34:51 pm »
In any case I don't see the point in hardcoding

-f Makefile

as that's the default anyway so nothing is gained.

nor

make all
instead of just make

since all should be the first target in the Makefile...


I don't see the point for this discussion anymore, since the actual make commands are user-configurable per project/target...
Be patient!
This bug will be fixed soon...

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Exotic Build Environment Support
« Reply #10 on: December 28, 2005, 10:44:13 pm »
Ahhh..missed that.  My bad.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exotic Build Environment Support
« Reply #11 on: January 04, 2006, 11:06:34 pm »
I don't see the point for this discussion anymore, since the actual make commands are user-configurable per project/target...

I am sorry but I am missing something.  I am using the SVN version of Code::Blocks and I told Code::Blocks to use a custom makefile.  Now I want it to run a custom make command, you said this is configurable, but I can't find it either project properties or the the build options.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Exotic Build Environment Support
« Reply #12 on: January 04, 2006, 11:18:24 pm »
I don't see the point for this discussion anymore, since the actual make commands are user-configurable per project/target...

I am sorry but I am missing something.  I am using the SVN version of Code::Blocks and I told Code::Blocks to use a custom makefile.  Now I want it to run a custom make command, you said this is configurable, but I can't find it either project properties or the the build options.

"Project->Build options->Make commands"
Be patient!
This bug will be fixed soon...

Offline m00

  • Single posting newcomer
  • *
  • Posts: 9
Re: Exotic Build Environment Support
« Reply #13 on: January 06, 2006, 04:25:24 am »
"Project->Build options->Make commands"
Ah, thanks!  :)