diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-04 14:50:51 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-04 14:50:51 -0800 |
| commit | 467d6457f343143afe798c70d5c6f875c46794c2 (patch) | |
| tree | bccf1556036c77b8711146bf5f55cacd31b80592 | |
| parent | 0507d8de8c56a6ac854aa7bdcc9f64da2d270c15 (diff) | |
Made wildcards recursive and fixed default PREFIX
| -rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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"; \ |
