scripts: Adding license header checking.
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
This commit is contained in:
parent
7a530fcf20
commit
ac8ba83bc7
26
Makefile
26
Makefile
|
@ -30,6 +30,32 @@ README.rst: README.src.rst docs/status.rst Makefile | $(CONDA_ENV_PYTHON)
|
||||||
> README.rst
|
> README.rst
|
||||||
|
|
||||||
|
|
||||||
|
COPYRIGHT_HOLDER := SkyWater PDK Authors
|
||||||
|
FIND := find . -path ./env -prune -o -path ./.git -prune -o
|
||||||
|
ADDLICENSE := addlicense -f ./docs/license_header.txt
|
||||||
|
fix-licenses:
|
||||||
|
@# Makefiles
|
||||||
|
@$(FIND) -type f -name Makefile -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
@$(FIND) -type f -name \*.mk -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
@# Scripting files
|
||||||
|
@$(FIND) -type f -name \*.sh -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
@$(FIND) -type f -name \*.py -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
@# Configuration files
|
||||||
|
@$(FIND) -type f -name \*.yml -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
@# Actual PDK files
|
||||||
|
@$(FIND) -type f -name \*.v -exec $(ADDLICENSE) $(ADDLICENSE_EXTRA) -v \{\} \+
|
||||||
|
|
||||||
|
.PHONY: fix-licenses
|
||||||
|
|
||||||
|
check-licenses:
|
||||||
|
@make --no-print-directory ADDLICENSE_EXTRA=--check fix-licenses
|
||||||
|
|
||||||
|
.PHONY: check-licenses
|
||||||
|
|
||||||
|
|
||||||
|
check: check-licenses
|
||||||
|
@true
|
||||||
|
|
||||||
all: README.rst
|
all: README.rst
|
||||||
@true
|
@true
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
Copyright 2020 SkyWater PDK Authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
|
@ -1,3 +1,18 @@
|
||||||
|
# Copyright 2020 SkyWater PDK Authors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
name: skywater-pdk-scripts
|
name: skywater-pdk-scripts
|
||||||
dependencies:
|
dependencies:
|
||||||
- python
|
- python
|
||||||
|
|
Loading…
Reference in New Issue