summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2009-07-14 21:25:05 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:11 -0600
commit6ca3d3f0cd4437922280724957dc1279e007da1f (patch)
tree2103966afb6906da5e48d135f1a1f2292bad065a
parent3a511922b9e6fd25aefedb72e35a4afc1cc024a5 (diff)
0.6.2 -- how come no one told me `make install' fails?
-rw-r--r--Makefile.orig63
-rw-r--r--Variables4
-rwxr-xr-xconfigure19
-rwxr-xr-xsource/rvs6
-rwxr-xr-xsource/rvs-core/lib/rvsdb4
-rwxr-xr-xsource/rvs-core/lib/stdio8
6 files changed, 67 insertions, 37 deletions
diff --git a/Makefile.orig b/Makefile.orig
index 8bc4006..a212209 100644
--- a/Makefile.orig
+++ b/Makefile.orig
@@ -9,9 +9,14 @@
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-# Make Dependencies #################################################
+# Make Programs #####################################################
RM = rm -f
+CP = cp
+MKDIR = mkdir -p
+CHOWN = chown
+CHMOD = chmod
INSTALL = install
+PRE = @@pre@@ # code pre-processor
# Variables ########################################################
SHELL = $$SHELL$$
@@ -25,31 +30,55 @@ rvs : wrapper core
.SUFFIXES :
-install : wrapper core
- $(INSTALL) -m 755 -T out/rvs $(prefix)/$(bindir)/rvs
- $(INSTALL) -m 755 -d out/rvs-core $(libdir)/core
+out/% : $(sourcedir)/source/% $(PRE) out
+ $(PRE) <$< > $@
wrapper : lib out/rvs
-#core : l b c d p f s
-core : lib out/rvs-core/commit out/rvs-core/get d f
+#core: lib commit get init l b c d p f s
+core : lib commit get init d f
-#l: lib out/rvs-core/commit.l out/rvs-core/get.l
-#b: lib out/rvs-core/commit.b out/rvs-core/get.b
-#c: lib out/rvs-core/commit.c out/rvs-core/get.c
-d : lib out/rvs-core/commit.d out/rvs-core/get.d
-#p: lib out/rvs-core/commit.p out/rvs-core/get.p
-f : lib out/rvs-core/commit.f out/rvs-core/get.f
-#s: lib out/rvs-core/commit.s out/rvs-core/get.s
-#D: lib out/rvs-core/commit.D out/rvs-core/get.D
+commit: lib out/rvs-core/commit
+get: lib out/rvs-core/get
+init: lib out/rvs-core/init
-lib: out/rvs-core/lib/stdio out/rvs-core/lib/rvsdb
+#l: lib out/rvs-core out/rvs-core/commit.l out/rvs-core/get.l
+#b: lib out/rvs-core out/rvs-core/commit.b out/rvs-core/get.b
+#c: lib out/rvs-core out/rvs-core/commit.c out/rvs-core/get.c
+d : lib out/rvs-core out/rvs-core/commit.d out/rvs-core/get.d
+#p: lib out/rvs-core out/rvs-core/commit.p out/rvs-core/get.p
+f : lib out/rvs-core out/rvs-core/commit.f out/rvs-core/get.f
+#s: lib out/rvs-core out/rvs-core/commit.s out/rvs-core/get.s
+#D: lib out/rvs-core out/rvs-core/commit.D out/rvs-core/get.D
-out/% : $(sourcedir)/source/% tmp/var.sed
- tmp/var.sed <$< > $@
+lib: out/rvs-core/lib out/rvs-core/lib/stdio out/rvs-core/lib/rvsdb
+
+# install/clean/uninstall
+
+install :
+ $(INSTALL) -m 755 -o root -g root -T out/rvs $(prefix)/$(bindir)/rvs
+ #$(INSTALL) -m 755 -o root -g root -d $(libdir)
+ #$(INSTALL) -m 755 -o root -g root -D out/rvs-core/{lib/*,*} $(libdir)
+ $(CP) -r out/rvs-core $(libdir)
+ $(CHOWN) -R root:root $(libdir)
+ $(CHMOD) -R 755 $(libdir)
clean :
$(RM) -r tmp
$(RM) -r out
$(RM) Makefile
+remove :
+ $(RM) $(prefix)/$(bindir)/rvs
+ $(RM) -r $(libdir)
+
+# Override build instructions for directories
+out:
+ $(MKDIR) out
+
+out/rvs-core: out
+ $(MKDIR) out/rvs-core
+
+out/rvs-core/lib: out/rvs-core
+ $(MKDIR) out/rvs-core/lib
+
diff --git a/Variables b/Variables
index 738e803..15799d3 100644
--- a/Variables
+++ b/Variables
@@ -1,5 +1,5 @@
-VER '0.6.1'
+VER '0.6.2'
SHELL '/usr/bin/env bash'
prefix "$HOME"
bindir 'bin'
-libdir '/etc/rvs/'
+libdir '/etc/rvs'
diff --git a/configure b/configure
index 256a15b..793e347 100755
--- a/configure
+++ b/configure
@@ -10,6 +10,7 @@
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
sourcedir=`dirname "$0"`
+pre='./var.sed'
while [ $# -gt 0 ]; do case "$1" in
--*)
@@ -35,9 +36,7 @@ while [ $# -gt 0 ]; do case "$1" in
shift
done
-mkdir -p {out/rvs-core/lib,tmp}
-
-echo '#!/bin/sed -f' > tmp/var.sed
+echo '#!/bin/sed -f' > "$pre"
while read line; do
var=`echo "$line" | cut -f 1 `
val=$(eval echo `echo "$line" | cut -f 2-`) # load from Variables file
@@ -48,15 +47,21 @@ while read line; do
var=`echo "$var" | sed 's:/:\\\\/:g'`
val=`echo "$val" | sed 's:/:\\\\/:g'`
- echo 's/$$'"${var}"'$\$/'"${val}"'/' >> tmp/var.sed
+ echo 's/$$'"${var}"'$\$/'"${val}"'/' >> "$pre"
#sed -i.bak 's/$$'"${var}"'$\$/'"${val}"'/' "$files"
unset var val
done < "$sourcedir/Variables"
-chmod +x tmp/var.sed
-tmp/var.sed < "$sourcedir/Makefile.orig" > Makefile
+chmod +x "$pre"
+"$pre" < "$sourcedir/Makefile.orig" > Makefile
n0='# DO NOT edit this file, it has been generated by configure, and will be'
n1='# overwritten. Instead, edit the file `Makefile.orig'\'
sourcedir=`echo "$sourcedir" | sed 's:/:\\\\/:g'`
-sed -i -e "10 a$n0" -e "10 a$n1" -e "s/@@sourcedir@@/$sourcedir/" Makefile
+ pre=`echo "$pre" | sed 's:/:\\\\/:g'`
+sed -i \
+-e "10 a$n0" \
+-e "10 a$n1" \
+-e "s/@@sourcedir@@/$sourcedir/" \
+-e "s/@@pre@@/$pre/" \
+Makefile
diff --git a/source/rvs b/source/rvs
index 6a6102a..518f487 100755
--- a/source/rvs
+++ b/source/rvs
@@ -13,12 +13,14 @@ usage='COMMAND [OPTIONS]'
RVSDIR='$$libdir$$'
source "$RVSDIR/lib/stdio"
-source "$RVSDIR/lib/rvsdb"
+#source "$RVSDIR/lib/rvsdb"
+# START OPTION HANDLING #
com=$1;
+# END OPTION HANDLING #
case "$com" in
-d) echo "$RVSDIR";;
- '') error 'please specify a command';;
+ '') error 'no command specified';;
*)
if [ -f "$RVSDIR/$com" ]; then
export TMPDIR="$repo/tmp"
diff --git a/source/rvs-core/lib/rvsdb b/source/rvs-core/lib/rvsdb
index 8cd4316..3ced573 100755
--- a/source/rvs-core/lib/rvsdb
+++ b/source/rvs-core/lib/rvsdb
@@ -1,8 +1,8 @@
#!$$SHELL$$
# abomination module:rvs:lib:rvsdb
#name='rvs db'
-#ver='0.6.0'
-logver='0.5.0'
+#ver='0.6.2'
+logver='0.6.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
diff --git a/source/rvs-core/lib/stdio b/source/rvs-core/lib/stdio
index 9398a52..aff22f1 100755
--- a/source/rvs-core/lib/stdio
+++ b/source/rvs-core/lib/stdio
@@ -1,7 +1,7 @@
#!$$SHELL$$
# abomination module:rvs:lib:stdio
#name='rvs stdio'
-#ver='0.6.0'
+#ver='0.6.2'
#usage=''
# Copyright (C) 2009 Luke Shumaker
# This program is distributed in the hope that it will be useful,
@@ -11,12 +11,6 @@
#
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-#source "$RVSDIR/lib/stdio"
-#source "$RVSDIR/lib/rvsdb"
-
-sopt='VhH?vq'
-lopt='version,verbose,quiet,help'
-
verbose() {
if [ "$volume" == '-v' ]; then
echo $@