From cd06aea2556e8ed1190935ffc74fc012ba59265b Mon Sep 17 00:00:00 2001
From: namark <namark@disroot.org>
Date: Mon, 20 Sep 2021 22:58:17 +0400
Subject: [PATCH] Configurable copyright file location for make templates

---
 make_templates/binary          | 7 ++++---
 make_templates/header_only_lib | 7 ++++---
 make_templates/static_lib      | 7 ++++---
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/make_templates/binary b/make_templates/binary
index f8fec6e..e8085fe 100644
--- a/make_templates/binary
+++ b/make_templates/binary
@@ -18,9 +18,10 @@ INSTALL_SOURCE ?= source
 #LOCAL_TEMP
 #LOCAL_DIST
 
-ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
-COPYRIGHT ?= COPYRIGHT
-COPYRIGHT_DEP = COPYRIGHT
+COPYRIGHT_FILE ?= ./COPYRIGHT
+ifneq ($(shell cat $(COPYRIGHT_FILE) 2> /dev/null),)
+COPYRIGHT ?= $(COPYRIGHT_FILE)
+COPYRIGHT_DEP = $(COPYRIGHT_FILE)
 else
 COPYRIGHT ?= /dev/null
 endif
diff --git a/make_templates/header_only_lib b/make_templates/header_only_lib
index 472477d..74d46a9 100644
--- a/make_templates/header_only_lib
+++ b/make_templates/header_only_lib
@@ -1,9 +1,10 @@
 INSTALL_INCLUDE ?= include
 INSTALL_SOURCE ?= source
 
-ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
-COPYRIGHT ?= COPYRIGHT
-COPYRIGHT_DEP = COPYRIGHT
+COPYRIGHT_FILE ?= ./COPYRIGHT
+ifneq ($(shell cat $(COPYRIGHT_FILE) 2> /dev/null),)
+COPYRIGHT ?= $(COPYRIGHT_FILE)
+COPYRIGHT_DEP = $(COPYRIGHT_FILE)
 else
 COPYRIGHT ?= /dev/null
 endif
diff --git a/make_templates/static_lib b/make_templates/static_lib
index 3fc4623..a24b145 100644
--- a/make_templates/static_lib
+++ b/make_templates/static_lib
@@ -17,9 +17,10 @@ INSTALL_LIB	?= lib
 #LOCAL_TEMP
 #LOCAL_DIST
 
-ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
-COPYRIGHT ?= COPYRIGHT
-COPYRIGHT_DEP = COPYRIGHT
+COPYRIGHT_FILE ?= ./COPYRIGHT
+ifneq ($(shell cat $(COPYRIGHT_FILE) 2> /dev/null),)
+COPYRIGHT ?= $(COPYRIGHT_FILE)
+COPYRIGHT_DEP = $(COPYRIGHT_FILE)
 else
 COPYRIGHT ?= /dev/null
 endif
-- 
GitLab