Re: How to extend automake?

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

Re: How to extend automake?

Tom Howard
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bruno,

> How can I extend automake (other than submitting a patch and waiting for
> automake-1.10 to be released)?
[...snip...]
> What I want to do is to ship with bison (and similarly, other programs) an
> autoconf macro and an automake extension, so that all packages which use
> bison and a Makefile.am could use the extension by adding a single line to
> their Makefile.am.

The best way I've found to do this sort of think, is to create an
autoconf macro that generates a Makefile fragment and use AC_SUBST_FILE
on that. I'm (still) in the process of updating a few things but you can
see what I'm doing at

http://cvs.sourceforge.net/viewcvs.py/sserver/m4/

and more specifically

http://cvs.sourceforge.net/viewcvs.py/*checkout*/sserver/m4/ax_add_mk_macro.m4

I used ax_add_mk_macro in ax_dist_rpm.m4 so that in my projects I can run

make dist-rpm

to create an rpm distribution.  Using these macros, all I have to add to
the Makefile.am is @INCLUDE_MK@ at the end.

HTH.

Cheers,

- --
Tom Howard

Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x433B299A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCpO0Bw1G4ZUM7KZoRAjD6AKC6WJD+WOlizibi2Z8f6TjSJtIuxACeIVbO
weOI+tR+3fpvvW5ArNyUSvY=
=FqTN
-----END PGP SIGNATURE-----

tomhoward.vcf (417 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Harald Dunkel-2
Tom Howard wrote:

> Hi Bruno,
>
>
> I used ax_add_mk_macro in ax_dist_rpm.m4 so that in my projects I can run
>
> make dist-rpm
>
> to create an rpm distribution.  Using these macros, all I have to add to
> the Makefile.am is @INCLUDE_MK@ at the end.
>

It would be pretty cool if Automake could append this
automagically when generating the Makefile.in files.


Regards

Harri


Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Tom Howard-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Harri,

>>I used ax_add_mk_macro in ax_dist_rpm.m4 so that in my projects I can run
>>
>>make dist-rpm
>>
>>to create an rpm distribution.  Using these macros, all I have to add to
>>the Makefile.am is @INCLUDE_MK@ at the end.
>>
>
>
> It would be pretty cool if Automake could append this
> automagically when generating the Makefile.in files.

Yes, yes it would, but at the moment my m4 macros are the only ones (at
least that I know of) that specifically put Makefile fragments into
$(top_builddir)/include.mk.  It would be a bit much to expect such a
feature to be added for one user.  If lots of other macros start
appearing that use AX_ADD_MK_MACRO, then it would make more sense.

Cheers,

- --
Tom Howard

Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x433B299A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCpVNUw1G4ZUM7KZoRAn2HAKCMXMtV6jUU8AfxCwNmJHyAyGuYagCfXpRG
9DizVPUSye2qekfZjqB5I+U=
=1DvW
-----END PGP SIGNATURE-----


Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Thomas Degris
In reply to this post by Harald Dunkel-2
Hello,

make dist-deb, dist-ebuild, ... would be nice also and I think it would
save lot of time for lot of people.

Thomas

Harald Dunkel wrote:

>Tom Howard wrote:
>  
>
>>Hi Bruno,
>>
>>
>>I used ax_add_mk_macro in ax_dist_rpm.m4 so that in my projects I can run
>>
>>make dist-rpm
>>
>>to create an rpm distribution.  Using these macros, all I have to add to
>>the Makefile.am is @INCLUDE_MK@ at the end.
>>
>>    
>>
>
>It would be pretty cool if Automake could append this
>automagically when generating the Makefile.in files.
>
>
>Regards
>
>Harri
>
>
>
>  
>


Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Bruno Haible
In reply to this post by Harald Dunkel-2
Tom Howard wrote:
> The best way I've found to do this sort of think, is to create an
> autoconf macro that generates a Makefile fragment and use AC_SUBST_FILE
> on that.

Awesome! Terrific! Many many thanks for the hint.

Harald Dunkel wrote:
> It would be pretty cool if Automake could append this
> automagically when generating the Makefile.in files.

How could it know to which Makefile.ins it should append it? There are
typically several Makefile.ams for one configure.ac.

Bruno



Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Tom Howard-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bruno,

Bruno Haible wrote:
> Tom Howard wrote:
>
>>The best way I've found to do this sort of think, is to create an
>>autoconf macro that generates a Makefile fragment and use AC_SUBST_FILE
>>on that.
>
>
> Awesome! Terrific! Many many thanks for the hint.

Glad I could help.

> Harald Dunkel wrote:
>
>>It would be pretty cool if Automake could append this
>>automagically when generating the Makefile.in files.
>
>
> How could it know to which Makefile.ins it should append it? There are
> typically several Makefile.ams for one configure.ac.

The only feasible answer is all of them.  This is what I do in my
projects, which means I also need to take extra care to make sure the
Makefile fragments work from any directory in the hierarchy.

Cheers,

- --
Tom Howard

Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x433B299A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCpmdIw1G4ZUM7KZoRAg6cAJ0WpxezlofMOd3slWnpNWAObnixsQCgnVga
8xeXtM74UkqKxEXM6VyNUSY=
=uLeQ
-----END PGP SIGNATURE-----


Reply | Threaded
Open this post in threaded view
|

Re: How to extend automake?

Harald Dunkel-2
In reply to this post by Bruno Haible
Bruno Haible wrote:
> Harald Dunkel wrote:
>
>>It would be pretty cool if Automake could append this
>>automagically when generating the Makefile.in files.
>
>
> How could it know to which Makefile.ins it should append it? There are
> typically several Makefile.ams for one configure.ac.
>

I just would like to append a common Makefile fragment
to all Makefile.in files, e.g. to provide an extended
test scheme.


Regards

Harri