Raymond Toy pushed to branch issue-390-autogen-errno-package at cmucl / cmucl

Commits:

5 changed files:

Changes:

  • bin/build-world.sh
    ... ... @@ -53,6 +53,7 @@ $LISP "$@" -noinit -nositeinit <<EOF
    53 53
     (pushnew :no-clm *features*)
    
    54 54
     (pushnew :no-hemlock *features*)
    
    55 55
     
    
    56
    +(load "target:code/exports-errno")
    
    56 57
     (load "target:code/exports")
    
    57 58
     (load "target:tools/setup" :if-source-newer :load-source)
    
    58 59
     (comf "target:tools/setup" :load t)
    

  • bin/create-errno.sh
    ... ... @@ -82,7 +82,8 @@ if [ -n "$SHOW" ]; then
    82 82
     fi
    
    83 83
     
    
    84 84
     # Now generate the defpackage form for the ERRNO package.
    
    85
    -cat > src/code/exports-errno.lisp <<EOF
    
    85
    +{
    
    86
    +    cat  <<EOF
    
    86 87
     ;;; -*- Log: C.Log -*-
    
    87 88
     ;;;
    
    88 89
     ;;; **********************************************************************
    
    ... ... @@ -94,7 +95,11 @@ cat > src/code/exports-errno.lisp <<EOF
    94 95
     ;;;
    
    95 96
     ;;; **********************************************************************
    
    96 97
     ;;;
    
    97
    -;;; All the stuff necessary to export various symbols from various packages.
    
    98
    +;;; Defines the ERRNO package and all the exported symbols.
    
    99
    +;;;
    
    100
    +;;; This file is auto-generated via bin/create-errno.sh.
    
    101
    +;;;
    
    102
    +;;; DO NOT EDIT!
    
    98 103
     ;;;
    
    99 104
     
    
    100 105
     (in-package "LISP")
    
    ... ... @@ -105,11 +110,20 @@ cat > src/code/exports-errno.lisp <<EOF
    105 110
         (rename-package "ERRNO" "ERRNO" 'nil)
    
    106 111
         (make-package "ERRNO" :nicknames 'nil :use nil))
    
    107 112
     
    
    113
    +(use-package '("LISP") "ERRNO")
    
    114
    +
    
    108 115
     (defpackage "ERRNO"
    
    109 116
       (:export
    
    110
    -$(grep '(def-unix-error ' $ERRNO_FILE |
    
    111
    -  cut -d ' ' -f2 |
    
    112
    -  sed 's/\(.*\)/   "\1"/' |
    
    113
    -  sort)
    
    117
    +EOF
    
    118
    +    # Get the def-unix-error forms from the ERRNO_FILE, extract out
    
    119
    +    # the name, put double-quotes around them and then sort the result
    
    120
    +    # to get all the exported symbols for the ERRNO package.
    
    121
    +    grep '(def-unix-error ' $ERRNO_FILE |
    
    122
    +	cut -d ' ' -f2 |
    
    123
    +	sed 's/\(.*\)/   "\1"/' |
    
    124
    +	sort
    
    125
    +    # Close the defpackage form
    
    126
    +    cat <<EOF
    
    114 127
        ))
    
    115 128
     EOF
    
    129
    +} > src/code/exports-errno.lisp

  • src/code/exports.lisp
    ... ... @@ -136,7 +136,6 @@
    136 136
     (use-package '("SYSTEM" "ALIEN-INTERNALS" "ALIEN" "LISP") "C-CALL")
    
    137 137
     (use-package '("KERNEL" "EXTENSIONS" "LISP") "INSPECT")
    
    138 138
     (use-package '("LISP" "KERNEL") "BIGNUM")
    
    139
    -(use-package '("LISP") "ERRNO")
    
    140 139
     (use-package '("LISP") "UNIX")
    
    141 140
     (use-package '("KERNEL" "LISP" "EXTENSIONS") "FORMAT")
    
    142 141
     (use-package '("EXTENSIONS" "SYSTEM" "DEBUG" "KERNEL" "BIGNUM") "LISP")
    

  • src/tools/worldcom.lisp
    ... ... @@ -315,6 +315,7 @@
    315 315
       (comf "target:code/multi-proc"))
    
    316 316
     
    
    317 317
     (comf "target:code/setf-funs")
    
    318
    +(comf "target:code/exports-errno" :proceed t)
    
    318 319
     (comf "target:code/exports" :proceed t)
    
    319 320
     
    
    320 321
     ;;; Compile basic macros that we assume are already in the compilation
    

  • src/tools/worldload.lisp
    ... ... @@ -78,6 +78,7 @@
    78 78
     
    
    79 79
     ;;; Make sure the package structure is correct.
    
    80 80
     ;;;
    
    81
    +(maybe-byte-load "code:exports-errno")
    
    81 82
     (maybe-byte-load "code:exports")
    
    82 83
     
    
    83 84
     ;;; Load random code sources.