fix for ui files with funny file names

This commit is contained in:
2020-08-12 15:21:54 +02:00
parent 1fd549ede6
commit 8a71a986cb
+3 -2
View File
@@ -293,11 +293,12 @@ installui: install$(1)
install$(1): uninstall$(1)
@$$(if $${$(1)_FILES},echo "Installing $(1) user interfaces";$$(MKDIR) $${INSTALL_$(1)})
@$$(if $${$(1)_FILES},$(CP) -v -t $${INSTALL_$(1)} $${$(1)_FILES:%='%'})
@$$(if $${$(1)_FILES},echo "$$(patsubst %,'%',$$(notdir $${$(1)_FILES}))" > $${INSTALL_$(1)}/.$${PRJ}-$$(LIBVERSION)-$(1).txt)
@# One can never have enough quotes: "'"'%'"'" means: quote the name in case '%' it contains $(bla) or something, and also write quotes "'" to the file
@$$(if $${$(1)_FILES},echo $$(patsubst %,"'"'%'"'",$$(notdir $${$(1)_FILES})) > $${INSTALL_$(1)}/.$${PRJ}-$$(LIBVERSION)-$(1).txt)
uninstallui: uninstall$(1)
uninstall$(1):
@echo "Removing old $(1) user interfaces"
@test -f $${INSTALL_$(1)}/.$${PRJ}-*.txt && echo "Removing old $(1) user interfaces" || true
@$$(RM) -v $$(addprefix $${INSTALL_$(1)}/,$$(sort $$(patsubst %,'%',$$(notdir $${$(1)_FILES})) $$(shell cat $${INSTALL_$(1)}/.$${PRJ}-*.txt 2>/dev/null)) .$${PRJ}-*-$(1).txt)
endef