[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 20 08:49:10 UTC 2019
compilerplugins/Makefile-clang.mk | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
commit db123abade41a54d34add4fae46b769cd863de7f
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Sep 19 16:54:25 2019 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Sep 20 10:48:02 2019 +0200
rebuild sharedvisitor.cxx if any of its sources disappears
Testcase: Remove any reference to LO_CLANG_SHARED_PLUGINS from e.g.
blockblock.cxx, sharedvisitor.cxx should get regenerated.
Change-Id: Iddff3cf41c223cfdf161060d29bde9df1df7b702
Reviewed-on: https://gerrit.libreoffice.org/79194
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index ac23edf6cb2b..1a2ceef369df 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -275,6 +275,28 @@ $(CLANGOUTDIR)/sharedvisitor:
-include $(CLANGOUTDIR)/sharedvisitor/analyzer.d
-include $(CLANGOUTDIR)/sharedvisitor/generator.d
# TODO WNT version
+
+# Remember the sources that are shared and if they have changed, force sharedvisitor.cxx generating.
+# Duplicated from CLANGSRCCHANGED above.
+CLANGSRCSHAREDCHANGED= \
+ $(shell mkdir -p $(CLANGOUTDIR) ; \
+ echo $(SHARED_SOURCES) | sort > $(CLANGOUTDIR)/sources-shared-new.txt; \
+ if diff $(CLANGOUTDIR)/sources-shared.txt $(CLANGOUTDIR)/sources-shared-new.txt >/dev/null 2>/dev/null; then \
+ echo 0; \
+ else \
+ mv $(CLANGOUTDIR)/sources-shared-new.txt $(CLANGOUTDIR)/sources-shared.txt; \
+ echo 1; \
+ fi; \
+ )
+ifeq ($(CLANGSRCSHAREDCHANGED),1)
+.PHONY: CLANGFORCE
+CLANGFORCE:
+$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: CLANGFORCE
+endif
+# Make sharedvisitor.cxx also explicitly depend on the sources list, to force update in case CLANGSRCSHAREDCHANGED was e.g. during 'make clean'.
+$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: $(CLANGOUTDIR)/sources-shared.txt
+$(CLANGOUTDIR)/sources-shared.txt:
+ touch $@
endif
ifdef LO_CLANG_USE_ANALYZER_PCH
More information about the Libreoffice-commits
mailing list