• Bug#265439: nut: build should respect LDFLAGS (1/4)

    From Jacek Drobiecki@1:229/2 to All on Fri Aug 13 10:50:10 2004
    From: [email protected]

    This is a multi-part MIME message sent by reportbug.

    Package: nut
    Version: 1.4.3-1
    Severity: minor
    Tags: patch

    there is no simple way to build packeage with additional options for
    linking executables.
    I've attached patch for this.

    diff -ru nut-1.4.3/clients/Makefile.in nut-1.4.3.my/clients/Makefile.in
    --- nut-1.4.3/clients/Makefile.in 2003-11-28 00:35:28.000000000 +0100
    +++ nut-1.4.3.my/clients/Makefile.in 2004-08-13 09:25:18.000000000 +0200
    @@ -20,6 +20,7 @@
    PROGS = upsc upslog upsrw upscmd
    SPROGS = upsmon upssched
    CGIPROGS = upsstats.cgi upsimage.cgi upsset.cgi
    +LDFLAGS = @LDFLAGS@
    LIBDEP = @LIBOBJ@
    LIBOBJ = $(LIBDEP) @NETLIBS@
    STRLCPY = @STRLCPY@
    @@ -68,7 +69,7 @@
    # other stuff

    upssched: upssched.c ../common/parseconf.o $(LIBDEP) $(STRLCPY)
    - $(CC) $(CFLAGS) -o upssched upssched.c ../common/parseconf.o $(LIBOBJ) $(STRLCPY)
    + $(CC) $(CFLAGS) -o upssched upssched.c ../common/parseconf.o $(LIBOBJ) $(STRLCPY) $(LDFLAGS)

    cgilib.o: cgilib.c
    $(CC) $(CFLAGS) -c cgilib.c
    diff -ru nut-1.4.3/drivers/Makefile.drvbuild nut-1.4.3.my/drivers/Makefile.drvbuild
    --- nut-1.4.3/drivers/Makefile.drvbuild 2004-07-29 08:36:58.000000000 +0200
    +++ nut-1.4.3.my/drivers/Makefile.drvbuild 2004-08-13 09:39:48.000000000 +0200
    @@ -4,60 +4,60 @@
    # to this file will be erased the nex
  • From Arnaud Quette@1:229/2 to All on Fri Aug 13 21:00:23 2004
    From: [email protected]

    Jacek Drobiecki a �crit :

    Package: nut
    Version: 1.4.3-1
    Severity: minor
    Tags: patch

    there is no simple way to build packeage with additional options for
    linking executables.



    this is partly wrong, as mentionned by
    configure help (displayed using configure --help), ie:

    Usage: ./configure [OPTION]... [VAR=VALUE]...

    To assign environment variables (e.g., CC, CFLAGS...), specify them as
    VAR=VALUE. See below for descriptions of some of the useful variables.
    [...]
    Some influential environment variables:
    [...]
    LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
    nonstandard directory <lib dir>

    So you can specify additionnal things
    using LDFLAGS.

    _But_ the fact is that this var isn't used
    in Makefiles, so your patch fills that lack.

    IMHO: I don't see how useful it could be,
    apart from being more conformant. All
    the needed options should be there, but
    I might be wrong!

    @Jacek: any example welcomed

    @Russell: please acknowledge

    Arnaud

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)