Merge pull request #74 from spartacus06/uninstall

add uninstall target
This commit is contained in:
Josh Poimboeuf 2014-03-20 11:31:16 -05:00
commit 39a88d0703
4 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,7 @@ include Makefile.inc
SUBDIRS = kpatch-build kpatch kmod SUBDIRS = kpatch-build kpatch kmod
BUILD_DIRS = $(SUBDIRS:%=build-%) BUILD_DIRS = $(SUBDIRS:%=build-%)
INSTALL_DIRS = $(SUBDIRS:%=install-%) INSTALL_DIRS = $(SUBDIRS:%=install-%)
UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%)
CLEAN_DIRS = $(SUBDIRS:%=clean-%) CLEAN_DIRS = $(SUBDIRS:%=clean-%)
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS) .PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)
@ -16,6 +17,10 @@ install: $(INSTALL_DIRS)
$(INSTALL_DIRS): $(INSTALL_DIRS):
$(MAKE) -C $(@:install-%=%) install $(MAKE) -C $(@:install-%=%) install
uninstall: $(UNINSTALL_DIRS)
$(UNINSTALL_DIRS):
$(MAKE) -C $(@:uninstall-%=%) uninstall
clean: $(CLEAN_DIRS) clean: $(CLEAN_DIRS)
$(CLEAN_DIRS): $(CLEAN_DIRS):
$(MAKE) -C $(@:clean-%=%) clean $(MAKE) -C $(@:clean-%=%) clean

View File

@ -9,5 +9,9 @@ install:
$(INSTALL) -d $(DATADIR)/patch $(INSTALL) -d $(DATADIR)/patch
$(INSTALL) -m 644 patch/* $(DATADIR)/patch $(INSTALL) -m 644 patch/* $(DATADIR)/patch
uninstall:
$(RM) -R $(MODULESDIR)/*/kpatch
$(RM) -R $(DATADIR)
clean: clean:
$(MAKE) -C core clean $(MAKE) -C core clean

View File

@ -17,5 +17,9 @@ install: all
$(INSTALL) -d $(BINDIR) $(INSTALL) -d $(BINDIR)
$(INSTALL) kpatch-build $(BINDIR) $(INSTALL) kpatch-build $(BINDIR)
uninstall:
$(RM) -R $(LIBEXECDIR)
$(RM) $(BINDIR)/kpatch-build
clean: clean:
$(RM) $(TARGETS) $(RM) $(TARGETS)

View File

@ -6,4 +6,7 @@ install: all
$(INSTALL) -d $(SBINDIR) $(INSTALL) -d $(SBINDIR)
$(INSTALL) kpatch $(SBINDIR) $(INSTALL) kpatch $(SBINDIR)
uninstall:
$(RM) $(SBINDIR)/kpatch
clean: clean: