Various Linux systems using recent versions of the GNU
coreutils package now require strict POSIX syntax for the
head and tail commands.  They let you use 'head -n 1' but
not the more traditional 'head -1'.  Attached is a patch to
address this issue for lilypond-2.0 (tested with both 2.0.0
and 2.0.1).  After patching, run:

NOCONFIGURE=1 ./autogen.sh 

Thanks,

mossmann
diff -uNr lilypond-2.0.0/aclocal.m4 lilypond-2.0.0-coreutils-compat/aclocal.m4
--- lilypond-2.0.0/aclocal.m4   2003-09-23 14:37:06.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/aclocal.m4  2003-09-25 12:11:13.000000000 -0600
@@ -11,13 +11,13 @@
     ## command -v doesn't work in zsh
     ## command -v "$1" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}'
+    type -p "$1" 2>/dev/null | tail -n 1 | awk '{print $NF}'
 ])
 
 
 # Get version string from executable ($1)
 AC_DEFUN(STEPMAKE_GET_VERSION, [
-    ## "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+    ## "$1" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
     ##
     ## ARG.
     ## Workaround for broken Debian gcc version string:
@@ -28,7 +28,7 @@
     ## Assume, and hunt for, dotted version multiplet.
 
     changequote(<<, >>)dnl
-    ("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' | head -1 | \
+    ("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' | head -n 1 | \
        sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/'
     changequote([, ])dnl
 ])
diff -uNr lilypond-2.0.0/autogen.sh lilypond-2.0.0-coreutils-compat/autogen.sh
--- lilypond-2.0.0/autogen.sh   2003-09-21 17:10:12.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/autogen.sh  2003-09-25 12:11:23.000000000 -0600
@@ -23,7 +23,7 @@
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf2.50 ./autogen.sh
 for i in autoconf2.50 autoconf-2.50 autoconf  false; do
-  version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print 
$1 * 100 + $2}'`
+  version=`$i --version 2>/dev/null | head -n 1 | awk '{print $NF}' | awk -F. '{print 
$1 * 100 + $2}'`
   if test "0$version" -ge 250; then
     autoconf=$i
     break
diff -uNr lilypond-2.0.0/buildscripts/mf-to-xpms.sh 
lilypond-2.0.0-coreutils-compat/buildscripts/mf-to-xpms.sh
--- lilypond-2.0.0/buildscripts/mf-to-xpms.sh   1999-10-04 03:11:14.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/buildscripts/mf-to-xpms.sh  2003-09-25 
12:09:22.000000000 -0600
@@ -21,7 +21,7 @@
        gftopk out/$font.${RESOLUTION}gf out/$font.${RESOLUTION}pk
 fi
 
-# num=`grep "^C *[0-9]*;" $afm | tail -1 | sed "s!^C *\([^;]*\).*!\\1!"`
+# num=`grep "^C *[0-9]*;" $afm | tail -n 1 | sed "s!^C *\([^;]*\).*!\\1!"`
 # num=66
 # tex=out/$font.tex
 # cat > $tex <<EOF
diff -uNr lilypond-2.0.0/stepmake/aclocal.m4 
lilypond-2.0.0-coreutils-compat/stepmake/aclocal.m4
--- lilypond-2.0.0/stepmake/aclocal.m4  2003-09-23 14:35:16.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/stepmake/aclocal.m4 2003-09-25 12:13:42.000000000 
-0600
@@ -11,13 +11,13 @@
     ## command -v doesn't work in zsh
     ## command -v "$1" 2>&1
     ## this test should work in ash, bash, pdksh (ksh), zsh
-    type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}'
+    type -p "$1" 2>/dev/null | tail -n 1 | awk '{print $NF}'
 ])
 
 
 # Get version string from executable ($1)
 AC_DEFUN(STEPMAKE_GET_VERSION, [
-    ## "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}'
+    ## "$1" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
     ##
     ## ARG.
     ## Workaround for broken Debian gcc version string:
@@ -28,7 +28,7 @@
     ## Assume, and hunt for, dotted version multiplet.
 
     changequote(<<, >>)dnl
-    ("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' | head -1 | \
+    ("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' | head -n 1 | \
        sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/'
     changequote([, ])dnl
 ])
diff -uNr lilypond-2.0.0/stepmake/autogen.sh 
lilypond-2.0.0-coreutils-compat/stepmake/autogen.sh
--- lilypond-2.0.0/stepmake/autogen.sh  2003-09-21 17:09:56.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/stepmake/autogen.sh 2003-09-25 12:13:56.000000000 
-0600
@@ -23,7 +23,7 @@
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf2.50 ./autogen.sh
 for i in autoconf2.50 autoconf-2.50 autoconf  false; do
-  version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print 
$1 * 100 + $2}'`
+  version=`$i --version 2>/dev/null | head -n 1 | awk '{print $NF}' | awk -F. '{print 
$1 * 100 + $2}'`
   if test "0$version" -ge 250; then
     autoconf=$i
     break
diff -uNr lilypond-2.0.0/stepmake/bin/stepmakeise.sh 
lilypond-2.0.0-coreutils-compat/stepmake/bin/stepmakeise.sh
--- lilypond-2.0.0/stepmake/bin/stepmakeise.sh  1998-07-08 02:04:40.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/stepmake/bin/stepmakeise.sh 2003-09-25 
12:15:07.000000000 -0600
@@ -54,7 +54,7 @@
                echo "$name: huh 2?"
                exit 1
        fi
-       LATEST=`cd $reldir; ls -t1 stepmake-*.tar.gz | head -1 | sed 's!stepmake-!!' | 
sed 's!.tar.gz!!'`
+       LATEST=`cd $reldir; ls -t1 stepmake-*.tar.gz | head -n 1 | sed 's!stepmake-!!' 
| sed 's!.tar.gz!!'`
        # urg
        latest=`echo $LATEST | sed 's/\.[a-zA-Z][a-zA-Z]*[0-9]*$//'`
        latest_val=`value $latest`
diff -uNr lilypond-2.0.0/stepmake/stepmake/automatically-generated.sub.make 
lilypond-2.0.0-coreutils-compat/stepmake/stepmake/automatically-generated.sub.make
--- lilypond-2.0.0/stepmake/stepmake/automatically-generated.sub.make   2002-05-17 
06:09:10.000000000 -0600
+++ lilypond-2.0.0-coreutils-compat/stepmake/stepmake/automatically-generated.sub.make 
 2003-09-25 12:15:18.000000000 -0600
@@ -3,7 +3,7 @@
 
 default:
        -chmod +w $(OUTFILE)
-       head -1 $(INFILE) > $(OUTFILE)
+       head -n 1 $(INFILE) > $(OUTFILE)
        echo "$(LINECOMMENT) WARNING WARNING WARNING" >> $(OUTFILE)
        echo "$(LINECOMMENT) do not edit! this is $(OUTFILE), generated from 
$(INFILE)" >> $(OUTFILE)
        cat $(INFILE) >> $(OUTFILE)

Attachment: pgp00000.pgp
Description: PGP signature

_______________________________________________
Bug-lilypond mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to