
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl Commits: 8fe55d42 by Raymond Toy at 2025-02-10T07:57:03-08:00 create-errno.sh figures out where the C header files are Instead of having build.sh and cross-build.sh have duplicated code to figure out where the C header files are, put that bit of code into create-errno.sh. Update build.sh and cross-build.sh appropriately. - - - - - 3 changed files: - bin/build.sh - bin/create-errno.sh - bin/cross-build-world.sh Changes: ===================================== bin/build.sh ===================================== @@ -154,13 +154,7 @@ buildit () } # Create unix-errno.lisp -case `uname -s` in - Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h - ;; -esac - -#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp -bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp +bin/create-errno.sh > src/code/unix-errno.lisp BUILDWORLD="$TOOLDIR/build-world.sh" BUILD_POT="yes" ===================================== bin/create-errno.sh ===================================== @@ -1,9 +1,14 @@ #! /bin/sh -# Generates the contents of the file code/unix-errno.lisp. The args -# to this script, if supplied, must be a list of files containing the -# definitions of all the Unix errno values. -# +# Generates the contents of the file code/unix-errno.lisp. + +# For each supported OS, ERRNO_FILES should be set to a list of all +# the files that contain the definitions of the errno values. +case `uname -s` in + Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h + ;; +esac + # The header was copied from code/unix.lisp. This includes all the # support code for DEF-UNIX-ERROR and for all OSes that don't use the @@ -251,7 +256,7 @@ EOF # containing the C definitions. awk '/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ { printf "(def-unix-error %s %s)\n", $2, $3; -}' "$@" +}' ${ERRNO_FILES} # The tail was also copied from code/unix.lisp. It's needed to tell # Lisp about the errno values. ===================================== bin/cross-build-world.sh ===================================== @@ -85,13 +85,7 @@ then fi # Create unix-errno.lisp -case `uname -s` in - Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h - ;; -esac - -#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp -bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp +bin/create-errno.sh > src/code/unix-errno.lisp echo cross boot = $CROSSBOOT $LISP "$@" -noinit -nositeinit <<EOF View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8fe55d42337b1c18325bd6c7... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8fe55d42337b1c18325bd6c7... You're receiving this email because of your account on gitlab.common-lisp.net.