summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in90
1 files changed, 90 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..7a3e131
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,90 @@
+#!/usr/bin/make -f
+# rvs Makefile
+# version 0.7.0
+# Copyright (C) 2009 Luke Shumaker
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
+
+
+# Variables ########################################################
+RM = rm -f
+CP = cp
+SED = sed
+INSTALL = install
+MKDIR = $(INSTALL) -d #mkdir -p
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
+TOUCH = touch
+export RM CP SED INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA
+
+SHELL = @SHELL@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+rvsdir = @rvsdir@/rvs
+srcdir = @srcdir@
+export SHELL rvsdir srcdir
+
+plugins = $(patsubst $(srcdir)/plugins/%,%,\
+ $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d))
+
+# phony targets ####################################################
+make-plugins = $(addprefix p-,$(plugins))
+install-plugins = $(addprefix install-p-,$(plugins))
+remove-plugins = $(addprefix remove-p-,$(plugins))
+all-plugins = $(make-plugins) $(install-plugins) $(remove-plugins)
+all : rvs $(make-plugins)
+#.PHONY : install uninstall clean distclean $(all-plugins)
+.PHONY : install uninstall clean distclean
+.SUFFIXES :
+
+# targets ##########################################################
+
+$(rvsdir)/plugins :
+ $(MKDIR) $(dir $@)
+ $(TOUCH) $@
+
+# install/clean/remove #############################################
+
+install : $(bindir)/rvs $(rvsdir)/plugins $(install-plugins)
+
+clean :
+
+distclean : clean
+ $(RM) var.sed
+ $(RM) Makefile
+
+uninstall :
+ $(RM) $(prefix)/$(bindir)/rvs
+ $(RM) -r $(rvsdir)
+
+# implicit rules ###################################################
+
+# 'build' shell scripts
+b := @
+% : $(srcdir)/%.sh
+ $(MKDIR) $(dir $@)
+ $(SED) -e 's/$bSHELL@/$(subst /,\/,$(SHELL) )/g' \
+ -e 's/$brvsdir@/$(subst /,\/,$(rvsdir))/g' <$< > $@
+
+# install
+$(bindir)/% : %
+ $(MKDIR) $(dir $@)
+ $(INSTALL_PROGRAM) $< $@
+
+# make plugins
+p-% : plugins/% plugins/%/Makefile $(srcdir)/plugins/%
+ $(MAKE) -C $<
+
+# install plugins
+install-p-% : plugins/% plugins/%/Makefile $(srcdir)/plugins/% p-%
+ $(MAKE) -C $< install
+
+# uninstall plugins
+uninstall-p-% : plugins/% plugins/%/Makefile
+ $(MAKE) -C $< uninstall