[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
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 2eef2da4d9
commit 789144c4b6

@ -219,11 +219,11 @@ ifeq ($(BUILD_C_ANALYZERS),yes)
byte src_build src_build_common test_build: clang_plugin byte src_build src_build_common test_build: clang_plugin
endif endif
$(INFER_COMMAND_MANUALS): $(INFER_BIN) $(MAKEFILE_LIST) $(INFER_COMMAND_MANUALS): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help --help-format=groff > $@ $(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)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) --help --help-format=groff > $@ $(QUIET)$(INFER_BIN) --help --help-format=groff > $@
@ -231,7 +231,7 @@ $(INFER_MANUALS_GZIPPED): %.gz: %
$(QUIET)$(REMOVE) $@ $(QUIET)$(REMOVE) $@
gzip $< gzip $<
infer_models: $(INFER_BIN) infer_models: src_build
ifeq ($(BUILD_JAVA_ANALYZERS),yes) ifeq ($(BUILD_JAVA_ANALYZERS),yes)
$(MAKE) -C $(ANNOTATIONS_DIR) $(MAKE) -C $(ANNOTATIONS_DIR)
endif endif
@ -434,10 +434,13 @@ test-replace: $(BUILD_SYSTEMS_TESTS:%=build_%_replace) $(DIRECT_TESTS:%=direct_%
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:
$(REMOVE_DIR) $(DESTDIR)$(libdir)/infer/ $(REMOVE_DIR) $(DESTDIR)$(libdir)/infer/
$(REMOVE) $(DESTDIR)$(bindir)/infer* $(REMOVE) $(DESTDIR)$(bindir)/infer
$(REMOVE) $(INFER_COMMANDS:%=$(DESTDIR)$(bindir)/%) $(REMOVE) $(INFER_COMMANDS:%=$(DESTDIR)$(bindir)/%)
$(REMOVE) $(foreach manual,$(INFER_MANUALS_GZIPPED),\ $(REMOVE) $(foreach manual,$(INFER_MANUALS_GZIPPED),\
$(DESTDIR)$(mandir)/man1/$(notdir $(manual))) $(DESTDIR)$(mandir)/man1/$(notdir $(manual)))
ifeq ($(IS_FACEBOOK_TREE),yes)
$(MAKE) -C facebook uninstall
endif
.PHONY: test_clean .PHONY: test_clean
test_clean: $(DIRECT_TESTS:%=direct_%_clean) $(BUILD_SYSTEMS_TESTS:%=build_%_clean) test_clean: $(DIRECT_TESTS:%=direct_%_clean) $(BUILD_SYSTEMS_TESTS:%=build_%_clean)
@ -536,8 +539,8 @@ endif
(cd '$(DESTDIR)$(libdir)'/infer/infer/bin && \ (cd '$(DESTDIR)$(libdir)'/infer/infer/bin && \
$(REMOVE) "$$alias" && \ $(REMOVE) "$$alias" && \
$(LN_S) infer "$$alias"); done $(LN_S) infer "$$alias"); done
$(foreach man,$(INFER_MANUAL_GZIPPED), \ $(foreach man,$(INFER_MANUALS_GZIPPED), \
$(INSTALL_DATA) -C $(man) '$(DESTDIR)$(mandir)/man1/$(notdir $(man))') $(INSTALL_DATA) -C $(man) '$(DESTDIR)$(mandir)/man1/$(notdir $(man))';)
ifeq ($(IS_FACEBOOK_TREE),yes) ifeq ($(IS_FACEBOOK_TREE),yes)
ifdef DESTDIR ifdef DESTDIR
ifeq (,$(findstring :/,:$(DESTDIR))) ifeq (,$(findstring :/,:$(DESTDIR)))

Loading…
Cancel
Save