Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2017 16:57:31 +0000
From:      =?UTF-8?Q?Jev_Bj=C3=B6rsell?= <jev@ecadlabs.com>
To:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   question about use of != assignments
Message-ID:  <CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4%2ByB87nefsxjQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--001a11493f9a9e569f054b54a861
Content-Type: text/plain; charset=UTF-8

Hello,

I'm updating net-mgmt/prometheus for which I am the maintainer.

During build, I have added some ldflags for the `go build` step, so that
build time, version, etc. is recorded in the binary. Before this change
running `prometheus -version` gives a bunch of blank values, my attached
patch fixes that.

I'm using != assignments in my Makefile to get date, user, and host.
portlint warns me[0] not to use != assignments, and the linked post
suggests to use echo $$(${VARIABLE_CMDS}) instead.

If I inline $$(${VARIABLE_CMDS})  into by build targets, without echo, they
do not get evaluated.

The question; is my use of != in this context acceptable use, or is there a
better way?

Much thanks,
-Jev

[0]: portlint warning
WARN: Makefile: [25]: use of != in assignments is almost never a good thing
to do.  Try to avoid using them.  See
http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for
some helpful hints on what to do instead.

--001a11493f9a9e569f054b54a861
Content-Type: text/x-patch; charset=US-ASCII; name="prometheus-1.5.2.diff"
Content-Disposition: attachment; filename="prometheus-1.5.2.diff"
Content-Transfer-Encoding: base64
Content-ID: <15af6f2b08a92ff29fa1>
X-Attachment-Id: 15af6f2b08a92ff29fa1

SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIE1ha2VmaWxlCShyZXZpc2lvbiA0MzM2NTcp
CisrKyBNYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMiw3ICsyLDcgQEAKICMgJEZyZWVCU0Qk
CiAKIFBPUlROQU1FPQlwcm9tZXRoZXVzCi1QT1JUVkVSU0lPTj0JMS41LjAKK1BPUlRWRVJTSU9O
PQkxLjUuMgogRElTVFZFUlNJT05QUkVGSVg9CXYKIENBVEVHT1JJRVM9CW5ldC1tZ210CiAKSW5k
ZXg6IGRpc3RpbmZvCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGRpc3RpbmZvCShyZXZpc2lvbiA0MzM2NTcpCisr
KyBkaXN0aW5mbwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDMgQEAKLVRJTUVTVEFNUCA9IDE0
ODUxNjAzNTcKLVNIQTI1NiAocHJvbWV0aGV1cy1wcm9tZXRoZXVzLXYxLjUuMF9HSDAudGFyLmd6
KSA9IGY4ZWFlNWY0YzUxZmRkNzNjZWVjMDhmYzQ4OTVlNjk1YjZiMDJiNTgxYWE5NWU3NDJlMGY0
OGY1YWVmYzU1MzcKLVNJWkUgKHByb21ldGhldXMtcHJvbWV0aGV1cy12MS41LjBfR0gwLnRhci5n
eikgPSA1MTgyODMwCitUSU1FU1RBTVAgPSAxNDg2NzE5MjEwCitTSEEyNTYgKHByb21ldGhldXMt
cHJvbWV0aGV1cy12MS41LjJfR0gwLnRhci5neikgPSBjNDg4MWNjMzA1MjYzY2M4ZGE0MzRiZTY5
YTIwYWEwMzkzODZkNGZlYWI1ZTU4ZjhiODlhNjBiZmU4YjU1NmFjCitTSVpFIChwcm9tZXRoZXVz
LXByb21ldGhldXMtdjEuNS4yX0dIMC50YXIuZ3opID0gNTE4MzUzNwo=
--001a11493f9a9e569f054b54a861--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGKJJVnvVvjhpa0h1LexgKy806NrkMznVQS0b4%2ByB87nefsxjQ>