mirror of
https://github.com/dynup/kpatch
synced 2025-02-02 02:01:33 +00:00
add uninstall target
Make it easy to clean up an install Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
bdd8554c96
commit
5932f0d083
5
Makefile
5
Makefile
@ -3,6 +3,7 @@ include Makefile.inc
|
||||
SUBDIRS = kpatch-build kpatch kmod
|
||||
BUILD_DIRS = $(SUBDIRS:%=build-%)
|
||||
INSTALL_DIRS = $(SUBDIRS:%=install-%)
|
||||
UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%)
|
||||
CLEAN_DIRS = $(SUBDIRS:%=clean-%)
|
||||
|
||||
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)
|
||||
@ -16,6 +17,10 @@ install: $(INSTALL_DIRS)
|
||||
$(INSTALL_DIRS):
|
||||
$(MAKE) -C $(@:install-%=%) install
|
||||
|
||||
uninstall: $(UNINSTALL_DIRS)
|
||||
$(UNINSTALL_DIRS):
|
||||
$(MAKE) -C $(@:uninstall-%=%) uninstall
|
||||
|
||||
clean: $(CLEAN_DIRS)
|
||||
$(CLEAN_DIRS):
|
||||
$(MAKE) -C $(@:clean-%=%) clean
|
||||
|
@ -9,5 +9,9 @@ install:
|
||||
$(INSTALL) -d $(DATADIR)/patch
|
||||
$(INSTALL) -m 644 patch/* $(DATADIR)/patch
|
||||
|
||||
uninstall:
|
||||
$(RM) -R $(MODULESDIR)/*/kpatch
|
||||
$(RM) -R $(DATADIR)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C core clean
|
||||
|
@ -17,5 +17,9 @@ install: all
|
||||
$(INSTALL) -d $(BINDIR)
|
||||
$(INSTALL) kpatch-build $(BINDIR)
|
||||
|
||||
uninstall:
|
||||
$(RM) -R $(LIBEXECDIR)
|
||||
$(RM) $(BINDIR)/kpatch-build
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGETS)
|
||||
|
@ -6,4 +6,7 @@ install: all
|
||||
$(INSTALL) -d $(SBINDIR)
|
||||
$(INSTALL) kpatch $(SBINDIR)
|
||||
|
||||
uninstall:
|
||||
$(RM) $(SBINDIR)/kpatch
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user