See patch (based on original idea from Juergen Beisert).

Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Drop a bunch of almost-empty Makefiles which are of no real use.

Instead unconditionally include _all_ northbridge/southbridge/superio
Makefiles, but put 'ifeq's in each of them to guard against including
unwanted contents.

This may sound like it's very slow when there are many Makefiles, but in
practice the speed difference is neglectable. A few ad hoc tests I did
showed no measurable speed differences at all (I used 30 or 40 sample
Makefiles).

Signed-off-by: Uwe Hermann <[EMAIL PROTECTED]>

Index: southbridge/amd/cs5536/Makefile
===================================================================
--- southbridge/amd/cs5536/Makefile	(Revision 439)
+++ southbridge/amd/cs5536/Makefile	(Arbeitskopie)
@@ -19,10 +19,14 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+ifeq ($(CONFIG_SOUTHBRIDGE_AMD_CS5536),y)
+
 STAGE2_CHIPSET_OBJ += $(obj)/southbridge/amd/cs5536/cs5536.o
 
-$(obj)/southbridge/amd/cs5536/%.o: $(src)/southbridge/amd/cs5536/%.c $(obj)/statictree.h
+$(obj)/southbridge/amd/cs5536/%.o: $(src)/southbridge/amd/cs5536/%.c \
+				   $(obj)/statictree.h
 	$(Q)mkdir -p $(obj)/southbridge/amd/cs5536/
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
 
+endif
Index: southbridge/amd/Makefile
===================================================================
--- southbridge/amd/Makefile	(Revision 439)
+++ southbridge/amd/Makefile	(Arbeitskopie)
@@ -1,26 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-# One entry like the below for each supported AMD southbridge.
-ifeq ($(CONFIG_SOUTHBRIDGE_AMD_CS5536),y)
-	include $(src)/southbridge/amd/cs5536/Makefile
-endif
-
Index: southbridge/intel/i82371eb/Makefile
===================================================================
--- southbridge/intel/i82371eb/Makefile	(Revision 439)
+++ southbridge/intel/i82371eb/Makefile	(Arbeitskopie)
@@ -18,10 +18,14 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+ifeq ($(CONFIG_SOUTHBRIDGE_INTEL_I82371EB),y)
+
 STAGE2_CHIPSET_OBJ += $(obj)/southbridge/intel/i82371eb/i82371eb.o
 
-$(obj)/southbridge/intel/i82371eb/%.o: $(src)/southbridge/intel/i82371eb/%.c $(obj)/statictree.h
+$(obj)/southbridge/intel/i82371eb/%.o: $(src)/southbridge/intel/i82371eb/%.c \
+				       $(obj)/statictree.h
 	$(Q)mkdir -p $(obj)/southbridge/intel/i82371eb/
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
 
+endif
Index: southbridge/intel/Makefile
===================================================================
--- southbridge/intel/Makefile	(Revision 439)
+++ southbridge/intel/Makefile	(Arbeitskopie)
@@ -1,26 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-# One entry like the below for each supported Intel southbridge.
-ifeq ($(CONFIG_SOUTHBRIDGE_INTEL_I82371EB),y)
-	include $(src)/southbridge/intel/i82371eb/Makefile
-endif
-
Index: southbridge/Makefile
===================================================================
--- southbridge/Makefile	(Revision 439)
+++ southbridge/Makefile	(Arbeitskopie)
@@ -1,24 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-include $(src)/southbridge/amd/Makefile
-include $(src)/southbridge/intel/Makefile
-
Index: superio/winbond/Makefile
===================================================================
--- superio/winbond/Makefile	(Revision 439)
+++ superio/winbond/Makefile	(Arbeitskopie)
@@ -1,25 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-ifeq ($(CONFIG_SUPERIO_WINBOND_W83627HF),y)
-	include $(src)/superio/winbond/w83627hf/Makefile
-endif
-
Index: superio/winbond/w83627hf/Makefile
===================================================================
--- superio/winbond/w83627hf/Makefile	(Revision 439)
+++ superio/winbond/w83627hf/Makefile	(Arbeitskopie)
@@ -19,6 +19,8 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+ifeq ($(CONFIG_SUPERIO_WINBOND_W83627HF),y)
+
 # Always add to variables, as there could be more than one Super I/O.
 STAGE2_CHIPSET_OBJ += $(obj)/superio/winbond/w83627hf/superio.o
 
