From bd6c4876fd8ed49daa58f31b891d10aedd50b4f7 Mon Sep 17 00:00:00 2001
From: Marko Mecina <marko.mecina@univie.ac.at>
Date: Thu, 27 May 2021 11:07:29 +0200
Subject: [PATCH] extend central Makefile for database schema creation

---
 Ccs/database/Makefile              |  2 +-
 Makefile                           | 22 +++++++++++++++++++++-
 Tst/codeblockreusefeature/Makefile |  4 ++++
 3 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 Tst/codeblockreusefeature/Makefile

diff --git a/Ccs/database/Makefile b/Ccs/database/Makefile
index 693c179..cc7ae5c 100644
--- a/Ccs/database/Makefile
+++ b/Ccs/database/Makefile
@@ -6,7 +6,7 @@ check:
 	cd .. ; pylint -E database/test_db.py
 #	cd .. ; MYPYPATH=~/.local/lib/python3.7/site-packages/ mypy -s database/tm_db.py database/test_db.py
 
-run:
+storage:
 	cd .. ; python3 -m database.tm_db
 
 verbose:
diff --git a/Makefile b/Makefile
index f151a75..b852d36 100644
--- a/Makefile
+++ b/Makefile
@@ -30,12 +30,32 @@ install-database-dev-env:
 	@echo "+-----------------------------------------------+"
 	@echo "| installing Python packages for the database   |"
 	@echo "+-----------------------------------------------+"
-	    $(MAKE) install-devenv -C $(CURDIR)/Ccs/devel/database
+	    $(MAKE) install-devenv -C $(CURDIR)/Ccs/database
 	@echo "+-----------------------------------------------+"
 	@echo "| installed Python packages for the database    |"
 	@echo "+-----------------------------------------------+"
 	@echo
 
+install-database:
+	@echo "+----------------------------------------+"
+	@echo "| setting up the storage database schema |"
+	@echo "+----------------------------------------+"
+	    $(MAKE) storage -C $(CURDIR)/Ccs/database
+	@echo "+--------------------------------------------+"
+	@echo "| set up of the storage database schemas done|"
+	@echo "+--------------------------------------------+"
+	@echo
+
+install-codeblockreusefeature:
+	@echo "+-----------------------------------------------+"
+	@echo "| setting up the codeblockreuse database schema |"
+	@echo "+-----------------------------------------------+"
+	    $(MAKE) schema -C $(CURDIR)/Tst/codeblockreusefeature
+	@echo "+---------------------------------------------------+"
+	@echo "| set up of the codeblockreuse database schemas done|"
+	@echo "+---------------------------------------------------+"
+	@echo
+
 set-start-scripts-permissions:
 	@echo "+-----------------------------------------------------+"
 	@echo "| setting permissions for the start scripts (execute) |"
diff --git a/Tst/codeblockreusefeature/Makefile b/Tst/codeblockreusefeature/Makefile
new file mode 100644
index 0000000..9d91cd5
--- /dev/null
+++ b/Tst/codeblockreusefeature/Makefile
@@ -0,0 +1,4 @@
+schema:
+	python3 -m db_schema
+
+.PHONY:	schema
-- 
GitLab