summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-07-28 15:50:27 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:13 -0600
commit7f78b595ce3baf3ade82e546a3ed7cfba41c8ef9 (patch)
tree82319fb46f670457e29f2082a819d24c528c6e4e /Makefile.in
parent9cc5fe6c84622c1c67566b03152ef55ccce2e4db (diff)
use the Makefile.in name used by the GNU build system
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