Makefile automagic for RedHat kernel sources
Hello:
There's been a lot of "I can't compile vs. RedHat" lately. I found it's because the makefile automagic chokes on version.h...
Quoted 6 lines
#include <
linux/rhconfig.h>
#ifdefined(__module__smp)
#defineUTS_RELEASE"2.4.18-19.8.0smp"
#elifdefined(__module__BOOT)
#defineUTS_RELEASE"2.4.18-19.8.0BOOT"
#elifdefined(__module__bigmem)
Quoted 8 lines
#define
UTS_RELEASE"2.4.18-19.8.0bigmem"
#elifdefined(__module__debug)
#defineUTS_RELEASE"2.4.18-19.8.0debug"
#else
#defineUTS_RELEASE"2.4.18-19.8.0"
#endif
#defineLINUX_VERSION_CODE132114
#defineKERNEL_VERSION(a,b,c)(((a) << 16) + ((b) << 8) + (c))
... because we're doing a simple grep for UTS_RELEASE.
What if we did this instead, e.g.
Quoted 2 lines
MODPREF := /lib/modules/`$(CC) -I$(LINUX_HEADERS) -E
config.c| \
greputs_release| cut -f 2 -d '"'`
Where config.c looked like this:
Quoted 2 lines
#include <
linux/version.h>
char *uts_release=UTS_RELEASE;
Similar guck for SMP and MODVER. Comments?
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]