From dafb89c7a307272189b29a5c74bd6e33068ac831 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sat, 2 May 2015 19:12:33 +0200 Subject: build: Make module build also depend on header file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If only a header file is changed, the corresponding module is not rebuilt. Thus, add a rule to make module build depend on the header file as well (where applicable) to circumvent this effect. Note: This will still not necessarily catch every dependency between modules, source and header files. Signed-off-by: Tobias Klauser --- Template | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Template') diff --git a/Template b/Template index fa574de..3410769 100644 --- a/Template +++ b/Template @@ -20,6 +20,9 @@ define TOOL_templ $$(CCQ) $$(CFLAGS) -o $$@ -c $$< $(1)/%.tab.o: $(1)/%.tab.c $$(CCQ) $$(CFLAGS) -o $$@ -c $$< + $(1)/%.o: %.c %.h + $$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$< + $$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$< $(1)/%.o: %.c $$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$< $$(CCQ) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$< -- cgit v1.2.3-54-g00ecf