diff --git a/Scripts/developer_scripts/licensecheck b/Scripts/developer_scripts/licensecheck index ce7a9c537d6..262aae9aef7 100755 --- a/Scripts/developer_scripts/licensecheck +++ b/Scripts/developer_scripts/licensecheck @@ -444,6 +444,10 @@ sub parselicense { $license = "GENERATED FILE"; } + if ($licensetext =~ /This file incorporates work covered by the following copyright and permission notice/i) { + $license = "DERIVED WORK"; + } + if ($licensetext =~ /((is free software.? )?you can redistribute (it|them) and\/or modify (it|them)|is licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) { $license = "LGPL$gplver$extrainfo $license"; } @@ -576,7 +580,7 @@ sub parselicense { } # Since SPDX tags are sufficient, make sure no license notice was present - if (length($license)!=0 && $license ne "GENERATED FILE") + if (length($license)!=0 && $license ne "GENERATED FILE" && !($license =~ "DERIVED WORK")) { $license = $license." READ FROM LICENSE NOTICE THAT SHOULD NOT BE PRESENT"; }