[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Variable in Depends: ??

> You are assuming that the version of the kernel that is being run is the same 
> as the version that is being compiled for.  This is bad and means multiple 
> reboots if you want to compile for multiple kernels.
> "uname -r" should be replaced with the following:
> head -4 /usr/src/linux/Makefile | sed -e "s/ //g" > foo
> /bin/sh ./foo

 And you are assuming that the kernel headers are in /usr/src. The proper
way to do this, IMO, would be to call gcc with the same arguments than the
ones used in the compilation, and do:

#include <linux/version.h>
#include <stdio.h>

int main()
	return 0;

Reply to: