summaryrefslogtreecommitdiff
path: root/main.mk.in
diff options
context:
space:
mode:
Diffstat (limited to 'main.mk.in')
-rw-r--r--main.mk.in44
1 files changed, 21 insertions, 23 deletions
diff --git a/main.mk.in b/main.mk.in
index 2d55793..11fca5c 100644
--- a/main.mk.in
+++ b/main.mk.in
@@ -17,11 +17,16 @@ ver = 0.9
# along with this program; see the file COPYING.
# If not, see <http://www.gnu.org/licenses>.
-rvs = $(name)
-dirs += $(libexecdir)/$(rvs)
+sysconfdir ?= @sysconfdir@
+BINDIR ?= @BINDIR@
+TMPDIR ?= @TMPDIR@
+LIBDIR ?= @LIBDIR@
+ETCDIR ?= @ETCDIR@
+dirs += $(sysconfdir) $(BINDIR) $(TMPDIR) $(LIBDIR) $(ETCDIR)
# phony targets ######################################################
-all : wrapper p-build
+.PHONY: all
+all : wrapper plugins
.SUFFIXES :
VPATH = $(srcdir)
filelist = \
@@ -35,25 +40,11 @@ filelist = \
$(patsubst $(srcdir)/%,%,$(shell find $(srcdir)/*/* -type f))
# install ############################################################
-install : install-wrapper libexec p-install
-
-# $(libexecdir)/rvs/*
-libexec : $(DESTDIR)$(libexecdir)/$(rvs)/plugins
-$(DESTDIR)$(libexecdir)/$(rvs)/plugins : $(DESTDIR)$(libexecdir)/$(rvs)
- touch $@
-
-# uninstall ##########################################################
-
-uninstall :
- $(RM) $(DESTDIR)$(bindir)/$(rvs)
- $(RM) -r $(DESTDIR)$(libexecdir)/$(rvs)
-
-# clean ##############################################################
-
-clean : $(clean-plugins) clean-wrapper
-
-distclean : clean $(distclean-plugins) distclean-wrapper
- $(RM) Makefile
+install : install-wrapper install-plugins
+uninstall : uninstall-wrapper uninstall-plugins
+clean : clean-wrapper clean-plugins
+distclean : clean distclean-wrapper distclean-plugins
+ $(RM) Makefile *.mk
# wrapper ############################################################
@@ -69,5 +60,12 @@ $(RVS) : install-wrapper
# plugins ############################################################
-p-% : plugins/Makefile ; $(MAKE) -C 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