summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-08-09 20:53:50 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:13 -0600
commit530c6ff02be9ce6604e16ac33ec24569a39f6b0c (patch)
tree9088120e8abb41c5426f3faa6b21e6eff58454cb
parent2d9534da516df2130d3f3b17eb4ae039cc47d4cf (diff)
add dist to makefiles
-rw-r--r--Makefile.in81
-rw-r--r--TODO8
-rwxr-xr-xconfigure8
-rw-r--r--plugins/repo/Makefile.in16
-rw-r--r--plugins/users/Makefile.in12
5 files changed, 89 insertions, 36 deletions
diff --git a/Makefile.in b/Makefile.in
index 2b1e677..31b60fa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
name = @name@
-# version 0.7.3
+ver = 0.7.3
# Copyright (C) 2009 Luke Shumaker
#
# This file is part of rvs.
@@ -20,7 +20,7 @@ name = @name@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
export rvs = $(name)
-# Directories ######################################################
+# pirectories ######################################################
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -30,7 +30,7 @@ libexecdir = @libexecdir@
dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir)/$(rvs)
export srcdir prefix exec_prefix bindir sbindir libexecdir
-# Programs #########################################################
+# programs #########################################################
RVS = @RVS@
SHELL = @SHELL@
RM = rm -f
@@ -43,21 +43,24 @@ INSTALL_DATA = $(INSTALL) -m 644
TOUCH = touch
export RVS SHELL RM CP SED INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA TOUCH
-# plugin targets ###################################################
+# plugins ##########################################################
plugins = $(patsubst $(srcdir)/plugins/%,%,\
- $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d))
-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)
+ $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d))
+
+build-plugins = $(addprefix p-,$(plugins))
+install-plugins = $(addprefix install-p-,$(plugins))
+clean-plugins = $(addprefix clean-p-,$(plugins))
+distclean-plugins = $(addprefix distclean-p-,$(plugins))
+
+#uninstall-plugins = $(addprefix uninstall-p-,$(plugins))
+#dist-plugins = $(addprefix dist-p-,$(plugins))
# phony targets ####################################################
-all : $(rvs) $(make-plugins)
-#.PHONY : install uninstall clean distclean $(all-plugins)
-.PHONY : install uninstall clean distclean
+all : $(rvs) $(build-plugins)
+.PHONY : install uninstall clean distclean libexec
.SUFFIXES :
-# targets ##########################################################
+# build ############################################################
b := @
$(rvs) : $(srcdir)/rvs.sh
$(SED) \
@@ -66,40 +69,58 @@ $(rvs) : $(srcdir)/rvs.sh
-e 's/$bname@/$(subst /,\/,$(name))/g' \
< $< > $@
+# install ##########################################################
+
+install : install-$(name) libexec $(install-plugins)
+
+# core executable
+install-$(name) : $(RVS)
$(RVS) : $(rvs) $(bindir)
$(INSTALL_PROGRAM) $< $@
-
+
+# $(libexecdir)/rvs/*
+libexec : $(libexecdir)/$(rvs)/plugins
$(libexecdir)/$(rvs)/plugins : $(libexecdir)/$(rvs)
$(TOUCH) $@
-# install/clean/remove #############################################
-
-install : install-$(name) $(libexecdir)/$(rvs)/plugins $(install-plugins)
-install-$(name) : $(bindir)/$(rvs)
-
+# uninstall ########################################################
uninstall :
$(RM) $(bindir)/$(rvs)
$(RM) -r $(libexecdir)/$(rvs)
-clean :
+# clean ############################################################
+
+clean : $(clean-plugins)
$(RM) var.sed
-distclean : clean
+distclean : clean $(distclean-plugins)
$(RM) Makefile
$(RM) $(rvs)
+# dist #############################################################
+
+d = $(name)-$(ver)
+dist : $(d).tar.gz
+
+$(d).tar.gz : $(d)
+ tar -czf $@ $<
+
+$(d) : distclean
+ $(INSTALL) -m 777 -d $@
+ $(CP) -r $(srcdir)/* $@
+
+# plugins ##########################################################
+
+install-p-% : plugins/% plugins/%/Makefile p-% libexec ; $(MAKE) -C $< install
+p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $<
+uninstall-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< uninstall
+clean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< clean
+distclean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< distclean
+dist-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< dist
+
# implicit rules ###################################################
$(dirs) :
$(MKDIR) $@
-# make/install/uninstall plugins
-p-% : plugins/% plugins/%/Makefile $(srcdir)/plugins/%
- $(MAKE) -C $<
-
-install-p-% : plugins/% plugins/%/Makefile $(srcdir)/plugins/% p-%
- $(MAKE) -C $< install
-
-uninstall-p-% : plugins/% plugins/%/Makefile
- $(MAKE) -C $< uninstall
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..1a2664f
--- /dev/null
+++ b/TODO
@@ -0,0 +1,8 @@
+X write `dist' into the makefiles
+ X Makefile.in
+ X plugins/repo/Makefile.in
+ X plugins/repo/Makefile.in
+_ rewrite the plugin interface to allow depends
+_ implement tree
+ _ merge diff-daemon into rvs
+
diff --git a/configure b/configure
index 6542e59..69fcd32 100755
--- a/configure
+++ b/configure
@@ -71,11 +71,11 @@ for var in $vars; do
val=${!var1}
# GNU bash optimized version
- #var=${var//':'/'\:'}
- #val=${val//':'/'\:'}
+ var=${var//':'/'\:'}
+ val=${val//':'/'\:'}
# POSIX version
- var=`echo "$var" | sed 's@:@\\:@g'`
- val=`echo "$val" | sed 's@:@\\:@g'`
+ #var=`echo "$var" | sed 's@:@\\:@g'`
+ #val=`echo "$val" | sed 's@:@\\:@g'`
echo "s:@$var@:$val:g" >> var.sed
done
diff --git a/plugins/repo/Makefile.in b/plugins/repo/Makefile.in
index fd84a25..6adec10 100644
--- a/plugins/repo/Makefile.in
+++ b/plugins/repo/Makefile.in
@@ -44,10 +44,10 @@ TOUCH ?= touch # This file doesn't use touch
# phony targets ####################################################
all : $(name)
-.PHONY : $(name) install uninstall clean distclean
+.PHONY : $(name) install uninstall clean distclean dist
.SUFFIXES :
-# main #############################################################
+# build ############################################################
mysrcdir = $(srcdir)/plugins/$(name)
myoutdir = out
@@ -74,6 +74,18 @@ distclean : clean
$(RM) Makefile
$(RM) -r out
+# dist #############################################################
+
+d = $(name)-$(ver)
+dist : $(d).tar.gz
+
+$(d).tar.gz : $(d)
+ tar -czf $@ $<
+
+$(d) : distclean
+ $(INSTALL) -m 777 -d $@
+ $(CP) -r $(mysrcdir)/* $@
+
# implicit rules ###################################################
b := @
diff --git a/plugins/users/Makefile.in b/plugins/users/Makefile.in
index e6f3c24..b97720b 100644
--- a/plugins/users/Makefile.in
+++ b/plugins/users/Makefile.in
@@ -74,6 +74,18 @@ distclean : clean
$(RM) Makefile
$(RM) -r out
+# dist #############################################################
+
+d = $(name)-$(ver)
+dist : $(d).tar.gz
+
+$(d).tar.gz : $(d)
+ tar -czf $@ $<
+
+$(d) : distclean
+ $(INSTALL) -m 777 -d $@
+ $(CP) -r $(mysrcdir)/* $@
+
# implicit rules ###################################################
b := @