Makefile: Little cleanup
Move files to components they belong to. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
e9b344cc1e
commit
feaafdfe06
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
PWD:=$(shell pwd)
|
PWD:=$(shell pwd)
|
||||||
MODULESDIR:=$(PWD)/../modules
|
MODULESDIR:=$(PWD)/../modules
|
||||||
UTILS_DIR:=$(PWD)/../utils
|
|
||||||
METADATA_DIR:=$(PWD)/../.metadata
|
METADATA_DIR:=$(PWD)/../.metadata
|
||||||
BINARY_PATH = /sbin
|
BINARY_PATH = /sbin
|
||||||
|
|
||||||
@ -135,28 +134,12 @@ install_files:
|
|||||||
@mkdir -p $(DESTDIR)$(BINARY_PATH)
|
@mkdir -p $(DESTDIR)$(BINARY_PATH)
|
||||||
@install -m 755 $(TARGET) $(DESTDIR)$(BINARY_PATH)/$(TARGET)
|
@install -m 755 $(TARGET) $(DESTDIR)$(BINARY_PATH)/$(TARGET)
|
||||||
@mkdir -p $(DESTDIR)/usr/share/man/man8
|
@mkdir -p $(DESTDIR)/usr/share/man/man8
|
||||||
@install -m 644 $(UTILS_DIR)/$(TARGET).8 $(DESTDIR)/usr/share/man/man8/$(TARGET).8
|
@install -m 644 $(TARGET).8 $(DESTDIR)/usr/share/man/man8/$(TARGET).8
|
||||||
|
|
||||||
@install -m 755 -d $(DESTDIR)/etc/opencas
|
|
||||||
@install -m 644 $(UTILS_DIR)/opencas.conf $(DESTDIR)/etc/opencas/opencas.conf
|
|
||||||
@install -m 444 $(UTILS_DIR)/ioclass-config.csv $(DESTDIR)/etc/opencas/ioclass-config.csv
|
|
||||||
@install -m 755 -d $(DESTDIR)/var/lib/opencas
|
|
||||||
@install -m 644 $(METADATA_DIR)/cas_version $(DESTDIR)/var/lib/opencas/cas_version
|
|
||||||
|
|
||||||
@mkdir -p $(DESTDIR)/usr/share/man/man5
|
@mkdir -p $(DESTDIR)/usr/share/man/man5
|
||||||
@install -m 644 $(UTILS_DIR)/opencas.conf.5 $(DESTDIR)/usr/share/man/man5/opencas.conf.5
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo "Uninstalling casadm"
|
@echo "Uninstalling casadm"
|
||||||
@rm $(DESTDIR)$(BINARY_PATH)/$(TARGET)
|
@rm $(DESTDIR)$(BINARY_PATH)/$(TARGET)
|
||||||
@rm $(DESTDIR)/usr/share/man/man8/$(TARGET).8
|
@rm $(DESTDIR)/usr/share/man/man8/$(TARGET).8
|
||||||
|
|
||||||
@rm $(DESTDIR)/etc/opencas/opencas.conf
|
|
||||||
@rm $(DESTDIR)/etc/opencas/ioclass-config.csv
|
|
||||||
@rm -rf $(DESTDIR)/etc/opencas
|
|
||||||
@rm $(DESTDIR)/var/lib/opencas/cas_version
|
|
||||||
@rm -rf $(DESTDIR)/var/lib/opencas
|
|
||||||
|
|
||||||
@rm $(DESTDIR)/usr/share/man/man5/opencas.conf.5
|
|
||||||
|
|
||||||
.PHONY: clean distclean all sync build install uninstall
|
.PHONY: clean distclean all sync build install uninstall
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
CASCTL_DIR = /lib/opencas
|
CASCTL_DIR = /lib/opencas
|
||||||
UDEVRULES_DIR = /lib/udev/rules.d
|
UDEVRULES_DIR = /lib/udev/rules.d
|
||||||
|
METADATA_DIR:=$(PWD)/../.metadata
|
||||||
|
UTILS_DIR:=$(PWD)/../utils
|
||||||
UDEV:=$(shell which udevadm)
|
UDEV:=$(shell which udevadm)
|
||||||
SYSTEMCTL := $(shell which systemctl)
|
SYSTEMCTL := $(shell which systemctl)
|
||||||
PYTHON3 := $(shell which python3)
|
PYTHON3 := $(shell which python3)
|
||||||
@ -30,6 +32,14 @@ else
|
|||||||
install_files:
|
install_files:
|
||||||
@echo "Installing Open-CAS utils"
|
@echo "Installing Open-CAS utils"
|
||||||
|
|
||||||
|
@install -m 755 -d $(DESTDIR)/etc/opencas
|
||||||
|
@install -m 644 $(UTILS_DIR)/opencas.conf $(DESTDIR)/etc/opencas/opencas.conf
|
||||||
|
@install -m 444 $(UTILS_DIR)/ioclass-config.csv $(DESTDIR)/etc/opencas/ioclass-config.csv
|
||||||
|
@install -m 755 -d $(DESTDIR)/var/lib/opencas
|
||||||
|
@install -m 644 $(METADATA_DIR)/cas_version $(DESTDIR)/var/lib/opencas/cas_version
|
||||||
|
@mkdir -p $(DESTDIR)/usr/share/man/man5
|
||||||
|
@install -m 644 $(UTILS_DIR)/opencas.conf.5 $(DESTDIR)/usr/share/man/man5/opencas.conf.5
|
||||||
|
|
||||||
@install -m 755 -d $(DESTDIR)$(CASCTL_DIR)
|
@install -m 755 -d $(DESTDIR)$(CASCTL_DIR)
|
||||||
@install -m 644 opencas.py $(DESTDIR)$(CASCTL_DIR)/opencas.py
|
@install -m 644 opencas.py $(DESTDIR)$(CASCTL_DIR)/opencas.py
|
||||||
@install -m 755 casctl $(DESTDIR)$(CASCTL_DIR)/casctl
|
@install -m 755 casctl $(DESTDIR)$(CASCTL_DIR)/casctl
|
||||||
@ -58,6 +68,15 @@ install_files:
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
@echo "Uninstalling Open-CAS utils"
|
||||||
|
|
||||||
|
@rm $(DESTDIR)/etc/opencas/opencas.conf
|
||||||
|
@rm $(DESTDIR)/etc/opencas/ioclass-config.csv
|
||||||
|
@rm -rf $(DESTDIR)/etc/opencas
|
||||||
|
@rm $(DESTDIR)/var/lib/opencas/cas_version
|
||||||
|
@rm -rf $(DESTDIR)/var/lib/opencas
|
||||||
|
@rm $(DESTDIR)/usr/share/man/man5/opencas.conf.5
|
||||||
|
|
||||||
@rm $(DESTDIR)$(CASCTL_DIR)/opencas.py
|
@rm $(DESTDIR)$(CASCTL_DIR)/opencas.py
|
||||||
@rm $(DESTDIR)$(CASCTL_DIR)/casctl
|
@rm $(DESTDIR)$(CASCTL_DIR)/casctl
|
||||||
@rm $(DESTDIR)$(CASCTL_DIR)/open-cas-loader
|
@rm $(DESTDIR)$(CASCTL_DIR)/open-cas-loader
|
||||||
@ -81,5 +100,4 @@ uninstall:
|
|||||||
@rm $(DESTDIR)$(SYSTEMD_DIR)/open-cas.service
|
@rm $(DESTDIR)$(SYSTEMD_DIR)/open-cas.service
|
||||||
@rm $(DESTDIR)$(SYSTEMD_DIR)/../system-shutdown/open-cas.shutdown
|
@rm $(DESTDIR)$(SYSTEMD_DIR)/../system-shutdown/open-cas.shutdown
|
||||||
|
|
||||||
|
|
||||||
.PHONY: install uninstall clean distclean
|
.PHONY: install uninstall clean distclean
|
||||||
|
Loading…
Reference in New Issue
Block a user