Ticket #2296 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Let the user to override Makefile variable without changing the Makefile

Reported by: ticket Owned by: khali
Priority: minor Milestone: 3.0.1
Component: unsorted Version:
Keywords: Makefile build Cc: giamby@…

Description

Hi,

I would like to propose a little patch to the Makefile of lm-sensors.

The problem is that some linux/unix distributions (in this case I'm using GoboLinux?) let you to choose the installation dir or nearly any library or package. In the case of lm-sensors, this can be accomplished by simply editing the PREFIX variable of the Makefile. Unfortunately this is not very handy to cope with automatic tool, since they need to change the makefile. An easier way is proposed with this patch: let the user to override the PREFIX variable using system environment. All you need to change is the way you assign the variable by using the "?=" assignment operator of gnu make. Hope this make sense. giamby@…

Attachments

01-Makefile.patch Download (0.6 KB) - added by ticket 5 years ago.

Change History

Changed 5 years ago by ticket

Changed 5 years ago by khali

  • cc giamby@… added
  • owner changed from somebody to khali
  • status changed from new to assigned

This has been discussed 9 months ago on the lm-sensors list:

 http://lists.lm-sensors.org/pipermail/lm-sensors/2007-April/019461.html

The conclusion was that it is already possible to override the Makefile variables from the command line. Note that the variables must be passed on the command line (e.g. "make PREFIX=/usr") and not through the environment as you seem to expect ("PREFIX=/usr make" won't work.)

Changed 5 years ago by khali

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to 3.0.1

I've documented the variable overriding mechanism (r5107).

Note: See TracTickets for help on using tickets.