From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: problems compiling current CVS Date: Tue, 03 Jun 2003 11:54:01 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20030603031534.GA27280@ds0.van.maves.ca> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Tue_Jun__3_11:54:01_2003-1" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Paul Davis Cc: Matthew Clarke , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Tue_Jun__3_11:54:01_2003-1 Content-Type: text/plain; charset=US-ASCII At Mon, 02 Jun 2003 23:54:09 -0400, Paul Davis wrote: > > >This bit: > > > > ${xtmp:0:5} > > > >is a Bash-ism. Normal Bourne shells don't understand this. I'm guessing > >that your system's /bin/sh isn't Bash. You might be able to put a > > > > SHELL=/bin/bash > > paul[2846]>which sh > /bin/sh > paul[2847]>ls -l /bin/sh > lrwxrwxrwx 1 root root 4 Aug 16 2000 /bin/sh -> bash > paul[2852]>bash -version > GNU bash, version 1.14.7(1) i'm not sure, too, whether bash1 doesn't support the format above. anyway, please try the patch attached below. it replaces the function with sed & co. (unfortunately, we cannot use $(subst acore,core,$(MODCURDIR)) because the word "acore" might match inside the pathname.) Takashi --Multipart_Tue_Jun__3_11:54:01_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="old-bash-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-driver/Rules.make =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-driver/Rules.make,v retrieving revision 1.26 diff -u -r1.26 Rules.make --- alsa-driver/Rules.make 2 Jun 2003 10:07:19 -0000 1.26 +++ alsa-driver/Rules.make 3 Jun 2003 09:49:55 -0000 @@ -92,17 +92,10 @@ endif %.c: %.patch - @xtmp="$(MODCURDIR)"; \ - if [ "$${xtmp:0:5}" = "acore" ]; then \ - xtmp1=$${xtmp:6} ; \ - if [ ! -z "$${xtmp1}" ]; then xtmp1="$${xtmp1}/" ; fi ; \ - echo "coping file alsa-kernel/core/$${xtmp1}$@"; \ - cp $(TOPDIR)/alsa-kernel/core/$${xtmp1}$@ $@; \ - else \ - echo "Coping file alsa-kernel/core/$${xtmp}/$@"; \ - cp $(TOPDIR)/alsa-kernel/$${xtmp}/$@ $@; \ - fi - @patch -p0 -i $< + @xtmp=`echo $(MODCURDIR) | sed -e 's/^acore/core/'`/$@;\ + echo "copying file alsa-kernel/$$xtmp";\ + cp "$(TOPDIR)/alsa-kernel/$$xtmp" $@;\ + patch -p0 -i $< %.isapnp: %.c $(CPP) -C -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D__isapnp_now__ -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) $(CFLAGS_$@) $< | $(TOPDIR)/utils/convert_isapnp_ids > $@ Index: alsa-driver/configure.in =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-driver/configure.in,v retrieving revision 1.124 diff -u -r1.124 configure.in --- alsa-driver/configure.in 2 Jun 2003 10:07:19 -0000 1.124 +++ alsa-driver/configure.in 3 Jun 2003 09:29:43 -0000 @@ -210,22 +210,29 @@ dnl kernel_compiler_type=`echo $kernel_compiler | cut -d ' ' -f 1` kernel_compiler_version=`echo $kernel_compiler | cut -d ' ' -f 2` -if test "${kernel_compiler_version:0:5}" = "egcs-"; then +case "$kernel_compiler_version" in +egcs-*) kernel_compiler_type="egcs" - kernel_compiler_version=`echo ${kernel_compiler_version:5} | cut -d ' ' -f 1` -fi -if test "${my_compiler:0:4}" = "gcc-"; then + kernel_compiler_version=`echo "$kernel_compiler_version" | cut -b 6-` + ;; +esac +case "$my_compiler" in +gcc-*) my_compiler_type="gcc" - my_compiler_version=`echo ${my_compiler:4} | cut -d ' ' -f 1` -else - if test "${my_compiler:0:5}" = "egcs-"; then + my_compiler_version=`echo "$my_compiler" | cut -b 5-` + ;; +*) + case "$my_compiler" in + egcs-*) my_compiler_type="egcs" - my_compiler_version=`echo ${my_compiler:5} | cut -d ' ' -f 1` - else + my_compiler_version=`echo "$my_compiler" | cut -b 6-` + ;; + *) my_compiler_type=`echo $my_compiler | cut -d ' ' -f 1` - my_compiler_version=`echo $my_compiler | cut -d ' ' -f 3` - fi -fi + my_compiler_version=`echo "$my_compiler" | cut -d ' ' -f 3` + ;; + esac +esac if test "$my_compiler_type" = "$my_compiler_version"; then my_compiler_type="gcc" fi --Multipart_Tue_Jun__3_11:54:01_2003-1-- ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5