Re: Desired feature

2003-12-04 Thread Gary V. Vaughan

On Wed, 3 Dec 2003 13:24:11 -0600 (CST), Bob Friesenhahn
[EMAIL PROTECTED] said:
 It would be useful if Automake supported a set of options (e.g.
 LDFLAGS) which are applied only when building libraries or when
 building programs.  It is excessively painful to have to add
 per-target _LDFLAGS options.  Perhaps there should be both 'LT' and
 non-'LT' macro versions.
 
 Certainly this can be accomplished by overriding Automake's standard
 LINK and COMPILE definitions, but overriding standard definitions is
 risky.

Seconded!

It would be great to have `LT_LDFLAGS = -module', rather than 15 lines of
`foo_LDFLAGS = -module' in a future m4 Makefile.am :-)

Cheers,
Gary.
-- 
Gary V. Vaughan  ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker   / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook




Re: Desired feature

2003-12-04 Thread Alexandre Duret-Lutz
On Thu, Dec 04, 2003 at 08:49:04AM +, Gary V. Vaughan wrote:
 
 It would be great to have `LT_LDFLAGS = -module', rather than 15 lines of
 `foo_LDFLAGS = -module' in a future m4 Makefile.am :-)

Regarding M4: last time I checked you had a directory dedicated to
modules.  Why don't you simply use AM_LDFLAGS = -module in this
directory?

More generally I think adding an LT_LDFLAGS variable is not a
solution, because some day Bob will come and say Now I need a global
LDFLAGS variable for standard libtool libraries, and another different
LDFLAGS for libtool modules; not being able to distinguish these two
sets of libraries is an extremely annoying (magnitude 42 on Richter's
scale) misfeature of Automake.

Maybe we need a way to apply flags to groups of files, and tying flags
to dir_PRIMARY variables (as in bin_PROGRAMS_LDFLAGS) would be an
option.




Re: Desired feature

2003-12-04 Thread Gary V. Vaughan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alexandre Duret-Lutz wrote:
| On Thu, Dec 04, 2003 at 08:49:04AM +, Gary V. Vaughan wrote:
|
|It would be great to have `LT_LDFLAGS = -module', rather than 15 lines of
|`foo_LDFLAGS = -module' in a future m4 Makefile.am :-)
|
|
| Regarding M4: last time I checked you had a directory dedicated to
| modules.  Why don't you simply use AM_LDFLAGS = -module in this
| directory?
That's how I do it at the moment, but I want to convert to a non-recursive
make, and then the AM_LDFLAGS will apply to the other directories as well.
| More generally I think adding an LT_LDFLAGS variable is not a
| solution, because some day Bob will come and say Now I need a global
| LDFLAGS variable for standard libtool libraries, and another different
| LDFLAGS for libtool modules; not being able to distinguish these two
| sets of libraries is an extremely annoying (magnitude 42 on Richter's
| scale) misfeature of Automake.
:-D

| Maybe we need a way to apply flags to groups of files, and tying flags
| to dir_PRIMARY variables (as in bin_PROGRAMS_LDFLAGS) would be an
| option.
Agreed.  That is definitely a better solution, I like it a lot :-)

Actually, now that you point it out, I would hit that problem myself, since m4
has normal _LTLIBRARIES, noinst_LTLIBRARIES and modules.  I would be happy if
I could do this:
~AM_LDFLAGS = everything gets these
~noinst_LTLIBRARIES_LDFLAGS = these are for convenience libs
~lib_LTLIBRARIES_LDFLAGS = these are for other libtool libs
~libm4_la_LDFLAGS = but I can override non module libs individually
That is, I think target specific flags should override PRIMARY group flags,
not be in addition to them.
Cheers,
Gary.
- --
Gary V. Vaughan  ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker   / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/zxnCFRMICSmD1gYRAvlQAKCehVcMvZ0W71Wk3FIFHTDgca7LvACgqnMV
AimUpITNy5koaMWEPe+rZLc=
=EmD/
-END PGP SIGNATURE-




Re: Desired feature

2003-12-04 Thread Bob Friesenhahn
On Thu, 4 Dec 2003, Gary V. Vaughan wrote:

 Actually, now that you point it out, I would hit that problem myself, since m4
 has normal _LTLIBRARIES, noinst_LTLIBRARIES and modules.  I would be happy if
 I could do this:

 ~AM_LDFLAGS = everything gets these
 ~noinst_LTLIBRARIES_LDFLAGS = these are for convenience libs
 ~lib_LTLIBRARIES_LDFLAGS = these are for other libtool libs
 ~libm4_la_LDFLAGS = but I can override non module libs individually

 That is, I think target specific flags should override PRIMARY group flags,
 not be in addition to them.

