Re: Config cleanup & [PATCH]

Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Fri, 11 Dec 1998 17:20:29 +0100 (CET)


Matthew Kirkwood <weejock@ferret.lmh.ox.ac.uk> wrote:
> On Wed, 9 Dec 1998, Riley Williams wrote:
>
> > The enclosed patch just cleans up some of the conditions in the various
> > configuration scripts. It should make them a little easier to follow
> > without hurting anything...
>
> They were changed to be that way because in the case where CONFIG_FOOBAR
> is undefined, the sub-menus were opened anyway.

Right. And some of such situations exist in current Config.in's.
I think the enclosed patch cleans some of them. It is against 2.1.131ac8:

- in drivers/misc/Makefile CONFIG_PROC_FS is undefined if "n" is answered
(currently parport_procfs.c is compiled even with no /proc support causing
"unresolved symbols" in parport.o module)
- similar problem with NCP filesystem: CONFIG_IPX and CONFIG_INET are not
defined if CONFIG_NET is not set.
- same with NFS/NFSD/SMB section
Also:
- there's no point to ask about "AUN over UDP" if TCP/IP support is omitted
- similarily, neither ax25 nor irda have files which can be compiled
without networking support (CONFIG_NET not set)

Regards
Andrzej

************************** PATCH ***************************************
--- linux-2.1.131ac8/drivers/misc/Makefile Sat Jan 24 05:04:03 1998
+++ linux/drivers/misc/Makefile Fri Dec 11 16:53:08 1998
@@ -41,7 +41,7 @@
else
ifeq ($(CONFIG_PARPORT),m)
MI_OBJS += parport_share.o parport_ieee1284.o
- ifneq ($(CONFIG_PROC_FS),n)
+ ifeq ($(CONFIG_PROC_FS),y)
MI_OBJS += parport_procfs.o
endif
MIX_OBJS += parport_init.o
--- linux-2.1.131ac8/net/Config.in Sun Sep 13 19:22:17 1998
+++ linux/net/Config.in Fri Dec 11 16:53:08 1998
@@ -21,7 +21,7 @@
tristate 'The IPv6 protocol (EXPERIMENTAL)' CONFIG_IPV6
# bool 'The IPv6 protocol (EXPERIMENTAL)' CONFIG_IPV6
if [ "$CONFIG_IPV6" != "n" ]; then
- source net/ipv6/Config.in
+ source net/ipv6/Config.in
fi
fi
fi
@@ -46,7 +46,9 @@
# fi
tristate 'Acorn Econet/AUN protocols (EXPERIMENTAL)' CONFIG_ECONET
if [ "$CONFIG_ECONET" != "n" ]; then
- bool ' AUN over UDP' CONFIG_ECONET_AUNUDP
+ if [ "$CONFIG_INET" != "n" ]; then
+ bool ' AUN over UDP' CONFIG_ECONET_AUNUDP
+ fi
bool ' Native Econet' CONFIG_ECONET_NATIVE
fi
tristate 'WAN router' CONFIG_WAN_ROUTER
@@ -54,11 +56,11 @@
bool 'Forwarding between high speed interfaces' CONFIG_NET_HW_FLOWCONTROL
bool 'CPU is too slow to handle full bandwidth' CONFIG_CPU_IS_SLOW
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool 'QoS and/or fair queueing' CONFIG_NET_SCHED
- if [ "$CONFIG_NET_SCHED" = "y" ]; then
- source net/sched/Config.in
- fi
-# bool 'Network code profiler' CONFIG_NET_PROFILE
+ bool 'QoS and/or fair queueing' CONFIG_NET_SCHED
+ if [ "$CONFIG_NET_SCHED" = "y" ]; then
+ source net/sched/Config.in
+ fi
+# bool 'Network code profiler' CONFIG_NET_PROFILE
fi
fi
endmenu
--- linux-2.1.131ac8/arch/i386/config.in Fri Dec 11 15:11:25 1998
+++ linux/arch/i386/config.in Fri Dec 11 16:53:08 1998
@@ -111,11 +111,10 @@
source drivers/net/Config.in
fi
endmenu
-fi
-
-source net/ax25/Config.in

-source net/irda/Config.in
+ source net/ax25/Config.in
+ source net/irda/Config.in
+fi

mainmenu_option next_comment
comment 'ISDN subsystem'
--- linux-2.1.131ac8/fs/Config.in Fri Dec 11 15:11:37 1998
+++ linux/fs/Config.in Fri Dec 11 16:53:08 1998
@@ -21,7 +21,7 @@
dep_tristate 'VFAT (Windows-95) fs support' CONFIG_VFAT_FS $CONFIG_FAT_FS

bool '/proc filesystem support' CONFIG_PROC_FS
-if [ "$CONFIG_INET" = "y" ]; then
+if [ "$CONFIG_NET" = "y" -a "$CONFIG_INET" = "y" ]; then
tristate 'NFS filesystem support' CONFIG_NFS_FS
if [ "$CONFIG_NFS_FS" = "y" -a "$CONFIG_IP_PNP" = "y" ]; then
bool ' Root file system on NFS' CONFIG_ROOT_NFS
@@ -48,10 +48,12 @@
bool 'SMB Win95 bug work-around' CONFIG_SMB_WIN95
fi
fi
-if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
- tristate 'NCP filesystem support (to mount NetWare volumes)' CONFIG_NCP_FS
- if [ "$CONFIG_NCP_FS" != "n" ]; then
- source fs/ncpfs/Config.in
+if [ "$CONFIG_NET" = "y" ]; then
+ if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
+ tristate 'NCP filesystem support (to mount NetWare volumes)' CONFIG_NCP_FS
+ if [ "$CONFIG_NCP_FS" != "n" ]; then
+ source fs/ncpfs/Config.in
+ fi
fi
fi
tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/