Commit 376c3aad authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Peter Korsgaard
Browse files

legal-info: fail trying to copy a non-existent license file



If a package's _LICENSE_FILES contains the name of a non-existent file,
the make process would continue and return true, unless the
non-existent file is the last listed.

Fix this wrong beaviour by failing with an error when any of the listed
files is missing.

Reported-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 8d34e073
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -508,9 +508,7 @@ ifeq ($(call qstrip,$$($(2)_LICENSE_FILES)),)
	@$(call legal-license-nofiles,$$($(2)_RAWNAME))
	@$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined))
else
	@for F in $$($(2)_LICENSE_FILES); do \
		$(call legal-license-file,$$($(2)_RAWNAME),$$$${F},$$($(2)_DIR)/$$$${F}); \
		done
	@$(foreach F,$($(2)_LICENSE_FILES),$(call legal-license-file,$$($(2)_RAWNAME),$(F),$$($(2)_DIR)/$(F))$$(sep))
endif
ifeq ($$($(2)_REDISTRIBUTE),YES)
# Copy the source tarball (just hardlink if possible)