Fix make install

Summary: See https://github.com/facebook/rocksdb/issues/283

Test Plan: make install/uninstall

Reviewers: ljin, sdong, yhchiang

Reviewed By: yhchiang

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23373
main
Igor Canadi 10 years ago
parent acb9348ff3
commit 49aacd8d2b
  1. 28
      Makefile

@ -53,26 +53,20 @@ endif
INSTALL_PATH ?= /usr/local INSTALL_PATH ?= /usr/local
uninstall: uninstall:
rm -rf $(INSTALL_PATH)/include/rocksdb @rm -rf $(INSTALL_PATH)/include/rocksdb
if [ -a $(LIBRARY) ]; then \ @rm -rf $(INSTALL_PATH)/lib/$(LIBRARY)
rm -rf $(INSTALL_PATH)/lib/$(LIBRARY); \ @rm -rf $(INSTALL_PATH)/lib/$(SHARED)
fi
if [ -a $(SHARED) ]; then \
rm -rf $(INSTALL_PATH)/lib/$(SHARED); \
fi
install: install:
install -d $(INSTALL_PATH)/include/rocksdb @install -d $(INSTALL_PATH)/lib
install -d $(INSTALL_PATH)/lib @for header_dir in `find "include/rocksdb" -type d`; do \
for header in `find "include/rocksdb" -type f -name *.h`; do \ install -d $(INSTALL_PATH)/$$header_dir; \
install -C -m 644 -D $$header $(INSTALL_PATH)/$$header; \
done done
if [ -a $(LIBRARY) ]; then \ @for header in `find "include/rocksdb" -type f -name *.h`; do \
install -C -m 644 $(LIBRARY) $(INSTALL_PATH)/lib/.; \ install -C -m 644 $$header $(INSTALL_PATH)/$$header; \
fi; done
if [ -a $(SHARED) ]; then \ @[ ! -e $(LIBRARY) ] || install -C -m 644 $(LIBRARY) $(INSTALL_PATH)/lib
install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib/.; \ @[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
fi;
#------------------------------------------------- #-------------------------------------------------
WARNING_FLAGS = -Wall -Werror -Wsign-compare WARNING_FLAGS = -Wall -Werror -Wsign-compare

Loading…
Cancel
Save