@@ -27,3 +29,4 @@
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
 
+endif
Index: superio/Makefile
===================================================================
--- superio/Makefile	(Revision 439)
+++ superio/Makefile	(Arbeitskopie)
@@ -1,23 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-include $(src)/superio/winbond/Makefile
-
Index: northbridge/amd/geodelx/Makefile
===================================================================
--- northbridge/amd/geodelx/Makefile	(Revision 439)
+++ northbridge/amd/geodelx/Makefile	(Arbeitskopie)
@@ -19,10 +19,15 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-STAGE2_CHIPSET_OBJ += $(obj)/northbridge/amd/geodelx/geodelx.o $(obj)/northbridge/amd/geodelx/geodelxinit.o
+ifeq ($(CONFIG_NORTHBRIDGE_AMD_GEODELX),y)
 
-$(obj)/northbridge/amd/geodelx/%.o: $(src)/northbridge/amd/geodelx/%.c $(obj)/statictree.h
+STAGE2_CHIPSET_OBJ += $(obj)/northbridge/amd/geodelx/geodelx.o \
+		      $(obj)/northbridge/amd/geodelx/geodelxinit.o
+
+$(obj)/northbridge/amd/geodelx/%.o: $(src)/northbridge/amd/geodelx/%.c \
+				    $(obj)/statictree.h
 	$(Q)mkdir -p $(obj)/northbridge/amd/geodelx
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
 
+endif
Index: northbridge/amd/Makefile
===================================================================
--- northbridge/amd/Makefile	(Revision 439)
+++ northbridge/amd/Makefile	(Arbeitskopie)
@@ -1,25 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-ifeq ($(CONFIG_NORTHBRIDGE_AMD_GEODELX),y)
-	include $(src)/northbridge/amd/geodelx/Makefile
-endif
-
Index: northbridge/intel/i440bxemulation/Makefile
===================================================================
--- northbridge/intel/i440bxemulation/Makefile	(Revision 439)
+++ northbridge/intel/i440bxemulation/Makefile	(Arbeitskopie)
@@ -19,6 +19,8 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
+ifeq ($(CONFIG_NORTHBRIDGE_INTEL_I440BXEMULATION),y)
+
 STAGE2_CHIPSET_OBJ += $(obj)/northbridge/intel/i440bxemulation/i440bx.o
 
 $(obj)/northbridge/intel/i440bxemulation/%.o: $(src)/northbridge/intel/i440bxemulation/%.c $(obj)/statictree.h
@@ -26,3 +28,4 @@
 	$(Q)printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(Q)$(CC) $(INITCFLAGS) -c $< -o $@
 
+endif
Index: northbridge/intel/Makefile
===================================================================
--- northbridge/intel/Makefile	(Revision 439)
+++ northbridge/intel/Makefile	(Arbeitskopie)
@@ -1,25 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-ifeq ($(CONFIG_NORTHBRIDGE_INTEL_I440BXEMULATION),y)
-	include $(src)/northbridge/intel/i440bxemulation/Makefile
-endif
-
Index: northbridge/Makefile
===================================================================
--- northbridge/Makefile	(Revision 439)
+++ northbridge/Makefile	(Arbeitskopie)
@@ -1,24 +0,0 @@
-##
-## This file is part of the LinuxBIOS project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <[EMAIL PROTECTED]> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-include $(src)/northbridge/amd/Makefile
-include $(src)/northbridge/intel/Makefile
-
Index: Makefile
===================================================================
--- Makefile	(Revision 439)
+++ Makefile	(Arbeitskopie)
@@ -109,9 +109,9 @@
 include lib/Makefile
 include device/Makefile
 include mainboard/$(MAINBOARDDIR)/Makefile
-include northbridge/Makefile
-include southbridge/Makefile
-include superio/Makefile
+include northbridge/*/*/Makefile
+include southbridge/*/*/Makefile
+include superio/*/*/Makefile
 include arch/$(ARCH)/Makefile
 
 endif

Attachment: signature.asc
Description: Digital signature

-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to