summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rvs/main.mk.in24
-rw-r--r--rvs/plugins/main.mk.in3
-rw-r--r--rvs/plugins/plugin.mk.in5
-rw-r--r--rvs/plugins/users/info.mk.in1
-rw-r--r--rvs/wrapper/rvs.sh2
5 files changed, 23 insertions, 12 deletions
diff --git a/rvs/main.mk.in b/rvs/main.mk.in
index b698651..e3a6c96 100644
--- a/rvs/main.mk.in
+++ b/rvs/main.mk.in
@@ -42,11 +42,17 @@ filelist = \
$(patsubst $(srcdir)/%,%,$(shell find $(srcdir)/*/* -type f))
# install ############################################################
-install : install-wrapper install-plugins
-uninstall : uninstall-wrapper uninstall-plugins
clean : clean-wrapper clean-plugins
distclean : clean distclean-wrapper distclean-plugins
$(RM) Makefile *.mk
+install : install-wrapper install-plugins
+uninstall :
+ $(MAKE) uninstall-plugins
+ $(MAKE) uninstall-wrapper
+ -rmdir $(BINDIR)
+ -rmdir $(ETCDIR)
+ -rmdir $(LIBDIR)
+ -rmdir $(sysconfdir)
# wrapper ############################################################
@@ -63,11 +69,11 @@ $(RVS) : install-wrapper
# plugins ############################################################
plugins : build-plugins
-build-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $<
-uninstall-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< uninstall
-clean-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< clean
-distclean-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< distclean
-dist-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< dist
-install-plugins : plugins/ plugins/Makefile \
- plugins $(RVS) ; $(MAKE) -C $< install
+build-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $<
+clean-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< clean
+distclean-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< distclean
+dist-plugins : plugins/ plugins/Makefile ; $(MAKE) -C $< dist
+uninstall-plugins : plugins/ plugins/Makefile $(RVS) ; $(MAKE) -C $< uninstall
+install-plugins : plugins/ plugins/Makefile $(RVS) \
+ plugins ; $(MAKE) -C $< install
diff --git a/rvs/plugins/main.mk.in b/rvs/plugins/main.mk.in
index 01ec205..677ffe6 100644
--- a/rvs/plugins/main.mk.in
+++ b/rvs/plugins/main.mk.in
@@ -27,6 +27,7 @@ dirs += $(sysconfdir) $(BINDIR) $(TMPDIR) $(LIBDIR) $(ETCDIR)
mods = $(patsubst ./%,%,$(shell find ./* -maxdepth 0 -type d))
mods-build = $(addprefix build-,$(mods))
mods-install = $(addprefix install-,$(mods))
+mods-uninstall = $(addprefix uninstall-,$(mods))
mods-clean = $(addprefix clean-,$(mods))
mods-distclean = $(addprefix distclean-,$(mods))
@@ -37,6 +38,7 @@ all : build
# $(mods-build) $(mods-install) $(mods-clean) $(mods-distclean)
build : $(mods-build)
install : $(mods-install)
+uninstall : $(mods-uninstall)
clean : $(mods-clean)
distclean : $(mods-distclean)
$(RM) Makefile *.mk
@@ -48,6 +50,7 @@ distclean : $(mods-distclean)
complete-% : %/ %/main.mk; :
build-% : %/ complete-% %/main.mk; $(MAKE) -C $<
install-% : %/ complete-% %/main.mk; $(MAKE) -C $< install
+uninstall-% : %/ complete-% %/main.mk; $(MAKE) -C $< uninstall
clean-% : %/ complete-% %/main.mk; -$(MAKE) -C $< clean
distclean-% : %/ complete-% %/main.mk; $(MAKE) -C $< distclean
diff --git a/rvs/plugins/plugin.mk.in b/rvs/plugins/plugin.mk.in
index 1f1995c..f8a42b4 100644
--- a/rvs/plugins/plugin.mk.in
+++ b/rvs/plugins/plugin.mk.in
@@ -66,8 +66,9 @@ $(outLib) : $(LIBDIR)/$(name)/% : lib/%
$(MKDIR) $(dir $@)
$(INSTALL_DATA) $< $@
-uninstall :
- $(RVS) uninstall $(name)
+uninstall : $(addprefix un,$(outBin))
+ $(RM) -r $(ETCDIR)/$(name)
+ $(RM) -r $(LIBDIR)/$(name)
# clean ############################################################
diff --git a/rvs/plugins/users/info.mk.in b/rvs/plugins/users/info.mk.in
index 8289128..094f2a5 100644
--- a/rvs/plugins/users/info.mk.in
+++ b/rvs/plugins/users/info.mk.in
@@ -1,2 +1,3 @@
name = users
ver = 0.9
+priority = 2
diff --git a/rvs/wrapper/rvs.sh b/rvs/wrapper/rvs.sh
index d8b1b40..2e8f4ca 100644
--- a/rvs/wrapper/rvs.sh
+++ b/rvs/wrapper/rvs.sh
@@ -123,7 +123,7 @@ _uninstall() {
rm "$BINDIR/$command"
else
# ID specified
- rm "$BINDIR/$command/*-$id"
+ rm "$BINDIR/$command/"*-"$id"
if [ -z "$(ls "$BINDIR/$command")" ]; then
rmdir "$BINDIR/$command"
fi