[LinuxPPS] 2.6.24.3 errors
Fabio Checconi
fabio at gandalf.sssup.it
Wed Mar 5 17:06:06 CET 2008
> From: Udo van den Heuvel <udovdh at xs4all.nl>
> Date: Wed, Mar 05, 2008 11:48:28AM +0100
>
> Udo van den Heuvel wrote:
> > Why then the change after copying the older Makefile?
> > Why the small differences in the Makefile?
> >
> > I am not saying that is teh cause but I am trying to understand what is
> > happening here.
> > Even in a fresh tree.
>
> I see:
>
> [root at epia linux]# cat drivers/pps/Makefile
> #
> # Makefile for the PPS core.
> #
>
> pps_core-objs += pps.o kapi.o sysfs.o
> obj-$(CONFIG_PPS) += pps_core.o
> obj-y += clients/
>
> ifeq ($(CONFIG_PPS_DEBUG),y)
> EXTRA_CFLAGS += -DDEBUG
> endif
> [root at epia linux]# cat drivers/pps/Makefile.bis
> #
> # Makefile for the PPS core.
> #
>
> pps_core-y := pps.o kapi.o sysfs.o
> obj-$(CONFIG_PPS) := pps_core.o
> obj-y := clients/
>
> ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG
>
>
> Any ideas why the old Makefile could make things work?
>
the difference should be that in the second version the second
assignment of obj-y overrides the first one (if CONFIG_PPS_DEBUG =
y,) so you end up with only clients/ as a prerequisite for the
current directory, and not the pps_core module. a solution could
be:
pps_core-y := pps.o kapi.o sysfs.o
obj-y := clients/
obj-$(CONFIG_PPS) += pps_core.o
ccflags-$(CONFIG_PPS_DEBUG) := -DDEBUG
that seems to be a pattern used quite often in the kernel makefiles,
but of course that's not enough for obtaining a positive review...
I haven't tried it, but I'm pretty sure that building the pps-core
as a module would succeed with the new makefile, because the first
assignment would be to obj-m, and the second one to obj-y.
More information about the LinuxPPS
mailing list