Making flamerobin executable aware of --prefix

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Making flamerobin executable aware of --prefix

Damyan Ivanov
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael,

As Milan suggested, lets discuss how to make flamerobin executable aware
of --prefix parameter to configure.

For starters, what have you tried in order to accomplish it?


dam
- --
Damyan Ivanov          0x9725F63B          Creditreform Bulgaria
[hidden email]              http://www.creditreform.bg/
phone: +359(2)928-2611, 929-3993            fax: +359(2)920-0994
mob. +359(88)856-6067  ICQ 3028500  [hidden email]/Gaim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKs1nHqjlqpcl9jsRAvbMAJ4lui4WYOkRlj0ANgHxRxr4sFaotwCfT/Rs
4jPRmX22f/3rkV7qZDEsWpk=
=zZo9
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Michael Hieke
Damyan,

Damyan Ivanov wrote:

> As Milan suggested, lets discuss how to make flamerobin executable
> aware of --prefix parameter to configure.
>
> For starters, what have you tried in order to accomplish it?

for the time being I have added a file frsetup.h.in to the $(FR_HOME)
which contains:

--- cut here ---

#ifndef FR_FRSETUP_H
#define FR_FRSETUP_H

/*
   this is used to set the correct install prefix for autoconf-based
   builds for UNIX versions of FR
*/
#undef FR_INSTALL_PREFIX

#endif

--- cut here ---

and modified configure.in to end with these lines:

--- cut here ---

AC_BAKEFILE([m4_include(autoconf_inc.m4)])

if test $GCC_PCH = 1 ; then
    CPPFLAGS="$CPPFLAGS -DWX_PRECOMP"
fi

dnl --------------------------------------------------------------
dnl install prefix
dnl --------------------------------------------------------------

if test "x$prefix" != "xNONE"; then
     FR_PREFIX=$prefix
else
     FR_PREFIX=$ac_default_prefix
fi

AC_DEFINE_UNQUOTED(FR_INSTALL_PREFIX, "$FR_PREFIX")

AC_CONFIG_HEADERS([ frsetup.h:frsetup.h.in ])
AC_CONFIG_FILES([ Makefile ])

AC_OUTPUT

--- cut here ---

This does indeed create a file frsetup.h in the build directory, which
could be included in Config.cpp to use FR_INSTALL_PREFIX instead of the
hard-coded path.  I am however not quite sure about the name of the
header and its location.  More stuff should go into this file, for
example necessary defines for 64 bit types.  If we go this route we
would need to have a static file of that name somewhere in the source
directory, maybe in the to-be-created directory "platform-specifics",
for all build types != autoconf-based.

I'd love to do this in the accepted standard way, to not reinvent any
wheel, badly.  Any hints?

--
Michael Hieke



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Damyan Ivanov
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Hieke wrote:

> --- cut here ---
>
> #ifndef FR_FRSETUP_H
> #define FR_FRSETUP_H
>
> /*
>   this is used to set the correct install prefix for autoconf-based
>   builds for UNIX versions of FR
> */
> #undef FR_INSTALL_PREFIX
>
> #endif
>
> --- cut here ---
>
> and modified configure.in to end with these lines:
>
> --- cut here ---
>
> AC_BAKEFILE([m4_include(autoconf_inc.m4)])
>
> if test $GCC_PCH = 1 ; then
>    CPPFLAGS="$CPPFLAGS -DWX_PRECOMP"
> fi
>
> dnl --------------------------------------------------------------
> dnl install prefix
> dnl --------------------------------------------------------------
>
> if test "x$prefix" != "xNONE"; then
>     FR_PREFIX=$prefix
> else
>     FR_PREFIX=$ac_default_prefix
> fi
>
> AC_DEFINE_UNQUOTED(FR_INSTALL_PREFIX, "$FR_PREFIX")
>
> AC_CONFIG_HEADERS([ frsetup.h:frsetup.h.in ])
> AC_CONFIG_FILES([ Makefile ])
>
> AC_OUTPUT
>
> --- cut here ---

The above seem OK to me. Some changes are necessary to include frsetup.h
in Config.h and use the define in Config.cpp, but they are trivial.

How do I regenerate configure from configure.in after abive changes?
I remember there were autogen.sh script that needed to be run, but there
is no autogen.sh in FR tarball.


dam
- --
Damyan Ivanov          0x9725F63B          Creditreform Bulgaria
[hidden email]              http://www.creditreform.bg/
phone: +359(2)928-2611, 929-3993            fax: +359(2)920-0994
mob. +359(88)856-6067  ICQ 3028500  [hidden email]/Gaim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDK8zGHqjlqpcl9jsRAkCaAKCYWNu7OAzGb9qDU9bUx/prd2WV/gCgo++S
XQNmPw5DgW1Cs8UbeABY3AU=
=YQbP
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Michael Hieke
Damyan Ivanov wrote:

> The above seem OK to me. Some changes are necessary to include
> frsetup.h in Config.h and use the define in Config.cpp, but they are
> trivial.

Yes, but do we agree on the name frsetup.h?  And if we add more stuff to
this header, would the default header for other builds then reside in
$(FR_HOME)/src/platform-specifics?  Then we would probably use the line

   AC_CONFIG_HEADERS([ platform-specifics/frsetup.h:frsetup.h.in ])

in configure.in.

> How do I regenerate configure from configure.in after abive changes?

First you need to install Bakefile in version 0.1.9 on the system.
After running bakefile_gen on the changed flamerobin.bkl you need to run
aclocal in $(FR_HOME). Since I have not installed wxWidgets I need to
run it in the form

$ aclocal -I /usr/local/share/aclocal -I /home/mh/wxWidgets-2.6.1

If you have wxWidgets as part of the system it may work without the
second parameter.
Then you can run autoconf to create the configure script.  Works for me.

> I remember there were autogen.sh script that needed to be run, but
> there is no autogen.sh in FR tarball.

I don't know about that, if it is a common thing we should add it.

Thanks

--
Michael Hieke



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Damyan Ivanov
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Hieke wrote:
> Damyan Ivanov wrote:
>
>> The above seem OK to me. Some changes are necessary to include
>> frsetup.h in Config.h and use the define in Config.cpp, but they are
>> trivial.
>
> Yes, but do we agree on the name frsetup.h?  And if we add more stuff to

It seems appropriate for me to put it in $(FR_HOME), but on the other
hand I build only on Debian and I cant figure out if this is appropriate
for other environments :-)

>> How do I regenerate configure from configure.in after abive changes?
>
> First you need to install Bakefile in version 0.1.9 on the system. After
> running bakefile_gen on the changed flamerobin.bkl you need to run

What is the change to be made to flamerobin.bkl? I can't figure it out.
I've never seen *.bkl files before.


dam
- --
Damyan Ivanov          0x9725F63B          Creditreform Bulgaria
[hidden email]              http://www.creditreform.bg/
phone: +359(2)928-2611, 929-3993            fax: +359(2)920-0994
mob. +359(88)856-6067  ICQ 3028500  [hidden email]/Gaim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDK+l5Hqjlqpcl9jsRAn/TAJ4w7qhrisGCpyCw8fC5ZDfumWrYYQCgqIP2
g1lwRKnbDuXMEUShOHDreT4=
=Yrql
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Michael Hieke
Damyan Ivanov wrote:

>> First you need to install Bakefile in version 0.1.9 on the system.
>> After running bakefile_gen on the changed flamerobin.bkl you need
>> to run
>
> What is the change to be made to flamerobin.bkl? I can't figure it
> out. I've never seen *.bkl files before.

I will remove the blocks responsible for copying confdefs, docs and
html-templates to the build directory.  After that build files need to
be rebaked.

Thanks

--
Michael Hieke


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel
Reply | Threaded
Open this post in threaded view
|

Re: Making flamerobin executable aware of --prefix

Michael Hieke
I wrote:

> I will remove the blocks responsible for copying confdefs, docs and
> html-templates to the build directory.  After that build files need
> to be rebaked.

Done.

Thanks

--
Michael Hieke


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Flamerobin-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/flamerobin-devel