From 71fa10818ba40d51ce3b65ac813ae17520789251 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Wed, 29 Jun 2022 17:17:55 +0200
Subject: [PATCH] chore: commit save point

---
 Makefile                                      | 47 ++++++++++++-------
 application/source/config_test.go             | 14 +++---
 development/{makefile => makefiles}/color.mk  |  0
 .../directories-default.mk                    |  0
 development/{makefile => makefiles}/go.mk     |  0
 .../{makefile => makefiles}/license-agpl3.mk  |  0
 development/{makefile => makefiles}/output.mk |  0
 .../{makefile => makefiles}/placeholder.mk    |  0
 .../target-build-go.mk                        |  0
 .../target-deploy-tool.mk                     |  0
 .../{makefile => makefiles}/target-git.mk     |  0
 .../{makefile => makefiles}/target-help.mk    |  0
 .../{makefile => makefiles}/target-init.mk    |  0
 .../makefiles/target-update-makefiles.mk      | 22 +++++++++
 .../{makefile => makefiles}/terminal-check.mk |  0
 .../{makefile => makefiles}/terminal.mk       |  0
 .../{makefile => makefiles}/version.mk        |  0
 project.mk                                    |  3 ++
 requirements-manager.iml                      |  2 +-
 19 files changed, 63 insertions(+), 25 deletions(-)
 rename development/{makefile => makefiles}/color.mk (100%)
 rename development/{makefile => makefiles}/directories-default.mk (100%)
 rename development/{makefile => makefiles}/go.mk (100%)
 rename development/{makefile => makefiles}/license-agpl3.mk (100%)
 rename development/{makefile => makefiles}/output.mk (100%)
 rename development/{makefile => makefiles}/placeholder.mk (100%)
 rename development/{makefile => makefiles}/target-build-go.mk (100%)
 rename development/{makefile => makefiles}/target-deploy-tool.mk (100%)
 rename development/{makefile => makefiles}/target-git.mk (100%)
 rename development/{makefile => makefiles}/target-help.mk (100%)
 rename development/{makefile => makefiles}/target-init.mk (100%)
 create mode 100644 development/makefiles/target-update-makefiles.mk
 rename development/{makefile => makefiles}/terminal-check.mk (100%)
 rename development/{makefile => makefiles}/terminal.mk (100%)
 rename development/{makefile => makefiles}/version.mk (100%)
 create mode 100644 project.mk

diff --git a/Makefile b/Makefile
index aa1cb75..6a17be9 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
 #############################################################################################
 #############################################################################################
 
-COMPONENTNAME        := ReqMan
+COMPONENT_NAME        := ReqMan
 
 #############################################################################################
 #############################################################################################
@@ -21,21 +21,36 @@ THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 PROJECT_ROOT:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)/
 THIS_MAKEFILE:=$(PROJECT_ROOT)$(THIS_MAKEFILE_PATH)
 
-include $(PROJECT_ROOT)development/makefile/license-agpl3.mk
-include $(PROJECT_ROOT)development/makefile/placeholder.mk
-include $(PROJECT_ROOT)development/makefile/directories-default.mk
-include $(PROJECT_ROOT)development/makefile/go.mk
-include $(PROJECT_ROOT)development/makefile/color.mk
-include $(PROJECT_ROOT)development/makefile/terminal.mk
-include $(PROJECT_ROOT)development/makefile/output.mk
-include $(PROJECT_ROOT)development/makefile/version.mk
-include $(PROJECT_ROOT)development/makefile/target-help.mk
-include $(PROJECT_ROOT)development/makefile/target-init.mk
-include $(PROJECT_ROOT)development/makefile/target-deploy-tool.mk
-include $(PROJECT_ROOT)development/makefile/target-build-go.mk
-include $(PROJECT_ROOT)development/makefile/target-git.mk
-include $(PROJECT_ROOT)development/makefile/terminal-check.mk	
-	
+
+-include $(PROJECT_ROOT)project.mk
+
+
+## Define the location of Makefiles
+MAKEFILE_IMPORT_PATH?=$(PROJECT_ROOT)makefiles/
+
+#############################################################################################
+#############################################################################################
+##
+## INCLUSION OF VARIOUS STANDARD RULES
+##
+#############################################################################################
+#############################################################################################
+
+include $(MAKEFILE_IMPORT_PATH)license-agpl3.mk
+include $(MAKEFILE_IMPORT_PATH)placeholder.mk
+include $(MAKEFILE_IMPORT_PATH)directories-standard.mk
+include $(MAKEFILE_IMPORT_PATH)go.mk
+include $(MAKEFILE_IMPORT_PATH)color.mk
+include $(MAKEFILE_IMPORT_PATH)terminal.mk
+include $(MAKEFILE_IMPORT_PATH)output.mk
+include $(MAKEFILE_IMPORT_PATH)version.mk
+include $(MAKEFILE_IMPORT_PATH)target-help.mk
+include $(MAKEFILE_IMPORT_PATH)target-variable.mk
+include $(MAKEFILE_IMPORT_PATH)target-update-makefiles.mk
+include $(MAKEFILE_IMPORT_PATH)target-deploy-tool.mk
+include $(MAKEFILE_IMPORT_PATH)target-build-go.mk
+include $(MAKEFILE_IMPORT_PATH)target-git.mk
+include $(MAKEFILE_IMPORT_PATH)terminal-check.mk	
 
 
 #############################################################################################
