* Re: [lm-sensors] Taking a closer look at lm-sensors,
@ 2007-04-12 7:13 Jean Delvare
2007-04-12 10:07 ` Hans de Goede
2007-04-13 6:51 ` Jean Delvare
0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2007-04-12 7:13 UTC (permalink / raw)
To: lm-sensors
Hi Hans,
On Mon, 09 Apr 2007 16:03:11 +0200, Hans de Goede wrote:
> Because of the integration of the dynamic chip support written by my students,
> I've been taking a (much) closer look at lm-sensors userspace.
>
> The current makefile is broken for use by any serious distribution / any
> distribution will need to patch it.
>
> Why? Well because of the abundant use of ":=" instead of "="
>
> For example the Makefile says:
> "PREFIX := /usr/local"
>
> Now when one wants an other prefix, normally in the build script for the distro
> one would invoke make like this:
>
> make PREFIX=/usr
>
> however because of the unnecessary use of :=, this isn;'t work as := will
> overwrite any environment / make commandline settings. This leads to distro's
> using patches to the makefile like the one attached.
Missing attachment.
> Is it ok if I fix this in the 3.0.0 branch?
I would need to be convinced that this needs to be fixed first. I wrote
a minimal Makefile for testing purposes as follows:
--- 8< ---
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
all :
@echo $(PREFIX)
@echo $(BINDIR)
--- 8< ---
khali@hyperion:~/tmp> make
/usr/local
/usr/local/bin
khali@hyperion:~/tmp> make PREFIX=/usr
/usr
/usr/bin
khali@hyperion:~/tmp>
This is with GNU make 3.81, but I also tested with 3.80 and 3.78.1 with
the same result. So ":=" seems to allow variable value override from
the command line just fine, and I fail to see why a distribution would
need to patch our Makefile. In fact I just tried a "make PREFIX=/foo
user_install" and it installed lm-sensors in /foo just fine. So what's
the problem exactly?
Checking the Slackware and openSuse lm-sensors package sources, I see
that they do indeed patch our Makefile to change the prefix and other
variables. But given my tests above, this seems to be by choice, and I
doubt they would do it any differently if we were using "=" instead of
":=" in the Makefile.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] Taking a closer look at lm-sensors,
2007-04-12 7:13 [lm-sensors] Taking a closer look at lm-sensors, Jean Delvare
@ 2007-04-12 10:07 ` Hans de Goede
2007-04-13 6:51 ` Jean Delvare
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2007-04-12 10:07 UTC (permalink / raw)
To: lm-sensors
Jean Delvare wrote:
> Hi Hans,
>
> I would need to be convinced that this needs to be fixed first. I wrote
> a minimal Makefile for testing purposes as follows:
>
> --- 8< ---
> PREFIX := /usr/local
> BINDIR := $(PREFIX)/bin
>
> all :
> @echo $(PREFIX)
> @echo $(BINDIR)
> --- 8< ---
>
> khali@hyperion:~/tmp> make
> /usr/local
> /usr/local/bin
> khali@hyperion:~/tmp> make PREFIX=/usr
> /usr
> /usr/bin
> khali@hyperion:~/tmp>
>
> This is with GNU make 3.81, but I also tested with 3.80 and 3.78.1 with
> the same result. So ":=" seems to allow variable value override from
> the command line just fine, and I fail to see why a distribution would
> need to patch our Makefile. In fact I just tried a "make PREFIX=/foo
> user_install" and it installed lm-sensors in /foo just fine. So what's
> the problem exactly?
>
> Checking the Slackware and openSuse lm-sensors package sources, I see
> that they do indeed patch our Makefile to change the prefix and other
> variables. But given my tests above, this seems to be by choice, and I
> doubt they would do it any differently if we were using "=" instead of
> ":=" in the Makefile.
>
Hmm,
You are right, still I seem to remember patching Makefiles myself because of :=
causing passing stuff on the cmdline to not work. Maybe this has changed and
the patched used by opensuse / slackware (and Fedora) were there because this
didn't use to work??
Anyways overriding them from the cmdline seems to work fine now a days, or
maybe the replacing of := with = in other cases was just plastering over other
issues.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] Taking a closer look at lm-sensors,
2007-04-12 7:13 [lm-sensors] Taking a closer look at lm-sensors, Jean Delvare
2007-04-12 10:07 ` Hans de Goede
@ 2007-04-13 6:51 ` Jean Delvare
1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2007-04-13 6:51 UTC (permalink / raw)
To: lm-sensors
Hans,
On Thu, 12 Apr 2007 12:07:51 +0200, Hans de Goede wrote:
> You are right, still I seem to remember patching Makefiles myself because of :=
> causing passing stuff on the cmdline to not work. Maybe this has changed and
> the patched used by opensuse / slackware (and Fedora) were there because this
> didn't use to work??
Could be. I noticed that the distributions are usually better at adding
workarounds in their builds than at cleaning them up when they are no
longer necessary. That being said, I've tested GNU make 2.78.1, which
is quite old now, it was released in September 1999, and it does not
exhibit the behavior you describe. So I'm a bit skeptical.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-13 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 7:13 [lm-sensors] Taking a closer look at lm-sensors, Jean Delvare
2007-04-12 10:07 ` Hans de Goede
2007-04-13 6:51 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.