Raymond Toy pushed to branch issue-386-generate-def-unix-error at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • bin/create-errno.sh
    ... ... @@ -40,7 +40,7 @@ TEMPLATE="bin/errno-template.lisp"
    40 40
     
    
    41 41
     # Set ERRNO_FILES to the files where we can find errno definitions.
    
    42 42
     if [ -z "$DEFAULT" ]; then
    
    43
    -    case `uname -s` in
    
    43
    +    case $(uname -s) in
    
    44 44
     	Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
    
    45 45
     	       ;;
    
    46 46
     	Darwin) ERRNO_FILES=/usr/include/sys/errno.h
    
    ... ... @@ -58,20 +58,22 @@ else
    58 58
         # We can autogenerate the def-unix-error forms.  Copy just the
    
    59 59
         # initial part of the template, up to the first def-unix-error
    
    60 60
         # form.
    
    61
    -    sed '/^(def-unix-error ESUCCESS/q' "$TEMPLATE" > $OUTPUT
    
    62
    -    cat >> $OUTPUT <<EOF
    
    61
    +    {
    
    62
    +	sed '/^(def-unix-error ESUCCESS/q' "$TEMPLATE"
    
    63
    +	cat <<EOF
    
    63 64
     
    
    64 65
     ;; Autogenerated def-unix-error forms
    
    65 66
     EOF
    
    66
    -    
    
    67
    -    # Create appropriate DEF-UNIX-ERROR forms by reading header files
    
    68
    -    # containing the C definitions.
    
    67
    +	
    
    68
    +	# Create appropriate DEF-UNIX-ERROR forms by reading header files
    
    69
    +	# containing the C definitions.
    
    69 70
     
    
    70
    -    awk -f bin/create-def-unix-error.awk ${ERRNO_FILES} >> $OUTPUT
    
    71
    +	awk -f bin/create-def-unix-error.awk ${ERRNO_FILES}
    
    71 72
     
    
    72
    -    # The tail was also copied from code/unix.lisp.  It's needed to tell
    
    73
    -    # Lisp about the errno values.
    
    74
    -    sed '1,/^;;; End of default/d' "$TEMPLATE" >> $OUTPUT
    
    73
    +	# The tail was also copied from code/unix.lisp.  It's needed to tell
    
    74
    +	# Lisp about the errno values.
    
    75
    +	sed '1,/^;;; End of default/d' "$TEMPLATE"
    
    76
    +    } > $OUTPUT
    
    75 77
     fi
    
    76 78
     
    
    77 79
     # If -S option given, cat the output file to stdout