Makefile: normalize all the Makefiles

We create ALL_PROGRAMS, ALL_TEST_PROGRAMS, ALL_C_SOURCES and
ALL_C_HEADERS.  Then the toplevel Makefile knows which are
autogenerated (by wildcard), so it can have all the rules to clean
them or check the source as necessary.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-31 10:43:25 +09:30
committed by neil saitug
parent 2835cf8a43
commit 1746406e41
28 changed files with 251 additions and 550 deletions

View File

@@ -6,13 +6,5 @@ tests/plugins/test_libplugin: bitcoin/chainparams.o $(PLUGIN_TESTLIBPLUGIN_OBJS)
$(PLUGIN_TESTLIBPLUGIN_OBJS): $(PLUGIN_LIB_HEADER)
# Make sure these depend on everything.
ALL_PROGRAMS += tests/plugins/test_libplugin
ALL_OBJS += $(PLUGIN_TESTLIBPLUGIN_OBJS)
check-source: $(PLUGIN_TESTLIBPLUGIN_SRC:%=check-src-include-order/%)
check-whitespace: $(PLUGIN_TESTLIBPLUGIN_SRC:%=check-whitespace/%)
clean: test-plugin-clean
test-plugin-clean:
$(RM) $(PLUGIN_TESTLIBPLUGIN_OBJS)
ALL_TEST_PROGRAMS += tests/plugins/test_libplugin
ALL_C_SOURCES += $(PLUGIN_TESTLIBPLUGIN_SRC)