diff --git a/application/source/config_test.go b/application/source/config_test.go
index 000e4f0..3a1c101 100644
--- a/application/source/config_test.go
+++ b/application/source/config_test.go
@@ -1,10 +1,8 @@
 package main
 
-import "testing"
-
-func TestNewConfiguration(t *testing.T) {
-	command, _, _ := NewConfiguration()
-	if command.Name == "test" {
-		t.Errorf("Command name was incorrect, got: %s, want: %d.", command.Name, 10)
-	}
-}
+//func TestNewConfiguration(t *testing.T) {
+//	command, _, _ := NewConfiguration()
+//	if command.Name == "test" {
+//		t.Errorf("Command name was incorrect, got: %s, want: %d.", command.Name, 10)
+//	}
+//}
diff --git a/development/makefile/color.mk b/development/makefiles/color.mk
similarity index 100%
rename from development/makefile/color.mk
rename to development/makefiles/color.mk
diff --git a/development/makefile/directories-default.mk b/development/makefiles/directories-default.mk
similarity index 100%
rename from development/makefile/directories-default.mk
rename to development/makefiles/directories-default.mk
diff --git a/development/makefile/go.mk b/development/makefiles/go.mk
similarity index 100%
rename from development/makefile/go.mk
rename to development/makefiles/go.mk
diff --git a/development/makefile/license-agpl3.mk b/development/makefiles/license-agpl3.mk
similarity index 100%
rename from development/makefile/license-agpl3.mk
rename to development/makefiles/license-agpl3.mk
diff --git a/development/makefile/output.mk b/development/makefiles/output.mk
similarity index 100%
rename from development/makefile/output.mk
rename to development/makefiles/output.mk
diff --git a/development/makefile/placeholder.mk b/development/makefiles/placeholder.mk
similarity index 100%
rename from development/makefile/placeholder.mk
rename to development/makefiles/placeholder.mk
diff --git a/development/makefile/target-build-go.mk b/development/makefiles/target-build-go.mk
similarity index 100%
rename from development/makefile/target-build-go.mk
rename to development/makefiles/target-build-go.mk
diff --git a/development/makefile/target-deploy-tool.mk b/development/makefiles/target-deploy-tool.mk
similarity index 100%
rename from development/makefile/target-deploy-tool.mk
rename to development/makefiles/target-deploy-tool.mk
diff --git a/development/makefile/target-git.mk b/development/makefiles/target-git.mk
similarity index 100%
rename from development/makefile/target-git.mk
rename to development/makefiles/target-git.mk
diff --git a/development/makefile/target-help.mk b/development/makefiles/target-help.mk
similarity index 100%
rename from development/makefile/target-help.mk
rename to development/makefiles/target-help.mk
diff --git a/development/makefile/target-init.mk b/development/makefiles/target-init.mk
similarity index 100%
rename from development/makefile/target-init.mk
rename to development/makefiles/target-init.mk
diff --git a/development/makefiles/target-update-makefiles.mk b/development/makefiles/target-update-makefiles.mk
new file mode 100644
index 0000000..e0c5d06
--- /dev/null
+++ b/development/makefiles/target-update-makefiles.mk
@@ -0,0 +1,22 @@
+#############################################################################################
+#############################################################################################
+##
+## INIT-TARGETS
+##
+#############################################################################################
+#############################################################################################
+
+## @see .PHONY https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html#Phony-Targets
+.PHONY: update-makefiles
+
+## update standard makefiles
+update-makefiles:
+	$(QUIET) $(eval TEMPD := $(shell mktemp -d))
+	$(QUIET) $(GIT) clone --depth=1  https://gitlab.schukai.com/schukai/utilities/makefile.git/ "$(TEMPD)" > /dev/null
+	$(QUIET) $(CP) -rv $(TEMPD)/makefiles/* $(MAKEFILE_IMPORT_PATH)
+	$(QUIET) $(RM) -rf $(TEMPD)
+
+
+
+
+
diff --git a/development/makefile/terminal-check.mk b/development/makefiles/terminal-check.mk
similarity index 100%
rename from development/makefile/terminal-check.mk
rename to development/makefiles/terminal-check.mk
diff --git a/development/makefile/terminal.mk b/development/makefiles/terminal.mk
similarity index 100%
rename from development/makefile/terminal.mk
rename to development/makefiles/terminal.mk
diff --git a/development/makefile/version.mk b/development/makefiles/version.mk
similarity index 100%
rename from development/makefile/version.mk
rename to development/makefiles/version.mk
diff --git a/project.mk b/project.mk
new file mode 100644
index 0000000..9efb865
--- /dev/null
+++ b/project.mk
@@ -0,0 +1,3 @@
+
+
+MAKEFILE_IMPORT_PATH?=$(PROJECT_ROOT)development/makefiles/
\ No newline at end of file
diff --git a/requirements-manager.iml b/requirements-manager.iml
index 49df094..cf493e0 100644
--- a/requirements-manager.iml
+++ b/requirements-manager.iml
@@ -7,4 +7,4 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
-</module>
\ No newline at end of file
+</module>
-- 
GitLab