Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3575 > unrolled thread
| Started by | Luis Lavena <luislavena@gmail.com> |
|---|---|
| First post | 2011-04-27 15:07 -0500 |
| Last post | 2011-04-29 03:33 -0500 |
| Articles | 8 — 4 participants |
Back to article view | Back to comp.lang.ruby
Bounty Request: small sample autoconf-like app/lib Luis Lavena <luislavena@gmail.com> - 2011-04-27 15:07 -0500
Re: Bounty Request: small sample autoconf-like app/lib Brian Candler <b.candler@pobox.com> - 2011-04-27 16:11 -0500
Re: Bounty Request: small sample autoconf-like app/lib Luis Lavena <luislavena@gmail.com> - 2011-04-27 16:56 -0700
Re: Bounty Request: small sample autoconf-like app/lib Brian Candler <b.candler@pobox.com> - 2011-04-28 02:18 -0500
Re: Bounty Request: small sample autoconf-like app/lib Luis Lavena <luislavena@gmail.com> - 2011-04-28 07:49 -0700
Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib Nikolai Weibull <now@bitwi.se> - 2011-04-27 16:20 -0500
Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib Luis Lavena <luislavena@gmail.com> - 2011-04-27 16:30 -0500
Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib Justin Collins <justincollins@ucla.edu> - 2011-04-29 03:33 -0500
| From | Luis Lavena <luislavena@gmail.com> |
|---|---|
| Date | 2011-04-27 15:07 -0500 |
| Subject | Bounty Request: small sample autoconf-like app/lib |
| Message-ID | <BANLkTindmUDo+z7XybyCoeEYhkWDHiH6Cw@mail.gmail.com> |
Hello,
This request might sounds weird, but I'm working on a small project
that will help with RubyInstaller internal structure, maintenance and
will help other projects when combined with tools like rake-compiler
to build stuff more properly.
The ones following me on GitHub might have noticed the project that
I'm working on, well, that one :-)
I've been looking into several projects that are autoconf-based and
most of them are huge. I need something fast and slim that can provide
me a series of building blocks for this. The idea of this sample
application is be part of a testing infrastructure.
This package should be able to generate a executable file (myapp.exe)
and a static library (libmylib.a) placed in bin and lib directory
after the normal configure, make, make install flow.
===
Requirements:
'configure' script should be able to support a --prefix option to
define the installation directory, e.g.:
$ sh configure --prefix=/installed/path
It also should be able to support --host, --target and --build options
for cross-compilation, but the only one for cross compilation is
--host and the value provided to it will be used to prefix GCC, AR,
RANLIB, LD and others later in the process, e.g.:
$ sh configure --prefix=/installed/path --host=i686-w64-mingw32
For the cases of --host not defined, you can use GNU config.guess
(http://savannah.gnu.org/projects/config) to determine the current
platform host.
Now, it is time for make. Invoking 'make' should use the configure
generated Makefile (could use sed + Makefile.in) and build myapp.exe,
libmylib.a. Please note that on non-Windows platforms is required to
generate myapp as executable, so you can use tricks like myapp$(EXE)
in the Makefile and have it define EXE=.exe or EXE= for non-Windows.
$ make
It is expected to work :)
The last step is installation, e.g.:
$ make install
Is expected to copy over the generated myapp.exe, libmylib.a into the
prefix's bin and lib directory respectively. It is also required it
copy mylib.h into prefix's include directory.
The target structure should be:
bin/myapp{.exe}
include/mylib.h
lib/libmylib.a
The source files provided could be:
configure (plain sh script)
myapp.c
mylib.c
mylib.h
Makefile.in (possible template for use with sed by configure)
===
While I could have learned autoconf myself (with LOT of time), the
size of any of the packages I autoconf-based packages are huge
compared to what I need, making things really hard for me (everybody
knows that I'm lazy)
I hope someone more fluent on sh/make can take a stab on this and
perhaps help me out.
The conditions: be MIT licensed and be provided in a Git repository on GitHub.
I have 50 USD dollars (plus Paypal fee) ready for the one that can provide this.
What do you guys think? Let me know if you need further details before
starting to work on this.
Thank you for your time and if you know who could be interested in
this, spread the word!
Regards,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
[toc] | [next] | [standalone]
| From | Brian Candler <b.candler@pobox.com> |
|---|---|
| Date | 2011-04-27 16:11 -0500 |
| Message-ID | <550acfdeadbf21da56aa49a7e4353abe@ruby-forum.com> |
| In reply to | #3575 |
Luis Lavena wrote in post #995383: > Requirements: > > 'configure' script should be able to support a --prefix option to > define the installation directory, e.g.: > > $ sh configure --prefix=/installed/path Does it have to be a shell script? Could it be in ruby? Have you looked at mkmf.rb? -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Luis Lavena <luislavena@gmail.com> |
|---|---|
| Date | 2011-04-27 16:56 -0700 |
| Message-ID | <4c4cff01-6680-40c8-a621-4a270f349aad@z31g2000vbs.googlegroups.com> |
| In reply to | #3580 |
On Apr 27, 6:11 pm, Brian Candler <b.cand...@pobox.com> wrote: > > > Requirements: > > > 'configure' script should be able to support a --prefix option to > > define the installation directory, e.g.: > > > $ sh configure --prefix=/installed/path > > Does it have to be a shell script? Could it be in ruby? Have you looked > at mkmf.rb? > The idea is that mimics as close as possible what autotools 'configure' provides. Since the invocation to configure goes with 'sh' I think sticking to sh will be closest as possible. Now, configure script is just the initial part, the biggest part is Makefile itself. I found amhello as part of automake source samples and started to use that for a cross-compilation executable, but it doesn't provide the other parts that I've mentioned are required. mkmf will not provide standalone generation of libraries/programs. I mean, you *can* but it doesn't make things easy. Also, I might want to do cross-compilation and that is something mkmf can't handle out of the box without lot of tweaking. -- Luis Lavena
[toc] | [prev] | [next] | [standalone]
| From | Brian Candler <b.candler@pobox.com> |
|---|---|
| Date | 2011-04-28 02:18 -0500 |
| Message-ID | <1ffef6d5526daf9a5e5b4ec1b7803bdc@ruby-forum.com> |
| In reply to | #3590 |
Luis Lavena wrote in post #995432: > The idea is that mimics as close as possible what autotools > 'configure' provides. > > Since the invocation to configure goes with 'sh' I think sticking to > sh will be closest as possible. OK. It seems like you're saying you want someone to rewrite autoconf for you, with full cross-compilation and multi-platform support, and presumably better documentation and examples than autoconf has (otherwise you'd just be using autoconf), for 50 bucks? Another idea is to try to borrow code from a different project which already does cross-compilation. Openwrt is one which springs to mind. That has a set of Makefiles which will build the whole cross-compilation tool chain for you as well - admittedly the Makefiles are rather complex though. And it doesn't build Windows executables. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Luis Lavena <luislavena@gmail.com> |
|---|---|
| Date | 2011-04-28 07:49 -0700 |
| Message-ID | <e5e8eb2f-7533-4085-b17e-fa553b376101@gu8g2000vbb.googlegroups.com> |
| In reply to | #3611 |
On Apr 28, 4:18 am, Brian Candler <b.cand...@pobox.com> wrote: > Luis Lavena wrote in post #995432: > > > The idea is that mimics as close as possible what autotools > > 'configure' provides. > > > Since the invocation to configure goes with 'sh' I think sticking to > > sh will be closest as possible. > > OK. It seems like you're saying you want someone to rewrite autoconf for > you, with full cross-compilation and multi-platform support, and > presumably better documentation and examples than autoconf has > (otherwise you'd just be using autoconf), for 50 bucks? > No, I'm not saying recreate autoconf, that is not the idea. I don't want to exploit anyone to do that for 50 bucks, is insane. I wanted a "mock" script that could mimic what autoconf does, it doesn't need to support all the flavors, platforms or anything, it just need to be able to respond to "configure" and the generated Makefile works. The Makefile.in part is not that hard, is just a matter of $(PREFIX) in front of all the CC, LD and others. If prefix is empty, then the local versions will be used. I've managed to use something similar to what zlib does, the problem with zlib's configure does not work on MinGW, it uses a separate makefile, so is not entirely cross platform. I found that automake came with a same project named amhello, is small (65K) and provides the executable part of my test, but it doesn't provide the library (lib/include) that will require for the other part of the test. > Another idea is to try to borrow code from a different project which > already does cross-compilation. Openwrt is one which springs to mind. > That has a set of Makefiles which will build the whole cross-compilation > tool chain for you as well - admittedly the Makefiles are rather complex > though. And it doesn't build Windows executables. > I've been investigating existing projects in that front for 2 months already, I came to post this based on the lack of something that can work under these scenarios. So far, as mentioned about amhello does works and generate valid binaries across platform, perhaps someone can extend it to generate the library part? -- Luis Lavena
[toc] | [prev] | [next] | [standalone]
| From | Nikolai Weibull <now@bitwi.se> |
|---|---|
| Date | 2011-04-27 16:20 -0500 |
| Subject | Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib |
| Message-ID | <BANLkTikwJKLcZqNSqt4yoYVueAdAh4dZMA@mail.gmail.com> |
| In reply to | #3575 |
On Wed, Apr 27, 2011 at 22:07, Luis Lavena <luislavena@gmail.com> wrote: > While I could have learned autoconf myself (with LOT of time), the > size of any of the packages I autoconf-based packages are huge > compared to what I need, making things really hard for me (everybody > knows that I'm lazy) I would suggest that you read http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool it’s a great book and it contains more or less all the information that you will ever need on the autotools.
[toc] | [prev] | [next] | [standalone]
| From | Luis Lavena <luislavena@gmail.com> |
|---|---|
| Date | 2011-04-27 16:30 -0500 |
| Subject | Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib |
| Message-ID | <BANLkTiksNb_eCia3E=jdKu1mOCxu6yFPwA@mail.gmail.com> |
| In reply to | #3581 |
On Wed, Apr 27, 2011 at 6:18 PM, Nikolai Weibull <now@bitwi.se> wrote: > On Wed, Apr 27, 2011 at 22:07, Luis Lavena <luislavena@gmail.com> wrote: > >> While I could have learned autoconf myself (with LOT of time), the >> size of any of the packages I autoconf-based packages are huge >> compared to what I need, making things really hard for me (everybody >> knows that I'm lazy) > > I would suggest that you read > > http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool > > it’s a great book and it contains more or less all the information > that you will ever need on the autotools. > Thank you Nikolai, Actually I remember reading it not long ago. Is not a matter of completely not knowing, but is a matter of time constrains. As I mentioned (and you kindly quoted): I'm, very lazy, everybody knows that about me. If I need to do something twice, I automate it. While I can sit, read and learn the whole toolset, I rather prefer be more proficient in other aspects. But thank you for the link, perhaps someone interested in learning this can take advantage of it. Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry
[toc] | [prev] | [next] | [standalone]
| From | Justin Collins <justincollins@ucla.edu> |
|---|---|
| Date | 2011-04-29 03:33 -0500 |
| Subject | Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib |
| Message-ID | <4DBA77C4.5060401@ucla.edu> |
| In reply to | #3583 |
On 04/27/2011 02:30 PM, Luis Lavena wrote: > On Wed, Apr 27, 2011 at 6:18 PM, Nikolai Weibull<now@bitwi.se> wrote: >> On Wed, Apr 27, 2011 at 22:07, Luis Lavena<luislavena@gmail.com> wrote: >> >>> While I could have learned autoconf myself (with LOT of time), the >>> size of any of the packages I autoconf-based packages are huge >>> compared to what I need, making things really hard for me (everybody >>> knows that I'm lazy) >> I would suggest that you read >> >> http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool >> >> it’s a great book and it contains more or less all the information >> that you will ever need on the autotools. >> > Thank you Nikolai, > > Actually I remember reading it not long ago. Is not a matter of > completely not knowing, but is a matter of time constrains. > > As I mentioned (and you kindly quoted): I'm, very lazy, everybody > knows that about me. > > If I need to do something twice, I automate it. > > While I can sit, read and learn the whole toolset, I rather prefer be > more proficient in other aspects. > > But thank you for the link, perhaps someone interested in learning > this can take advantage of it. > > Regards, Given your many contributions to the community, I think it's fine if you want to let someone else handle this one :) -Justin
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.ruby
csiph-web