The dependencies for the parser files are not correct.
There is baroque irule adding header prerequisites to the parser but the
parser may still fail to build.
The real dependency is on conf-parse.h
There is no way to tell make that a rule produces two targets, such as
parse.c and parse.h. However, the dependency files are generated by a
separate rule, and not as a byproduct of building the source so they can
themselves have dependencies.
And dependencies they do have: when the header is generated it's in lib
but when the header is missing while generating dependency file it's
searched in top directory, and then the file that depends on it cannot
be built because the header neveer appears there.
When the generated .c file is addded as prerequisite to the dependency
file that should reference the header generated together with the .c
file the dependency file is generated correctly with the header present.
This is not easily reproducible with the current source but adding
conf-lex.h generated with conf-lex.c and including it in conf-parse.c
now makes both conf-lex.ad depend on conf-parse.h and conf-lex.ad on
conf-lex.h making the build 100% fail.
On recent systems, extra configuration files can live in
/etc/ld.so.conf.d, so check this directory too, before warning.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6045 7894878c-1315-0410-8ee3-d5d059ff63e0
From: Didier Roche <didrocks@ubuntu.com>
Hi lm-sensors developer,
It would be great if lm-sensors can take into account distribution
LDFLAGS so that exported variables change linker behavior.
For instance, ubuntu uses -Wl,-Bsymbolic-functions. Taking this patch
will enable us to just sync from debian on this package.
In Ubuntu, we've applied the attached patch to achieve the following:
* handle default ubuntu LDFLAGS for linking option (LP: #321632)
- Remove the old hack directly pushed in lib/Module.mk (now
lib/Module.mk if from pristine source)
- add debian/patches/07-use-LDFLAGS.patch to take LDFLAGS into account
Debian and Ubuntu thought you might be interested to handle this
directly upstream.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5713 7894878c-1315-0410-8ee3-d5d059ff63e0
Instead, access sysfs directly, using 3 embedded helper
functions. My motivations for doing this are:
* As far as I know, libsysfs is no longer maintained.
* libsysfs does much more than we need. For example, when asking for a
device attribute list, libsysfs will read the contents and permissions
of all attributes. Not only does this waste CPU cycles per se, but in
the case of hwmon driver it also triggers register reads, which can be
slow for SMBus chips.
* libsysfs enforces the difference between devices and class devices,
while future changes will be easier if we can handle both types alike.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5067 7894878c-1315-0410-8ee3-d5d059ff63e0
it possible to install both the old and the new libsensors and sensors,
making testing much easier. sensors3 will be renamed back to sensors before
we release.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4461 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch makes optional the sysfs support in libsensors. The default is to
*disable* sysfs support if a 2.4.x kernel is detected, for all other versions,
support will be enabled. This can be overridden in the top-level Makefile.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3096 7894878c-1315-0410-8ee3-d5d059ff63e0
This patch adds the files lib/sysfs.h and lib/sysfs.c, beginning with a rewrite
of the sysfs detection code (using libsyfs). In the process, I replaced two
poorly named globals with better names, and moved them to sysfs.c. The sysfs
detection now happens very early during library init, rather than later.
The long term plan is for the two global variables to disappear anyway, as
everything to do with sysfs should get moved into lib/sysfs.c.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3093 7894878c-1315-0410-8ee3-d5d059ff63e0
This trivial patch links the libsysfs library to the libsensors library.
One needs to build and install sysfsutils first:
http://linux-diag.sourceforge.net/Sysfsutils.html
This patch is naive, at least to start. Later it will be made optional
depending on whether support for Linux 2.6.x is needed, or just 2.4.x.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3092 7894878c-1315-0410-8ee3-d5d059ff63e0