From: Takashi Iwai <tiwai@suse.de>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: Matthew Clarke <Matthew_Clarke@mindlink.bc.ca>,
alsa-devel@lists.sourceforge.net
Subject: Re: problems compiling current CVS
Date: Tue, 03 Jun 2003 11:54:01 +0200 [thread overview]
Message-ID: <s5hr86bo5ae.wl@alsa2.suse.de> (raw)
In-Reply-To: <E19N2mi-0001iY-00@sc8-sf-list1.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
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
[-- Attachment #2: old-bash-fix.dif --]
[-- Type: application/octet-stream, Size: 2727 bytes --]
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
next prev parent reply other threads:[~2003-06-03 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-02 23:08 problems compiling current CVS Paul Davis
[not found] ` <20030603031534.GA27280@ds0.van.maves.ca>
2003-06-03 3:54 ` Paul Davis
2003-06-03 9:54 ` Takashi Iwai [this message]
2003-06-03 12:43 ` Takashi Iwai
[not found] ` <20030603034728.GA29666@ds0.van.maves.ca>
2003-06-03 4:20 ` Matthew Clarke
[not found] ` <E19N2mg-0008HZ-00@dewey.paralynx.net>
2003-06-03 4:38 ` Matthew Clarke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hr86bo5ae.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=Matthew_Clarke@mindlink.bc.ca \
--cc=alsa-devel@lists.sourceforge.net \
--cc=paul@linuxaudiosystems.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.