I tend to disagree with you on this point.  I will agree if the system
has three levels plus a way to provide overrides.  For example, if the
user configures like

  ./configure LDFLAGS=-lbar

then I believe that this user-requested value should be applied to all
targets.  Likewise, the configure script may want to contribute some
common LDFLAGS parameters.

Automake should support

  o inheritance of standard configure flags
  o flags common across all targets
  o additional flags common to a grouping of targets
  o additional flags specific to just one target
  o a way to override common flags at any level.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED]
http://www.simplesystems.org/users/bfriesen





Re: Desired feature

2003-12-04 Thread Gary V. Vaughan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Bob Friesenhahn wrote:
| Automake should support
|
|   o inheritance of standard configure flags
LDFLAGS

|   o flags common across all targets

AM_LDFLAGS

|   o additional flags common to a grouping of targets

dir_PRIMARY_LDFLAGS

|   o additional flags specific to just one target

target_LDFLAGS

|   o a way to override common flags at any level.

overriding is the default for target_LDFLAGS vs dir_PRIMARY_LDFLAGS,
which you can bypass with `target_LDFLAGS = $(dir_PRIMARY_LDFLAGS) -foo'.
I can't think of a nice syntax where addition is the default, and overriding
must be specified.
Cheers,
Gary.
- --
Gary V. Vaughan  ())_.  [EMAIL PROTECTED],gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker   / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/z2DnFRMICSmD1gYRAnKgAKCtElBkOY1XV19C/SlO0T+DgFny2gCcCSEB
km/SpMwrWm/xxMIThLziFcQ=
=EUAg
-END PGP SIGNATURE-




Re: Desired feature

2003-12-04 Thread Bruce Korb
Bob Friesenhahn wrote:
 
 On Thu, 4 Dec 2003, Gary V. Vaughan wrote:
  I would be happy if I could do this:

 I tend to disagree with you on this point.  I will agree if the system
 has three levels plus a way to provide overrides..
 
 Automake should support
 
   o inheritance of standard configure flags
   o flags common across all targets
   o additional flags common to a grouping of targets
   o additional flags specific to just one target
   o a way to override common flags at any level.

The best is to be able to easily express which sets of command
options should be applied to various build rules, beit for compile,
link or any other build rule.  Part of the problem is that the
expressiveness of pseudo-make variable names is rather constrained.
Anyway, the add to higher level flag lists versus replace higher
level flag lists can be solved most easily by always replacing,
but allowing the replacement to specify which of the higher level
flags to incorporate.  e.g.

   module_group_tool_FLAGS = $(tool_FLAGS) -x YYY

would say to ignore $(group_tool_FLAGS) when applying the tool
tool to the module module for the group thing.  For the
C compiler, you might spell tool_FLAGS as CFLAGS for historical
purposes and spell as AM_CFLAGS at the top.  So, for another example:

   mumble_CFLAGS = $(AM_CFLAGS) -specific-for-mumble-modules

for specifying all the mumble module compiles that do not have
a $(mod_mumble_CFLAGS) set.  Please, forget the noinst_LTLIBRARIES_LDFLAGS
stuff -- it is too obtuse for the non-automake junkies.  Me.  :-)
Just use mumble_LDFLAGS, stumble_LDFLAGS and grumble_LDFLAGS.  If
the mumble, stumble and grumble libraries happen to be convenience
libraries, then great.  If you want them to be the same, then set
them all to $(WHATEVER) and tell your clients that adding
``WHATEVER=else'' on the make line will change LD flags for the
mumble, stumble and grumble libraries.

The real deal is that the scheme needs an extremely high degree of
consistency between various build tools and it needs to be as simple
to use as absolutely possible.  Automake is already too complicated.  :)

Cheers - Bruce




Desired feature

2003-12-03 Thread Bob Friesenhahn
It would be useful if Automake supported a set of options (e.g.
LDFLAGS) which are applied only when building libraries or when
building programs.  It is excessively painful to have to add
per-target _LDFLAGS options.  Perhaps there should be both 'LT' and
non-'LT' macro versions.

Certainly this can be accomplished by overriding Automake's standard
LINK and COMPILE definitions, but overriding standard definitions is
risky.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED]
http://www.simplesystems.org/users/bfriesen