summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--armband-patch-copyright.template8
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6d82466e..43edd22d 100644
--- a/Makefile
+++ b/Makefile
@@ -126,4 +126,13 @@ fuel-patches-import: .submodules-patched fuel-patches-clean
fuel-patches-clean:
$(MAKE) -e -C ${F_PATCH_DIR} clean
+# Add copyright header to patch files if not already present
+.PHONY: patches-copyright
+patches-copyright:
+ grep -e "Copyright (c)" -L ${A_PATCHES} | while read p_file; do \
+ ptmp=`mktemp` && \
+ cat armband-patch-copyright.template $$p_file > $$ptmp && \
+ mv $$ptmp $$p_file; \
+ done
+
# TODO: Bring back clean/debug/build after Fuel@OPNFV implements them for MCP
diff --git a/armband-patch-copyright.template b/armband-patch-copyright.template
new file mode 100644
index 00000000..b63d55a7
--- /dev/null
+++ b/armband-patch-copyright.template
@@ -0,0 +1,8 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::