sasagawa888 / eisl

ISLisp interpreter/compiler
Other
267 stars 22 forks source link

Removed unnecessary sudo when building #280

Closed gtnoble closed 1 year ago

gtnoble commented 1 year ago

Passing 't' as the last argument of compile-file results in the generated C code files being deleted with superuser privileges. These privileges are not necessary for building eisl, so I modified the makefile to delete the files with ordinary user privileges.

sasagawa888 commented 1 year ago

The source files *.c will remain, but is there any problem?

gtnoble commented 1 year ago

From what I can tell, the C files are still deleted. https://github.com/sasagawa888/eisl/blob/45ce57cb6d01b60d10078ffa26c35d1a9990b77e/makefile#L148-L149 rm-opt is optional https://github.com/sasagawa888/eisl/blob/45ce57cb6d01b60d10078ffa26c35d1a9990b77e/library/compiler.lsp#L233 When compile-file rm-opt is not passed, compile-file1 rm-opt is NIL https://github.com/sasagawa888/eisl/blob/45ce57cb6d01b60d10078ffa26c35d1a9990b77e/library/compiler.lsp#L238 If rm-opt is NIL, C files are deleted without sudo https://github.com/sasagawa888/eisl/blob/45ce57cb6d01b60d10078ffa26c35d1a9990b77e/library/compiler.lsp#L305-L307 Removing t from the Makefile rule still deletes the files, because this makes rm-opt NIL

sasagawa888 commented 1 year ago

I understand. Thank you.