From xavier-list at rhnh.net Tue Dec 5 05:22:51 2006 From: xavier-list at rhnh.net (Xavier Shay) Date: Tue, 05 Dec 2006 21:22:51 +1100 Subject: [Rant-cafe] bugs Message-ID: <1165314171.4743.76.camel@puma> Hi Stuart, Please forgive the delayed reply. > Where is the best place to report bugs? on the list or via > the bug tracker? The list. We currently don't have the traffic to justify a tracker. Indeed, I shamefully forgot to keep up to date with the old one, which is why I missed this bug :S > I'm not well enough informed with rant's internals to fix it myself. Have a look at lib/rant/rantsys.rb:186 > I narrowed it down to an > for pipeing output in the exec string... I can't replicate on Ubuntu 6.10, and don't currently have a windows environment to test on. I imagine it has something to do with how redirection is handled in the call to system(). The following works for me: task :test do |t| sys "../../../../bin/echo hello world > out" end Unfortunately, it would appear this is the only way to redirect output using system() (I don't think you can do it if you split up the arguments) Maybe something like the following would be a workaround for you (yes, I know it ain't pretty): File.expand_path("../tools/blah.exe") + " a b c > d" I'm not sure the best way to fix this. Maybe allow a parameter to sys.sh (or another method) that allows you to specify a file to redirect output to? Have a look at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/21454 Cheers, Xavier From steshaw at gmail.com Tue Dec 5 08:15:38 2006 From: steshaw at gmail.com (Steven Shaw) Date: Tue, 5 Dec 2006 13:15:38 +0000 Subject: [Rant-cafe] rant and rake Message-ID: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> Hi. Would you mind comparing rant with rake. Also I noticed that the Configure is deprecated. Are you planning on autoconf type of stuff? Cheers, Steve. From steshaw at gmail.com Tue Dec 5 09:13:18 2006 From: steshaw at gmail.com (Steven Shaw) Date: Tue, 5 Dec 2006 14:13:18 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1165327439.26633.419.camel@balin.russel.org.uk> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> <1165327439.26633.419.camel@balin.russel.org.uk> Message-ID: <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> On 05/12/06, Russel Winder wrote: > Hi, > > On Tue, 2006-12-05 at 13:15 +0000, Steven Shaw wrote: > > Hi. Would you mind comparing rant with rake. > > The nutshell version is that Rake is very fine and infinitely superior > to Make, and that Rant is everything that Rake is plus a lot more. The > idea of generators make Rant just a whole lot better than Rake. What are generators in this context? > The problem with Rant is it needs some more active people developing > library features so as to grow and emulate the user population of SCons. > For me the `players' in the build game are Ant, Maven and Gant in the > Java/Groovy arena and Rant, SCons and Waf elsewhere. Yes, I've come across all these. Waf was just in the last couple of days as I found cmake and it led me to it! Waf seems to be a scons rip-off. I don't understand why the fork happened there. Those KDE folks have switched to cmake. If I was still doing C/C++ development I think I'd go with scons but I'd be always hoping for a Ruby alternative. I really like Rake and but hoped to find a project that also have automake/autoconf type abilities. Cheers, Steve. From russel at russel.org.uk Tue Dec 5 09:03:59 2006 From: russel at russel.org.uk (Russel Winder) Date: Tue, 05 Dec 2006 14:03:59 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> Message-ID: <1165327439.26633.419.camel@balin.russel.org.uk> Hi, On Tue, 2006-12-05 at 13:15 +0000, Steven Shaw wrote: > Hi. Would you mind comparing rant with rake. The nutshell version is that Rake is very fine and infinitely superior to Make, and that Rant is everything that Rake is plus a lot more. The idea of generators make Rant just a whole lot better than Rake. The problem with Rant is it needs some more active people developing library features so as to grow and emulate the user population of SCons. For me the `players' in the build game are Ant, Maven and Gant in the Java/Groovy arena and Rant, SCons and Waf elsewhere. Personally I am doing stuff with LaTeX builds in Rant, it is getting close to publishable, I just need to write the test suite > Also I noticed that the Configure is deprecated. Are you planning on > autoconf type of stuff? Again it is a question of people chipping material into the Rant library. I have been tinkering with bits and pieces to do some aspects of packaging pkg-config and things like that but don't have anything publishable. SCons has problems with this as well, Waf is further down the road. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061205/7369def9/attachment.bin From russel at russel.org.uk Tue Dec 5 09:35:40 2006 From: russel at russel.org.uk (Russel Winder) Date: Tue, 05 Dec 2006 14:35:40 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> <1165327439.26633.419.camel@balin.russel.org.uk> <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> Message-ID: <1165329340.26633.438.camel@balin.russel.org.uk> On Tue, 2006-12-05 at 14:13 +0000, Steven Shaw wrote: > > The nutshell version is that Rake is very fine and infinitely superior > > to Make, and that Rant is everything that Rake is plus a lot more. The > > idea of generators make Rant just a whole lot better than Rake. > > What are generators in this context? They are a way of collecting a set of rules and actions as a single abstraction. So for example I can create a LaTeX generator that deals not just with building a PDF or a PostScript file from a LaTeX source, it generates all that is needed to tidy everything up. This is generally hard to do as LaTeX spawns so many files none of which are actually part of the dependency chain. > > The problem with Rant is it needs some more active people developing > > library features so as to grow and emulate the user population of SCons. > > For me the `players' in the build game are Ant, Maven and Gant in the > > Java/Groovy arena and Rant, SCons and Waf elsewhere. > > Yes, I've come across all these. Waf was just in the last couple of > days as I found cmake and it led me to it! Waf seems to be a scons > rip-off. I don't understand why the fork happened there. The problem I have with CMake is it uses vast amounts of capital letters, just like M4 and hence the autotools. Also the programming language is not great. And the tools for doing all the Autoconf stuff are pretty thin on the ground. NO longer on my list of `use this' tools. Waf is indeed originally a fork of SCons, due to a difference in view about direction of the SCons system. Waf was indeed BKSys and this was dropped by KDE in favour of CMake. However, Having heard 1.5 sides of the story, there was lots of politicking involved and the decision was not entirely based on technical argument. Even though Waf was originally a fork of SCons, Waf and SCons are now so different as to be, well different. > Those KDE folks have switched to cmake. If I was still doing C/C++ > development I think I'd go with scons but I'd be always hoping for a > Ruby alternative. I really like Rake and but hoped to find a project > that also have automake/autoconf type abilities. It's also a question of what it is that is being produced and the context in which it is being produced. SCons is good for in house programmed making of things, but I think it loses to Waf as an Autotools replacement. But like Maven, Waf has a project model build in and if you want to do something different then SCons is better -- as Ant or better still Gant is in a Java context. I would really like to see Rant evolve to compete strongly with Waf and SCons, mostly because I prefer working with closure based languages such as Ruby and Groovy. Stefan did a great job of creating the base infrastructure but Rant needs to get more `library' stuff so as to really compete. Hopefully I can add the LaTeX stuff shortly. This may be overly biased, but Rake is just infrastructure with almost no `libraries' -- except perhaps the ones needed for Ruby software. I don't think, it is a good base to work with to create an Autotools replacement, whereas Rant is. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061205/e0a7fb2f/attachment.bin From steshaw at gmail.com Tue Dec 5 09:46:43 2006 From: steshaw at gmail.com (Steven Shaw) Date: Tue, 5 Dec 2006 14:46:43 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1165329340.26633.438.camel@balin.russel.org.uk> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> <1165327439.26633.419.camel@balin.russel.org.uk> <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> <1165329340.26633.438.camel@balin.russel.org.uk> Message-ID: <1ba9d4a00612050646q7e60c521m29f08c7d35541d0e@mail.gmail.com> On 05/12/06, Russel Winder wrote: > They are a way of collecting a set of rules and actions as a single > abstraction. So for example I can create a LaTeX generator that deals > not just with building a PDF or a PostScript file from a LaTeX source, > it generates all that is needed to tidy everything up. This is > generally hard to do as LaTeX spawns so many files none of which are > actually part of the dependency chain. I just don't get it. I suppose I'd have to dig in to find the abstraction you're talking about. With an overload of terminology it makes it hard (for instance Python generators). > The problem I have with CMake is it uses vast amounts of capital > letters, just like M4 and hence the autotools. Also the programming > language is not great. And the tools for doing all the Autoconf stuff > are pretty thin on the ground. NO longer on my list of `use this' > tools. If a tool was fantasic it wouldn't bother me (too much) if it USED CAPITALS EVERYWHERE... > It's also a question of what it is that is being produced and the > context in which it is being produced. SCons is good for in house > programmed making of things, but I think it loses to Waf as an Autotools > replacement. But like Maven, Waf has a project model build in and if > you want to do something different then SCons is better -- as Ant or > better still Gant is in a Java context. To me Waf seems to new to base any project on it. I can't have been around that long. Scons has been around ages. You want longevity for your build system :) > I would really like to see Rant evolve to compete strongly with Waf and That too is my wish. A Ruby-based build to to replace make and autotools. > This may be overly biased, but Rake is just infrastructure with almost > no `libraries' -- except perhaps the ones needed for Ruby software. I > don't think, it is a good base to work with to create an Autotools > replacement, whereas Rant is. Rant doesn't seem to have many libaries either. I don't see that as a big advantage of Rant. Cheers, Steve. From deankassmann at gmail.com Tue Dec 5 13:19:13 2006 From: deankassmann at gmail.com (Dean Kassmann) Date: Tue, 5 Dec 2006 10:19:13 -0800 Subject: [Rant-cafe] SCons like targets Message-ID: I'm considering using Rant instead of SCons for C/C++ development. I'm not especially familiar with Ruby yet, though. I'd like to define a dependency without having to resort to defining separate rules such as .cpp -> .obj and .cpp -> .o for C++ object files on windows and Linux respectively. I can do this in SCons easily (in this case i'm building a static library): env.StaticLibrary(target = "libname", source = ["main.cpp", "myclass.cpp"]) I don't have to define the rule to create the .obj (or .o) files for main.cpp or myclass.cpp. And the resulting output is correctly libname.a (on linux) or libname.lib (on windows) Is this possible in Rant? What contortions do I have to go through to get this to work? Cheers, Dean From russel at russel.org.uk Tue Dec 5 13:38:10 2006 From: russel at russel.org.uk (Russel Winder) Date: Tue, 05 Dec 2006 18:38:10 +0000 Subject: [Rant-cafe] SCons like targets In-Reply-To: References: Message-ID: <1165343890.26633.487.camel@balin.russel.org.uk> Dean, On Tue, 2006-12-05 at 10:19 -0800, Dean Kassmann wrote: > I'm considering using Rant instead of SCons for C/C++ development. > I'm not especially familiar with Ruby yet, though. > > I'd like to define a dependency without having to resort to defining > separate rules such as .cpp -> .obj and .cpp -> .o for C++ object > files on windows and Linux respectively. One of the joys of using a programming language as the base for a build system is that you can ignore suffix rules. Stefan put then into Rant but I am not sure it was a wise move. > I can do this in SCons easily (in this case i'm building a static library): > > env.StaticLibrary(target = "libname", source = ["main.cpp", "myclass.cpp"]) As far as I currently know, there are no ready-made, high-level tools in Rant as there are in SCons. It would be possible to create generators in Rant to do the same thing as the above in SCons, but I don't think they are there yet. > I don't have to define the rule to create the .obj (or .o) files for > main.cpp or myclass.cpp. And the resulting output is correctly > libname.a (on linux) or libname.lib (on windows) SCons has a high-level "rule" that fills in all this. In Rant a generator could handle all this. I suspect someone out there has done this already so if they could donate it back to the Rant project we could put it in the distribution. > Is this possible in Rant? What contortions do I have to go through to > get this to work? Currently you would have to set up the rules. I tend to do things like: file Program => Source.map { | source | object( source ) } do | target | sys "g++ #{$cxxFlags} -o #{target.name} #{target.prerequisites} #{$libs}" end Source.each { | source | file object( source ) => source do | target | sys "g++ #{$cppFlags} #{$cxxFlags} -c -o #{target.name} #{target.prerequisites}" end } I haven't got round to parameterizing for Windoze as I never use it but this would have to be done as SCons and Waf have done for a Rant generator. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061205/34eaaf31/attachment-0001.bin From russel at russel.org.uk Tue Dec 5 13:50:47 2006 From: russel at russel.org.uk (Russel Winder) Date: Tue, 05 Dec 2006 18:50:47 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1ba9d4a00612050646q7e60c521m29f08c7d35541d0e@mail.gmail.com> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> <1165327439.26633.419.camel@balin.russel.org.uk> <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> <1165329340.26633.438.camel@balin.russel.org.uk> <1ba9d4a00612050646q7e60c521m29f08c7d35541d0e@mail.gmail.com> Message-ID: <1165344647.26633.497.camel@balin.russel.org.uk> On Tue, 2006-12-05 at 14:46 +0000, Steven Shaw wrote: > I just don't get it. I suppose I'd have to dig in to find the > abstraction you're talking about. With an overload of terminology it > makes it hard (for instance Python generators). The tyranny of jargon :-) A generator in Rant is a way of getting Rant to write a whole set of rules and tasks. They are not macros, it is more like dynamic code generation. > If a tool was fantasic it wouldn't bother me (too much) if it USED > CAPITALS EVERYWHERE... You are more forgiving than I am. I guess I just got annoyed not being able to use lower case for programming from 1970-1980. > To me Waf seems to new to base any project on it. I can't have been > around that long. Scons has been around ages. You want longevity for > your build system :) I don't think Waf is that much of a risk but certainly SCons is a safer bet for a really low-risk situation. > That too is my wish. A Ruby-based build to to replace make and autotools. I would say that Rant could be it but I don't think Rake can be, at least not easily. The issue is getting a big enough of an active community and energy behind doing it. > Rant doesn't seem to have many libaries either. I don't see that as a > big advantage of Rant. Rant does not have the high-level tools as yet, that is true. If that is important to you now then Rant is not ready for you yet :-) But then nor is Rake. For now high-level probably means SCons or Waf. Or if you are doing Java stuff, Ant, Gant or Raven. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061205/35c67c8f/attachment.bin From deankassmann at gmail.com Tue Dec 5 16:42:25 2006 From: deankassmann at gmail.com (Dean Kassmann) Date: Tue, 5 Dec 2006 13:42:25 -0800 Subject: [Rant-cafe] rant and rant Message-ID: Which rant is rant? http://java-source.net/open-source/build-systems From steshaw at gmail.com Tue Dec 5 17:21:56 2006 From: steshaw at gmail.com (Steven Shaw) Date: Tue, 5 Dec 2006 22:21:56 +0000 Subject: [Rant-cafe] rant and rake In-Reply-To: <1165344647.26633.497.camel@balin.russel.org.uk> References: <1ba9d4a00612050515g7dda3f5j34e89d59f53c463a@mail.gmail.com> <1165327439.26633.419.camel@balin.russel.org.uk> <1ba9d4a00612050613o428b14c6o8ca0f95bc19cb5e8@mail.gmail.com> <1165329340.26633.438.camel@balin.russel.org.uk> <1ba9d4a00612050646q7e60c521m29f08c7d35541d0e@mail.gmail.com> <1165344647.26633.497.camel@balin.russel.org.uk> Message-ID: <1ba9d4a00612051421y96e4a05o400a7acbb53521b5@mail.gmail.com> On 05/12/06, Russel Winder wrote: > > CAPITALS EVERYWHERE... > > You are more forgiving than I am. I guess I just got annoyed not being > able to use lower case for programming from 1970-1980. I'm a contractor, if someone pays me to program in Modula-2... well actually I'd probably hang about for a job with a more modern programming language ;) > > To me Waf seems to new to base any project on it. I can't have been > > around that long. Scons has been around ages. You want longevity for > > your build system :) > > I don't think Waf is that much of a risk but certainly SCons is a safer > bet for a really low-risk situation. Yes, I'll be watching Waf. I imagine it spurred the developer when cmake was chosen for KDE. To me it seems annoying to choose a tool that doesn't have a general purpose language inside. > > That too is my wish. A Ruby-based build to to replace make and autotools. > > I would say that Rant could be it but I don't think Rake can be, at > least not easily. The issue is getting a big enough of an active > community and energy behind doing it. Ok. I'll be watching Rant too :). I do prefer Ruby to Python. Steve. From xavier-list at rhnh.net Tue Dec 5 19:14:00 2006 From: xavier-list at rhnh.net (Xavier Shay) Date: Wed, 06 Dec 2006 11:14:00 +1100 Subject: [Rant-cafe] rant and rant In-Reply-To: References: Message-ID: <1165364040.5095.3.camel@puma> > Which rant is rant? > http://java-source.net/open-source/build-systems Oh dear, a clash! We have a higher a version number, which clearly proves that the name is rightfully ours... Xavier From deankassmann at gmail.com Wed Dec 6 12:54:22 2006 From: deankassmann at gmail.com (Dean Kassmann) Date: Wed, 6 Dec 2006 09:54:22 -0800 Subject: [Rant-cafe] SCons like targets In-Reply-To: <1165343890.26633.487.camel@balin.russel.org.uk> References: <1165343890.26633.487.camel@balin.russel.org.uk> Message-ID: Ok, I'll bite and try my hand at a generator for c++. Do you recommend that I start with cs_compiler.rb as a template or rather start from scratch using something like Command as a template. Dean On 12/5/06, Russel Winder wrote: > Dean, > > On Tue, 2006-12-05 at 10:19 -0800, Dean Kassmann wrote: > > I'm considering using Rant instead of SCons for C/C++ development. > > I'm not especially familiar with Ruby yet, though. > > > > I'd like to define a dependency without having to resort to defining > > separate rules such as .cpp -> .obj and .cpp -> .o for C++ object > > files on windows and Linux respectively. > > One of the joys of using a programming language as the base for a build > system is that you can ignore suffix rules. Stefan put then into Rant > but I am not sure it was a wise move. > > > I can do this in SCons easily (in this case i'm building a static library): > > > > env.StaticLibrary(target = "libname", source = ["main.cpp", "myclass.cpp"]) > > As far as I currently know, there are no ready-made, high-level tools in > Rant as there are in SCons. It would be possible to create generators > in Rant to do the same thing as the above in SCons, but I don't think > they are there yet. > > > I don't have to define the rule to create the .obj (or .o) files for > > main.cpp or myclass.cpp. And the resulting output is correctly > > libname.a (on linux) or libname.lib (on windows) > > SCons has a high-level "rule" that fills in all this. In Rant a > generator could handle all this. I suspect someone out there has done > this already so if they could donate it back to the Rant project we > could put it in the distribution. > > > Is this possible in Rant? What contortions do I have to go through to > > get this to work? > > Currently you would have to set up the rules. I tend to do things > like: > > file Program => Source.map { | source | object( source ) } do | target | > sys "g++ #{$cxxFlags} -o #{target.name} #{target.prerequisites} > #{$libs}" > end > > Source.each { | source | > file object( source ) => source do | target | > sys "g++ #{$cppFlags} #{$cxxFlags} -c -o #{target.name} > #{target.prerequisites}" > end > } > > I haven't got round to parameterizing for Windoze as I never use it but > this would have to be done as SCons and Waf have done for a Rant > generator. > -- > Russel. > ==================================================== > Dr Russel Winder +44 20 7585 2200 > 41 Buckmaster Road +44 7770 465 077 > London SW11 1EN, UK russel at russel.org.uk > > > From russel at russel.org.uk Wed Dec 6 19:00:53 2006 From: russel at russel.org.uk (Russel Winder) Date: Thu, 07 Dec 2006 00:00:53 +0000 Subject: [Rant-cafe] rant and rant In-Reply-To: <1165364040.5095.3.camel@puma> References: <1165364040.5095.3.camel@puma> Message-ID: <1165449653.26633.591.camel@balin.russel.org.uk> On Wed, 2006-12-06 at 11:14 +1100, Xavier Shay wrote: > > Which rant is rant? > > http://java-source.net/open-source/build-systems > > Oh dear, a clash! We have a higher a version number, which clearly > proves that the name is rightfully ours... The other Rant hasn't been worked on for 4 years, I suggest we take the moral high ground given that Rant 0.5.8 is in Debian Etch :-) -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061207/93faf11b/attachment.bin From russel at russel.org.uk Wed Dec 6 19:12:08 2006 From: russel at russel.org.uk (Russel Winder) Date: Thu, 07 Dec 2006 00:12:08 +0000 Subject: [Rant-cafe] SCons like targets In-Reply-To: References: <1165343890.26633.487.camel@balin.russel.org.uk> Message-ID: <1165450328.26633.604.camel@balin.russel.org.uk> On Wed, 2006-12-06 at 09:54 -0800, Dean Kassmann wrote: > Ok, I'll bite and try my hand at a generator for c++. Do you recommend > that I start with cs_compiler.rb as a template or rather start from > scratch using something like Command as a template. I don't know enough about C# to say whether it is a good match for a C++ build or not. Sorry, a bit of a cop out that. I started from scratch for the LaTeX generator and decided on a structure: gen LaTeX, [ , ] so I can do things like:L target = gen LaTeX , 'document.ltx' which generates document.pdf and all the rules to delete all the generated files if "import 'clean'" or "import 'autoclean'" appear before hand. Alternatively: target = gen LaTeX , 'document.ltx' , { 'generate' => 'PostScript' } generates a PostScript file and all the clean rules. I guess my message is decide what the generator call should have as parameters to deal with the model of build and then think how to implement the class. The main issue is, I think, whether the system should parse the files to ascertain the dependency tree (as SCons does) or whether the dependency tree should be provided manually. For LaTeX this is a very deep and non-trivial question because it is a macro processing language. For C++ it is a lot easier since #include is the only way of creating explicit dependency. So the base can perhaps be: gen Cpp , main.cpp which generates a.out ( or whatever on Windoze). PS I am happy to try things on my GFontBrowser project which is a C ++/fontconfig/pango project for which I have Autoconf, CMake, SCons, Waf, and Rant build systems. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061207/b86e72bd/attachment.bin From xavier-list at rhnh.net Wed Dec 6 20:55:49 2006 From: xavier-list at rhnh.net (Xavier Shay) Date: Thu, 07 Dec 2006 12:55:49 +1100 Subject: [Rant-cafe] SCons like targets In-Reply-To: References: <1165343890.26633.487.camel@balin.russel.org.uk> Message-ID: <1165456549.5161.13.camel@puma> > Ok, I'll bite and try my hand at a generator for c++. Do you recommend > that I start with cs_compiler.rb as a template or rather start from > scratch using something like Command as a template. Rant apparently already does dependency scanning for C++: http://rant.rubyforge.org/files/doc/c_rdoc.html I can't comment on how complete or useful this is - I don't do any C++ dev myself and haven't tried it. The examples link doesn't work, but if you do an SVN checkout you can see a few C++ examples in doc/examples. If you're going ahead with a generator, I would work from cs_compiler and associated tests, as I tried to write this in accordance with what I consider "best practice" for generators. Xavier From deankassmann at gmail.com Fri Dec 8 12:51:56 2006 From: deankassmann at gmail.com (Dean Kassmann) Date: Fri, 8 Dec 2006 09:51:56 -0800 Subject: [Rant-cafe] anon svn access Message-ID: I seem to be having trouble accessing the SVN trunk. When I try: svn checkout svn://rubyforge.org/var/svn/rant I get a host actively refused connection. I was wondering if this was something on my end or if I'm doing something incorrect. Cheers, Dean From deankassmann at gmail.com Fri Dec 8 13:05:16 2006 From: deankassmann at gmail.com (Dean Kassmann) Date: Fri, 8 Dec 2006 10:05:16 -0800 Subject: [Rant-cafe] Library and Program Generators Message-ID: I'm working on a c++/c/fortran library generator for rant The syntax looks something like this: # beginning of Rantfile # This is a prototype Rantfile for library to generate discussion regarding syntax and features import 'md5' import 'library' # some custom configuration var :build_dir => "build" # use the library generator to create a static library: libd = gen Library, "myfoo", :sources => sys["source/**/*.cpp"], :builddir => "#{var :build_dir}/debug", :pdb => "myfoo", :type => 'static', :debug => true, :runtime => 'shared' :multithreaded => true desc "build static library " task :debug => libd.path # end of Rantfile This will create a _static_ library called "test". On Windows it will create: ./build/libmyfoo.lib On Linux/OSX/ etc it will create ./build/myfoo.a If I had specified :type => 'dynamic' instead the generator would create the following on Windows: ../build/myfoo.lib ./build/myfoo.dll and on linux we'd have ./build/myfoo.so It will enable debugging, and use a shared version of the cpp/c runtime libraries and support multi-threaded operation The idea is that sources can be any mixture of c, cpp, and fortran files. The generator will use the appropriate compiler for each file and take care of creating either .obj or .o files for the given platform in the specified build directory. It will then link the the files into the appropriately named executable. The generator will use C::Dependencies generator plus the DirectedRule, and Rule tasks, internally. Any thoughts? Oh and very similar syntax will exist for a Program generator that produces .exe's on Windows etc. From russel at russel.org.uk Fri Dec 8 13:23:37 2006 From: russel at russel.org.uk (Russel Winder) Date: Fri, 08 Dec 2006 18:23:37 +0000 Subject: [Rant-cafe] anon svn access In-Reply-To: References: Message-ID: <1165602217.6419.136.camel@balin.russel.org.uk> On Fri, 2006-12-08 at 09:51 -0800, Dean Kassmann wrote: > I seem to be having trouble accessing the SVN trunk. When I try: > > svn checkout svn://rubyforge.org/var/svn/rant > > I get a host actively refused connection. I was wondering if this was > something on my end or if I'm doing something incorrect. I just ran the command above and got a fresh check out (142MB, since it includes all the branches and tags.) -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061208/972f4dc8/attachment-0001.bin From xavier-list at rhnh.net Sat Dec 9 15:51:03 2006 From: xavier-list at rhnh.net (Xavier Shay) Date: Sun, 10 Dec 2006 07:51:03 +1100 Subject: [Rant-cafe] [Fwd: [make-open-discussion][15826] rant.vim: a rant compiler plugin for vim] Message-ID: <1165697463.5212.7.camel@puma> Hi everyone, If anyone is using VIM, perhaps the script below. Does this belong in the core distribution beside the bash completion script? Comments? Xavier -------- Forwarded Message -------- From: ?? ?? To: noreply at rubyforge.org Subject: [make-open-discussion][15826] rant.vim: a rant compiler plugin for vim Date: Sat, 9 Dec 2006 10:27:29 -0500 (EST) Read and respond to this message at: http://rubyforge.org/forum/message.php?msg_id=15826 By: ?? ?? i wrote a vim script to support vim quickfix your Rantfile. copy the following file into vim/compiler dir. ====file:rant.vim======== "rant compilier if exists("current_compiler") finish endif let current_compiler = "rant" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal endif let s:cpo_save = &cpo set cpo-=C " default settings runs script normally " add '-c' switch to run syntax check only: " " CompilerSet makeprg=ruby\ -wc\ $* " " or add '-c' at :make command line: " " :make -c % " CompilerSet makeprg=rant\ $* "A rant error message example; "rant: [ERROR] in file `C:/vim/vim70/compiler/Rantfile', line 4: " NameError: undefined local variable or method `w' for main:Object CompilerSet errorformat= \%Erant:\ [ERROR]\ in\ file\ `%f'\,\ line\ %l:%.%#,%Z%m let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8 ff=unix ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to RubyForge and visit: http://rubyforge.org/forum/monitor.php?forum_id=2652&group_id=615&stop=1 From russel at russel.org.uk Wed Dec 13 02:35:58 2006 From: russel at russel.org.uk (Russel Winder) Date: Wed, 13 Dec 2006 07:35:58 +0000 Subject: [Rant-cafe] Library and Program Generators In-Reply-To: References: Message-ID: <1165995358.20863.275.camel@balin.russel.org.uk> On Fri, 2006-12-08 at 10:05 -0800, Dean Kassmann wrote: Apologies for not replying sooner. It seems as though building libraries is the first stop! I have a library I can test things against, so feel free to have me try it. Should we also be looking at Program in parallel (there may be shared infrastructure)? Perhaps we actually need C::Program and Cpp::Program ? > # This is a prototype Rantfile for library to generate discussion > regarding syntax and features > > import 'md5' > import 'library' > > # some custom configuration > var :build_dir => "build" > > # use the library generator to create a static library: > > libd = gen Library, "myfoo", > :sources => sys["source/**/*.cpp"], > :builddir => "#{var :build_dir}/debug", > :pdb => "myfoo", > :type => 'static', > :debug => true, > :runtime => 'shared' > :multithreaded => true Is the intention to do what SCons and Waf do which is to parse the sources and follow #include to build a dependency tree? I'm not sure :pdb works for me. All the other keys seem natural but that one doesn't. What is the distinction between :type and :runtime? > desc "build static library " > task :debug => libd.path > > # end of Rantfile > > This will create a _static_ library called "test". On Windows it will create: > ./build/libmyfoo.lib > On Linux/OSX/ etc it will create > ./build/myfoo.a I can easily test on Ubuntu, Solaris 10 and Mac OS X. In principle I can test on Windoze + Cygwin and Windoze + MSYS, but it takes a lot of pushing to subject my poor laptop to have to run Windoze :-) > If I had specified :type => 'dynamic' instead the generator would > create the following on Windows: > ../build/myfoo.lib > ./build/myfoo.dll > and on linux we'd have > ./build/myfoo.so > > It will enable debugging, and use a shared version of the cpp/c > runtime libraries and support multi-threaded operation I am not sure what the shared run time issue here is. > The idea is that sources can be any mixture of c, cpp, and fortran > files. The generator will use the appropriate compiler for each file > and take care of creating either .obj or .o files for the given > platform in the specified build directory. It will then link the the > files into the appropriately named executable. Presumably there is a compiler look-up table for any compiler that can generate linkable object files? So the table should be extendable in some way so as not to restrict to C, C++ and Fortran? On the other hand C, C++ and Fortran probably require different start up code so mixed language systems could be difficult? > The generator will use C::Dependencies generator plus the > DirectedRule, and Rule tasks, internally. Presumably Fortran needs a dependency checker? I am assuming that although it is called C::Dependencies, it works just fine for C++, It has seemed to for a C++ project of mine. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061213/e3d34e0d/attachment.bin From russel at russel.org.uk Wed Dec 13 02:38:13 2006 From: russel at russel.org.uk (Russel Winder) Date: Wed, 13 Dec 2006 07:38:13 +0000 Subject: [Rant-cafe] SCons like targets In-Reply-To: <1165456549.5161.13.camel@puma> References: <1165343890.26633.487.camel@balin.russel.org.uk> <1165456549.5161.13.camel@puma> Message-ID: <1165995494.20863.278.camel@balin.russel.org.uk> On Thu, 2006-12-07 at 12:55 +1100, Xavier Shay wrote: > Rant apparently already does dependency scanning for C++: > http://rant.rubyforge.org/files/doc/c_rdoc.html As far as I can tell C::Dependencies works fine for C++. I assume it is just regular expression searching for #includes on a recursive basis. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061213/c4d778fc/attachment.bin From russel at russel.org.uk Mon Dec 18 15:56:57 2006 From: russel at russel.org.uk (Russel Winder) Date: Mon, 18 Dec 2006 20:56:57 +0000 Subject: [Rant-cafe] LaTeX processing Message-ID: <1166475418.15385.204.camel@balin.russel.org.uk> I have just committed my LaTeX processing support to the Subversion repository for Rant. Myself and Graham Roberts have been using this stuff for a while now so it is not totally broken :-) But, of course, our use is focused, so it is almost certain there are bugs. If there are any LaTeX users out there please feel free to give this stuff a go, and let me know any feedback, bug reports, etc. Thanks. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061218/5e32f053/attachment.bin From russel at russel.org.uk Sun Dec 31 15:22:04 2006 From: russel at russel.org.uk (Russel Winder) Date: Sun, 31 Dec 2006 20:22:04 +0000 Subject: [Rant-cafe] Weird `issue' Message-ID: <1167596524.10271.35.camel@balin.russel.org.uk> I have a Rantfile that uses sys globbing to create the source that is used to create the names in an array of intermediate targets which is then used in two file rules. If I do not use sys globbing then no problem. If I use the original array instead of the transformed array everything is fine. If I dup one of the two prequisites in the file rules everything is fine. However, the file: # Files a.text and b.text exist on the filestore. Target = 'x' Target_W = Target + 'w' # `Bug' only shows using sys generated lists. Sources = sys[ '*.text' ] #Sources = [ 'a.text' , 'b.text' ] def name( n ) ; n.sub( 'text' , 'txt' ) end # `Bug' requires that the Sources list be transformed. prerequisites = Sources.map { | s | name( s ) } # `Bug' goes away when a dup is used on prerequisites in one of the following. file Target => prerequisites do | t | puts( t.name , t.prerequisites ) end file Target_W => prerequisites do | t | puts( t.name , t.prerequisites ) end Sources.each { | s | file name( s ) => s do | t | sys.cp( t.prerequisites , t.name ) end } task :default => [ Target , Target_W ] task :clean do prerequisites.each { | p | if File.exists?( p ) then sys.rm( p ) end } end results in: |> rant x a.txt b.txt rant: [ERROR] private method `sub' called for # /home/users/russel/Checkouts/Rant/trunk/lib/rant/rantlib.rb:434:in `expand_path' /home/users/russel/Checkouts/Rant/trunk/lib/rant/rantlib.rb:997:in `resolve' /home/users/russel/Checkouts/Rant/trunk/lib/rant/import/nodes/default.rb:212:in `each_dep' /home/users/russel/Checkouts/Rant/trunk/lib/rant/import/filelist/core.rb:418:in `apply_ary_method' /home/users/russel/Checkouts/Rant/trunk/lib/rant/import/filelist/core.rb:221:in `filelist_resolve' rant: [ERROR] Task `default' fail. rant aborted! the question is whether this is a big or a feature. I am guessing it is a bug but... If anyone has any ideas that would be most helpful. Thanks. -- Russel. ==================================================== Dr Russel Winder +44 20 7585 2200 41 Buckmaster Road +44 7770 465 077 London SW11 1EN, UK russel at russel.org.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/rant-cafe/attachments/20061231/a7700097/attachment.bin