diff --git a/src/c/main.d b/src/c/main.d index ad0ea439e..d01fa9bb3 100644 --- a/src/c/main.d +++ b/src/c/main.d @@ -129,9 +129,9 @@ cl_boot(int argc, char **argv) ecl_booted = 1; lex_env = Cnil; - init_LSP(); + read_VV(OBJNULL,init_LSP); #ifdef CLOS - init_CLOS(); + read_VV(OBJNULL,init_CLOS); #endif /* Jump to top level */ diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index c235cf870..2c526c742 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -137,6 +137,12 @@ extern \"C\" int init_~A(cl_object cblock) { cl_object next; + if (FIXNUMP(cblock)) + return; + cblock->cblock.data = NULL; + cblock->cblock.data_size = 0; + cblock->cblock.data_text = \"\"; + cblock->cblock.data_text_size = 0; ~A ~{ next = read_VV(OBJNULL,init_~A); next->cblock.next = cblock; cblock = next; ~%~} ~A @@ -211,7 +217,7 @@ int init_~A(cl_object cblock) init-name "CODE" prologue-code init-name epilogue-code)) (compiler-cc c-name o-name) (apply #'shared-cc output-name o-name ld-flags))) - (delete-file c-name) + ;(delete-file c-name) (delete-file o-name) output-name)) @@ -252,7 +258,15 @@ int init_~A(cl_object cblock) ~%;;; Therefore, COMPILE-FILE without :SYSTEM-P T is unsupported.~ ~%;;;")) - (setq input-pathname (merge-pathnames input-pathname #".lsp")) + (let ((lisp-pathname (merge-pathnames input-pathname #".lsp"))) + (unless (probe-file lisp-pathname) + (setq lisp-pathname (merge-pathnames input-pathname #".lisp")) + (unless (probe-file lisp-pathname) + (format t "~&;;; The source file ~a is not found.~%" + (namestring input-pathname)) + (setq *error-p* t) + (return-from compile-file (values nil t t)))) + (setq input-pathname lisp-pathname)) #+PDE (setq sys:*source-pathname* (truename input-pathname)) @@ -269,12 +283,6 @@ Cannot compile ~a." (setq *error-p* nil *compiler-in-use* t) - (unless (probe-file input-pathname) - (format t "~&;;; The source file ~a is not found.~%" - (namestring input-pathname)) - (setq *error-p* t) - (return-from compile-file (values nil t t))) - (when *compile-verbose* (format t "~&;;; Compiling ~a." (namestring input-pathname)))