kernel 1.2.13 must be in /usr/src/linux ?

Cristian Gafton (gafton@cccis.sfos.ro)
Sun, 27 Aug 1995 21:28:57 +0300 (EET DST)


If I want to put a kernel in some other place than /usr/src/linux,
it will fail at make dep because the drivers/block/aztcd.c file has a
hard-coded include file in it, some place around line 140:

#ifdef MODULE
# include "/usr/src/linux/drivers/block/blk.h"
#else
# include "blk.h"
# define MOD_INC_USE_COUNT
# define MOD_DEC_USE_COUNT
#endif

More than that, at the top of drivers/block/Makefile I read:

OBJS := ll_rw_blk.o ramdisk.o genhd.o
SRCS := ll_rw_blk.c ramdisk.c genhd.c
BLOCK_MODULE_OBJS =

and then the dep rule is:

dep:
$(CPP) -M $(SRCS) > .depend
ifdef BLOCK_MODULE_OBJS
$(CPP) -M -DMODULE $(BLOCK_MODULE_OBJS:.o=.c) >> .depend
endif

The ifdef directive will be always true, thus forcing '-DMODULE' on
make dep.
I've removed the hard reference to blk.h file, but I'd like to know
if that's correct. I don't use the aztcd driver, though ...

Cristian Gafton

Cristian Gafton, SysAdm gafton@cccis.sfos.ro
----------------------------------------------------------------------
Computers & Communications Center str. Moara de Foc nr. 35
Phone: 40-32-252936, 252938 PO-BOX 2-549
Fax: 40-32-252933 IASI 6600, ROMANIA
======================================================================
Good code is hard to write, so it must be hard to understand.