From 155b75bebc7e70501782e55160d144df212c6f4e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 17 May 2014 22:44:00 +0200 Subject: fix "make -j" inspirated by pok's changes @mdv --- mdk-stage1/Makefile | 23 +++++++++----- mdk-stage1/pci-resource/Makefile | 25 --------------- mdk-stage1/pci-resource/update-pci-ids.pl | 27 ---------------- mdk-stage1/pcmcia-resource/Makefile | 24 -------------- mdk-stage1/pcmcia-resource/update-pcmcia-ids.pl | 42 ------------------------- mdk-stage1/probing.c | 6 ++-- mdk-stage1/update-pci-ids.pl | 27 ++++++++++++++++ mdk-stage1/update-pcmcia-ids.pl | 42 +++++++++++++++++++++++++ mdk-stage1/update-usb-ids.pl | 24 ++++++++++++++ mdk-stage1/usb-resource/Makefile | 25 --------------- mdk-stage1/usb-resource/update-usb-ids.pl | 24 -------------- 11 files changed, 111 insertions(+), 178 deletions(-) delete mode 100644 mdk-stage1/pci-resource/Makefile delete mode 100755 mdk-stage1/pci-resource/update-pci-ids.pl delete mode 100644 mdk-stage1/pcmcia-resource/Makefile delete mode 100755 mdk-stage1/pcmcia-resource/update-pcmcia-ids.pl create mode 100755 mdk-stage1/update-pci-ids.pl create mode 100755 mdk-stage1/update-pcmcia-ids.pl create mode 100755 mdk-stage1/update-usb-ids.pl delete mode 100644 mdk-stage1/usb-resource/Makefile delete mode 100755 mdk-stage1/usb-resource/update-usb-ids.pl (limited to 'mdk-stage1') diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index 381b4b172..8ab5b680a 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -91,9 +91,9 @@ STAGE1OBJS-FULL = $(STAGE1_ALLSRC:.c=-FULL.o) BINS = init stage1 dhcp-client rescue-gui probe-modules -DIRS += pci-resource usb-resource +OTHERS = pci-ids.h usb-ids.h ifneq (,$(filter $(ARCH),i386 x86_64)) -DIRS += pcmcia pcmcia-resource +OTHERS += pcmcia-ids.h pcmcia PCMCIA_LIB = pcmcia/libpcmcia.a PCMCIA_DEFS = -DENABLE_PCMCIA endif @@ -101,12 +101,19 @@ endif USB_DEFS_GEN = -DENABLE_USB USB_DEFS = -DENABLE_USB -DDISABLE_PCIADAPTERS -all: dirs $(BINS) +all: $(OTHERS) $(BINS) -dirs: - @for n in . $(DIRS); do \ - [ "$$n" = "." ] || make -C $$n || exit 1 ;\ - done +pci-ids.h: /usr/share/ldetect-lst/pcitable.gz update-pci-ids.pl + perl update-pci-ids.pl > $@ || { rm -f $@; exit 1; } + +usb-ids.h: /usr/share/ldetect-lst/usbtable.gz update-usb-ids.pl + perl update-usb-ids.pl > $@ || rm -f $@ + +pcmcia-ids.h: update-pcmcia-ids.pl + perl update-pcmcia-ids.pl > $@ || { rm -f $@; exit 1; } + +pcmcia/libpcmcia.a: + make -j -C pcmcia init: $(INITOBJS) $(CC) $(LDFLAGS) -o $@ $^ @@ -143,7 +150,7 @@ clean: localclean done localclean: - rm -f *.o .depend *.rdz *.img $(BINS) + rm -f *.o .depend *.rdz *.img pci-ids.h pcmcia-ids.h usb-ids.h $(BINS) rescue-gui: rescue-gui.o frontend-common.o params.o utils.o log.o automatic.o $(FRONTEND_LINK) diff --git a/mdk-stage1/pci-resource/Makefile b/mdk-stage1/pci-resource/Makefile deleted file mode 100644 index c8214ddc1..000000000 --- a/mdk-stage1/pci-resource/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - #****************************************************************************** - # - # $Id: Makefile 253685 2009-03-06 14:27:29Z tv $ - # - # Guillaume Cottenceau (gc) - # - # Copyright 2000 Mandriva - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - - -all: pci-ids.h - -pci-ids.h: /usr/share/ldetect-lst/pcitable.gz update-pci-ids.pl - perl update-pci-ids.pl > $@ || { rm -f $@; exit 1; } - -clean: - rm -f pci-ids.h diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl deleted file mode 100755 index 84191a9d6..000000000 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl - -use lib '../kernel'; -use strict; -use MDK::Common; - - -my %t = ( - network => 'network/main|gigabit|pcmcia|virtual|wireless', - medias_ide => 'disk/ide', - medias_other => 'disk/scsi|hardware_raid|sata|virtual bus/firewire', -); - -foreach my $type (keys %t) { - my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "$t{$type}"`) - or die "unable to get PCI modules"; - - print "#ifndef DISABLE_".uc($type)." -char* ${type}_pci_modules[] = { -"; - printf qq|\t"%s",\n|, $_ foreach @modules; - print "}; -unsigned int ${type}_pci_modules_len = sizeof(${type}_pci_modules) / sizeof(char *); -#endif - -"; -} diff --git a/mdk-stage1/pcmcia-resource/Makefile b/mdk-stage1/pcmcia-resource/Makefile deleted file mode 100644 index b27eb2f0b..000000000 --- a/mdk-stage1/pcmcia-resource/Makefile +++ /dev/null @@ -1,24 +0,0 @@ - #****************************************************************************** - # - # Olivier Blin (blino) - # - # Copyright 2006 Mandriva - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - -TARGET=pcmcia-ids.h - -all: $(TARGET) - -$(TARGET): - perl update-pcmcia-ids.pl > $@ || { rm -f $@; exit 1; } - -clean: - rm -f $(TARGET) diff --git a/mdk-stage1/pcmcia-resource/update-pcmcia-ids.pl b/mdk-stage1/pcmcia-resource/update-pcmcia-ids.pl deleted file mode 100755 index 67e0ca9a7..000000000 --- a/mdk-stage1/pcmcia-resource/update-pcmcia-ids.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl - -use lib '../kernel'; -use strict; -use MDK::Common; - -my @aliases; -my ($main) = `ls -t /lib/modules/*/modules.alias`; -foreach (cat_(chomp_($main))) { - push @aliases, [ $1, $2 ] if /^alias\s+(pcmcia:\S+)\s+(\S+)$/; #- modalias, module -} -@aliases or die "unable to get PCMCIA aliases"; - -print ' -struct pcmcia_alias { - const char *modalias; - const char *module; -}; - -'; - -my %t = ( - network => 'network/pcmcia', - medias => 'disk/pcmcia', -); - -foreach my $type (keys %t) { - my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "$t{$type}"`) - or die "unable to get PCMCIA modules"; - - print "#ifndef DISABLE_".uc($type)." -struct pcmcia_alias ${type}_pcmcia_ids[] = { -"; - print qq|\t{ "$_->[0]", "$_->[1]" },\n| foreach grep { member($_->[1], @modules) } @aliases; - print "}; -unsigned int ${type}_pcmcia_num_ids = sizeof(${type}_pcmcia_ids) / sizeof(struct pcmcia_alias); - -#endif - -"; - -} diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 61a605651..3df4ec465 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -50,13 +50,13 @@ #include "utils.h" #include "frontend.h" #include "modules.h" -#include "pci-resource/pci-ids.h" +#include "pci-ids.h" #ifdef ENABLE_USB -#include "usb-resource/usb-ids.h" +#include "usb-ids.h" #endif #ifdef ENABLE_PCMCIA #include "sysfs/libsysfs.h" -#include "pcmcia-resource/pcmcia-ids.h" +#include "pcmcia-ids.h" #endif #include "probing.h" diff --git a/mdk-stage1/update-pci-ids.pl b/mdk-stage1/update-pci-ids.pl new file mode 100755 index 000000000..1b084ea80 --- /dev/null +++ b/mdk-stage1/update-pci-ids.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl + +use lib '../kernel'; +use strict; +use MDK::Common; + + +my %t = ( + network => 'network/main|gigabit|pcmcia|virtual|wireless', + medias_ide => 'disk/ide', + medias_other => 'disk/scsi|hardware_raid|sata|virtual bus/firewire', +); + +foreach my $type (keys %t) { + my @modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "$t{$type}"`) + or die "unable to get PCI modules"; + + print "#ifndef DISABLE_".uc($type)." +char* ${type}_pci_modules[] = { +"; + printf qq|\t"%s",\n|, $_ foreach @modules; + print "}; +unsigned int ${type}_pci_modules_len = sizeof(${type}_pci_modules) / sizeof(char *); +#endif + +"; +} diff --git a/mdk-stage1/update-pcmcia-ids.pl b/mdk-stage1/update-pcmcia-ids.pl new file mode 100755 index 000000000..9eb25c66e --- /dev/null +++ b/mdk-stage1/update-pcmcia-ids.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl + +use lib '../kernel'; +use strict; +use MDK::Common; + +my @aliases; +my ($main) = `ls -t /lib/modules/*/modules.alias`; +foreach (cat_(chomp_($main))) { + push @aliases, [ $1, $2 ] if /^alias\s+(pcmcia:\S+)\s+(\S+)$/; #- modalias, module +} +@aliases or die "unable to get PCMCIA aliases"; + +print ' +struct pcmcia_alias { + const char *modalias; + const char *module; +}; + +'; + +my %t = ( + network => 'network/pcmcia', + medias => 'disk/pcmcia', +); + +foreach my $type (keys %t) { + my @modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "$t{$type}"`) + or die "unable to get PCMCIA modules"; + + print "#ifndef DISABLE_".uc($type)." +struct pcmcia_alias ${type}_pcmcia_ids[] = { +"; + print qq|\t{ "$_->[0]", "$_->[1]" },\n| foreach grep { member($_->[1], @modules) } @aliases; + print "}; +unsigned int ${type}_pcmcia_num_ids = sizeof(${type}_pcmcia_ids) / sizeof(struct pcmcia_alias); + +#endif + +"; + +} diff --git a/mdk-stage1/update-usb-ids.pl b/mdk-stage1/update-usb-ids.pl new file mode 100755 index 000000000..1ea45f9df --- /dev/null +++ b/mdk-stage1/update-usb-ids.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use lib '../kernel'; +use strict; +use MDK::Common; + +my @modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "bus/usb"`) + or die "unable to get USB controller modules"; +print "char *usb_controller_modules[] = { +"; +printf qq|\t"%s",\n|, $_ foreach @modules; +print "}; +unsigned int usb_controller_modules_len = sizeof(usb_controller_modules) / sizeof(char *); +"; + +@modules = chomp_(`perl ../kernel/modules.pl pci_modules4stage1 "network/usb disk/usb"`) + or die "unable to get USB modules"; + +print "char *usb_modules[] = { +"; +printf qq|\t"%s",\n|, $_ foreach @modules; +print "}; +unsigned int usb_modules_len = sizeof(usb_modules) / sizeof(char *); +"; diff --git a/mdk-stage1/usb-resource/Makefile b/mdk-stage1/usb-resource/Makefile deleted file mode 100644 index e21832a3f..000000000 --- a/mdk-stage1/usb-resource/Makefile +++ /dev/null @@ -1,25 +0,0 @@ - #****************************************************************************** - # - # $Id: Makefile 253685 2009-03-06 14:27:29Z tv $ - # - # Guillaume Cottenceau (gc) - # - # Copyright 2000 Mandriva - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # 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., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - - -all: usb-ids.h - -usb-ids.h: /usr/share/ldetect-lst/usbtable.gz update-usb-ids.pl - perl update-usb-ids.pl > $@ || rm -f $@ - -clean: - rm -f usb-ids.h diff --git a/mdk-stage1/usb-resource/update-usb-ids.pl b/mdk-stage1/usb-resource/update-usb-ids.pl deleted file mode 100755 index 9d6ca1cfc..000000000 --- a/mdk-stage1/usb-resource/update-usb-ids.pl +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl - -use lib '../kernel'; -use strict; -use MDK::Common; - -my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "bus/usb"`) - or die "unable to get USB controller modules"; -print "char *usb_controller_modules[] = { -"; -printf qq|\t"%s",\n|, $_ foreach @modules; -print "}; -unsigned int usb_controller_modules_len = sizeof(usb_controller_modules) / sizeof(char *); -"; - -@modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1 "network/usb disk/usb"`) - or die "unable to get USB modules"; - -print "char *usb_modules[] = { -"; -printf qq|\t"%s",\n|, $_ foreach @modules; -print "}; -unsigned int usb_modules_len = sizeof(usb_modules) / sizeof(char *); -"; -- cgit v1.2.1