From 789144c4b6864a656876cd3ab73848ac3474efa7 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 21 May 2018 09:22:13 -0700 Subject: [PATCH] [make] do not delete /usr/bin/infer* on uninstall Summary: Also, fix typo to actually install the man pages. Fixes #920 Reviewed By: mbouaziz Differential Revision: D8075978 fbshipit-source-id: e94786d --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3b5ff28eb..90bd5b30b 100644 --- a/Makefile +++ b/Makefile @@ -219,11 +219,11 @@ ifeq ($(BUILD_C_ANALYZERS),yes) byte src_build src_build_common test_build: clang_plugin endif -$(INFER_COMMAND_MANUALS): $(INFER_BIN) $(MAKEFILE_LIST) +$(INFER_COMMAND_MANUALS): src_build $(MAKEFILE_LIST) $(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help --help-format=groff > $@ -$(INFER_MANUAL): $(INFER_BIN) $(MAKEFILE_LIST) +$(INFER_MANUAL): src_build $(MAKEFILE_LIST) $(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(INFER_BIN) --help --help-format=groff > $@ @@ -231,7 +231,7 @@ $(INFER_MANUALS_GZIPPED): %.gz: % $(QUIET)$(REMOVE) $@ gzip $< -infer_models: $(INFER_BIN) +infer_models: src_build ifeq ($(BUILD_JAVA_ANALYZERS),yes) $(MAKE) -C $(ANNOTATIONS_DIR) endif @@ -434,10 +434,13 @@ test-replace: $(BUILD_SYSTEMS_TESTS:%=build_%_replace) $(DIRECT_TESTS:%=direct_% .PHONY: uninstall uninstall: $(REMOVE_DIR) $(DESTDIR)$(libdir)/infer/ - $(REMOVE) $(DESTDIR)$(bindir)/infer* + $(REMOVE) $(DESTDIR)$(bindir)/infer $(REMOVE) $(INFER_COMMANDS:%=$(DESTDIR)$(bindir)/%) $(REMOVE) $(foreach manual,$(INFER_MANUALS_GZIPPED),\ $(DESTDIR)$(mandir)/man1/$(notdir $(manual))) +ifeq ($(IS_FACEBOOK_TREE),yes) + $(MAKE) -C facebook uninstall +endif .PHONY: test_clean test_clean: $(DIRECT_TESTS:%=direct_%_clean) $(BUILD_SYSTEMS_TESTS:%=build_%_clean) @@ -536,8 +539,8 @@ endif (cd '$(DESTDIR)$(libdir)'/infer/infer/bin && \ $(REMOVE) "$$alias" && \ $(LN_S) infer "$$alias"); done - $(foreach man,$(INFER_MANUAL_GZIPPED), \ - $(INSTALL_DATA) -C $(man) '$(DESTDIR)$(mandir)/man1/$(notdir $(man))') + $(foreach man,$(INFER_MANUALS_GZIPPED), \ + $(INSTALL_DATA) -C $(man) '$(DESTDIR)$(mandir)/man1/$(notdir $(man))';) ifeq ($(IS_FACEBOOK_TREE),yes) ifdef DESTDIR ifeq (,$(findstring :/,:$(DESTDIR)))