Skip to content
Snippets Groups Projects
Commit 0948a091 authored by Daniel's avatar Daniel
Browse files

WIP: Fixing Makefile

parent a6921cb4
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ endif ...@@ -34,7 +34,7 @@ endif
.PHONY: test-connection .PHONY: test-connection
test-connection: test-connection:
make_db test-connection ./make_db test-connection
.PHONY: upgrade .PHONY: upgrade
upgrade: upgrade:
...@@ -45,17 +45,13 @@ install: _install _grant upgrade ...@@ -45,17 +45,13 @@ install: _install _grant upgrade
.PHONY: _install .PHONY: _install
_install: _install:
make_db install_db ./make_db install_db
@if $(MAKE) _exists > /dev/null 2>&1; then \
printf "\n\nA database with with the name \"$(DATABASE_NAME)\" does already exist.\nCall 'make drop-$(DATABASE_NAME)' to delete that database or reconfigure with './configure'.\n"; \
exit 1; \
else sed 's/db_2_0/$(DATABASE_NAME)/g' $(INSTALL_SQL_FILE) | $(MYSQL_CMD) $(MYSQL_CONNECTION); fi
.PHONY: _grant .PHONY: _grant
_grant: _grant:
make_db grant ./make_db grant
# Drop the user and a given database # Drop the user and a given database
.PHONY: drop-% .PHONY: drop-%
drop-%: drop-%:
@make_db drop $(patsubst drop-%,%,$@) ./make_db drop $(patsubst drop-%,%,$@)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment