From c4c10c21933542f8c3d2a1f3e1ef8a38186539f2 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Fri, 10 Jun 2022 12:47:50 +0200
Subject: [PATCH] [headers] adds HEADER_REPO variable

---
 share/Makefile.headers | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/share/Makefile.headers b/share/Makefile.headers
index 066dec9f2a6..a391f4c1994 100644
--- a/share/Makefile.headers
+++ b/share/Makefile.headers
@@ -44,6 +44,10 @@ HEADER_DIRS?=headers $(wildcard src/plugins/*/headers)
 # - <dir>: look at $(HEADER_DIRS)/<dir>
 HEADER_OPEN_SOURCE?=yes
 
+# Can be set to a directory
+# - <dir>: directory containing the files to manage
+HEADER_REPO?=
+
 # Can be set to a file
 # - <file>: file containing the list of the files to manage
 HEADER_DISTRIB_FILE?=
@@ -120,6 +124,11 @@ ifneq ($(HEADER_EXCEPTIONS),)
 HDRCK_OPTS+= -header-except-file $(HEADER_EXCEPTIONS)
 endif
 
+ifneq ($(HEADER_REPO),)
+# Adds the option "-C"
+HDRCK_OPTS+= -C $(HEADER_REPO)
+endif
+
 ifeq ($(HEADER_STRICT),yes)
 # Adds the option "-exit-on-warning"
 HDRCK_OPTS+= -exit-on-warning
@@ -165,6 +174,7 @@ headers.info:
 	echo "HEADER_DIRS='$(HEADER_STRICT)'"
 	echo "HEADER_DISTRIB_FILE='$(HEADER_DISTRIB_FILE)'"
 	echo "HEADER_EXCEPTIONS='$(HEADER_EXCEPTIONS)'"
+	echo "HEADER_REPO='$(HEADER_REPO)'"
 	echo "HEADER_SPEC='$(HEADER_SPEC)'"
 	echo "HDRCK='$(HDRCK)'"
 	echo "HDRCK_SPEC='$(HDRCK_SPEC)'"
-- 
GitLab