From 3fcc86cbb65140106b5e3cfc0ede10230c680118 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Vavru=C5=A1a?= <marek.vavrusa@nic.cz>
Date: Thu, 7 May 2015 15:42:43 +0200
Subject: [PATCH] build: Lua modules with multiple source files

---
 modules/ketcd/ketcd.mk | 1 +
 modules/modules.mk     | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/ketcd/ketcd.mk b/modules/ketcd/ketcd.mk
index 3c45daf3b..8fa61d713 100644
--- a/modules/ketcd/ketcd.mk
+++ b/modules/ketcd/ketcd.mk
@@ -1 +1,2 @@
+ketcd_SOURCES := ketcd.lua
 $(call make_lua_module,ketcd)
diff --git a/modules/modules.mk b/modules/modules.mk
index cb435fc14..cf4193a82 100644
--- a/modules/modules.mk
+++ b/modules/modules.mk
@@ -24,9 +24,9 @@ endef
 
 # Lua target definition
 define lua_target
-$(1) := $(2)/$(1).lua
+$(1) := $$($(1)_SOURCES)
 $(1)-clean:
-$(1)-install: $(2)/$(1).lua
+$(1)-install: $$($(1)_SOURCES)
 	$(INSTALL) -d $(PREFIX)/$(MODULEDIR)
 	$(INSTALL) $$^ $(PREFIX)/$(MODULEDIR)
 .PHONY: $(1) $(1)-install $(1)-clean
-- 
GitLab