Rename patch_datadir_var to patch_dirvar and add a parameter to specify
which variable to patch. This will allow to use it also for libexecdir.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
TARGETS += no_python_mako
endif
-define patch_datadir_var
- sed -i 's|^datadir = None|datadir = "$(datadir)"|' $1
+define patch_dirvar
+ sed -i 's|^$1 = None|$1 = "$($1)"|' $2
endef
# no recipes above this one (also no includes)
install-libexec: $(HELPERS) $(DESTDIR)$(libexecdir)/jailhouse
$(INSTALL_PROGRAM) $^
- $(Q)$(call patch_datadir_var, $(lastword $^)/jailhouse-config-create)
+ $(Q)$(call patch_dirvar,datadir,$(lastword $^)/jailhouse-config-create)
install-data: $(TEMPLATES) $(DESTDIR)$(datadir)/jailhouse
$(INSTALL_DATA) $^