From ce4f0ab23315d6dde567659974ae16ab22e48528 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 7 Dec 2001 01:57:55 +0000 Subject: [PATCH] Fixes to the new build system --- comedi/Makefile.in | 5 +++-- comedi/drivers/Makefile.in | 4 ++-- configure | 26 +++++++++++++++++++++----- scripts/dep.linux | 7 ++++++- scripts/generate_makefile | 22 ++++++++++++++++++---- 5 files changed, 50 insertions(+), 14 deletions(-) diff --git a/comedi/Makefile.in b/comedi/Makefile.in index 0f6402ab..80e172c3 100644 --- a/comedi/Makefile.in +++ b/comedi/Makefile.in @@ -3,8 +3,9 @@ expsyms(comedi_ksyms.o) objlink(comedi.o comedi_fops.o proc.o range.o drivers.o kvmem.o comedi_ksyms.o) -#if CONFIG_COMEDI_RT += rt_pend_tq/rt_pend_tq.o -#if CONFIG_COMEDI_RT += rt.o +ifsel(CONFIG_COMEDI_RT) + objlink(comedi.o rt_pend_tq.o rt.o) +endif select(CONFIG_COMEDI comedi.o) diff --git a/comedi/drivers/Makefile.in b/comedi/drivers/Makefile.in index 7935d187..e48f948e 100644 --- a/comedi/drivers/Makefile.in +++ b/comedi/drivers/Makefile.in @@ -2,8 +2,8 @@ expsyms(mite.o 8255.o) select(CONFIG_COMEDI_8255 8255.o) -select(CONFIG_COMEDI_ADL_PCI9118 adl_pci9118.o) -select(CONFIG_COMEDI_ADV_PCI1710 adv_pci1710.o) +select(CONFIG_COMEDI_ADL_PCI9118 adl_pci9118.o amcc_s5933.o) +select(CONFIG_COMEDI_ADV_PCI1710 adv_pci1710.o amcc_s5933.o) select(CONFIG_COMEDI_AMPLC_PCI230 amplc_pci230.o) select(CONFIG_COMEDI_CB_PCIDAS cb_pcidas.o) select(CONFIG_COMEDI_CB_PCIDAS64 cb_pcidas64.o) diff --git a/configure b/configure index 3f996b4a..d22b81f2 100755 --- a/configure +++ b/configure @@ -4,6 +4,7 @@ topdir=${PWD} interactive=y +menu=n while [ "$1" != "" ];do case $1 in @@ -26,6 +27,9 @@ while [ "$1" != "" ];do --non-interactive) interactive=n ;; + --menu) + menu=y + ;; esac shift done @@ -35,17 +39,29 @@ done . scripts/dep.rtlinux -scripts/Configure ${old} +if [ "$menu" = "y" ];then + make -C scripts/lxdialog all + if [ ! -f .config ];then + cp scripts/config.dist .config + fi + scripts/Menuconfig scripts/config.in +else + scripts/Configure ${old} +fi -scripts/generate_makefile comedi/Makefile.in >comedi/Makefile -scripts/generate_makefile comedi/drivers/Makefile.in >comedi/drivers/Makefile -scripts/generate_makefile comedi/kcomedilib/Makefile.in >comedi/kcomedilib/Makefile +for each in $(find . -name Makefile.in) +do + scripts/generate_makefile ${each} >$(dirname $each)/$(basename $each .in) +done +#scripts/generate_makefile comedi/Makefile.in >comedi/Makefile +#scripts/generate_makefile comedi/drivers/Makefile.in >comedi/drivers/Makefile +#scripts/generate_makefile comedi/kcomedilib/Makefile.in >comedi/kcomedilib/Makefile cat <){ - if(m/select\(([\w_]+) ([\w_.]+)\)/){ + if(m/select\(([\w_]+) ([\w_. ]+)\)/){ print "obj-\$($1) += $2\n"; }elsif(m/expsyms\(([\w_. ]+)\)/){ print "export-objs += $1\n"; }elsif(m/objlink\(([\w_.]+) ([\w_. ]+)\)/){ - push @later,"$1: $2\n"; - push @later,"\t\$(LD) -r -o \$@ $2\n"; + print "$1-objs += $2\n"; + push @later,"$1"; }elsif(m/link_subdirs\(([\w_.]+)\)/){ print "subdir-m += $1\n"; + }elsif(m/ifsel\(([\w_]+)\)/){ + print "ifneq (\$($1),)\n"; + }elsif(m/endif/){ + print "endif\n"; }elsif(m/^$/){ }elsif(m/^#/){ }else{ @@ -30,5 +34,15 @@ while($_=){ print "\n"; print "include \$(TOPDIR)/Rules.make\n"; print "\n"; -print @later; + +@later = sort @later; + +$last=""; +foreach $s (@later){ + if($s ne $last){ + print "$s: \$($s-objs)\n"; + print "\t\$(LD) -r -o \$@ \$($s-objs)\n"; + } + $last=$s; +} -- 2.26.2