diff --git a/Makefile b/Makefile index af8f8ef..2a0464f 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,9 @@ MOON_FILES= code_obj.moon error_handling.moon files.moon nomsu.moon nomsu_compil LUA_FILES= code_obj.lua consolecolors.lua error_handling.lua files.lua nomsu.lua nomsu_compiler.lua \ syntax_tree.lua containers.lua bitops.lua parser.lua pretty_errors.lua \ string2.lua nomsu_decompiler.lua nomsu_environment.lua importer.lua -CORE_NOM_FILES= $(wildcard core/*.nom) +CORE_NOM_FILES= $(wildcard core/**.nom) CORE_LUA_FILES= $(patsubst %.nom,%.lua,$(CORE_NOM_FILES)) -LIB_NOM_FILES= $(wildcard lib/*.nom) +LIB_NOM_FILES= $(wildcard lib/**.nom) LIB_LUA_FILES= $(patsubst %.nom,%.lua,$(LIB_NOM_FILES)) PEG_FILES= $(wildcard nomsu.*.peg) GET_VERSION= $(LUA_BIN) nomsu.lua --version @@ -50,7 +50,7 @@ optimize: lua $(CORE_LUA_FILES) $(LIB_LUA_FILES) .PHONY: clean clean: @echo "\033[1mDeleting...\033[0m" - @rm -rvf version core/*.lua lib/*.lua tools/*.lua compatibility/*.lua + @rm -rvf version core/**.lua lib/**.lua tools/**.lua compatibility/**.lua .PHONY: install install: lua version optimize @@ -58,6 +58,9 @@ install: lua version optimize if [[ ! $$prefix ]]; then \ read -p $$'\033[1mWhere do you want to install Nomsu? (default: /usr/local) \033[0m' prefix; \ fi; \ + if [[ ! $$prefix ]]; then \ + prefix="/usr/local"; \ + fi; \ if [[ $$prefix != "`realpath $$prefix`" ]]; then \ echo $$'\033[1;31mWarning: '$$prefix$$' is not an absolute path. This may cause problems.\033[0m'; \ read -p $$'\033[1mWould you rather use '`realpath $$prefix`$$' instead? (recommended)[Y/n]\033[0m ' use_real; \ @@ -79,6 +82,9 @@ uninstall: version if [[ ! $$prefix ]]; then \ read -p $$'\033[1mWhere do you want to uninstall Nomsu from? (default: /usr/local) \033[0m' prefix; \ fi; \ + if [[ ! $$prefix ]]; then \ + prefix="/usr/local"; \ + fi; \ echo "\033[1mNomsu will be uninstalled from:\033[0m"; \ echo " $$prefix/bin"; \ echo " $$prefix/lib"; \